Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2003
    Messaggi
    4

    Sliding menu con immagini

    Ciao,
    ho bisogno di un aiuto, premetto che con flash mx sono una principiante... di actionscript ci capisco ben poco... ma almeno ci provo!
    Sto creando un sito, più esattamente un menu per un sito, ma mi riesce difficile, questo perchè il menu che vorrei fare è un po' complicato, ora vi spiego (in allegato trovate una specie di esempio):
    vorrei realizzare questo menu, composto di 7 listelle verticali, che si apra a fisarmonica, in parte ci sono riuscita, ma non so come inserire le immagini che si vedranno quando una delle listelle verrà cliccata (le altre listelle si dovranno spostare). cliccando su una listella si aprirà uno spazio contenente il link e l'immagine a cui si riferisce.
    aiutatemi...
    grazie e buona giornata
    D.

  2. #2
    Utente di HTML.it
    Registrato dal
    Dec 2003
    Messaggi
    4
    ciao, vi inoltro il codice, magari potete darmi una mano...

    QUESTO È IL CODICE CHE HO DATO AL FRAME
    // declare variables for the phisical movement of menues' elements
    acc = 7.9
    smorz = 1.70
    posOflogo = -72 // logo position in menu's element

    // ACTION FOR THE BUTTON
    MovieClip.prototype.DoSomething = function(theClip){
    trace("nome: " + theClip._name) // just while editing...
    trace("valore: " + theClip.mov.txt) // as above...
    trace("link: " + theClip.link) // ..and also for testing...

    getURL(theClip.link, "_blank"); // this applies the link to our buttons

    /*---------------------------------------------------------------
    | here you can add your script for the button action... |
    | ..... |
    | end of your custom script |
    ---------------------------------------------------------------*/
    } // end of function()



    // BUTTONS LABEL: label and links must be == (label nameage url)
    // buttons declarations
    nomi = new Array("01.chi siamo:who.html","02.eventi:who.html","03.multivide o:who.html","04.streaming:who.html","05.contatti:w ho.html","06.home:who.html","07.news:who.html");

    // this array contains your custom logo placed in your library
    // and get thier linkage name
    loghi = new Array("01","02","03","04","05","06","07");


    max = nomi.length - 1; // this is the number of btns;

    // Menu init:
    function createMenu(firstElement){
    for(i=1;i<=max;i++){
    duplicateMovieClip(firstElement,"menu"+i,i)
    myMenu = _root["menu"+i]
    textLabel = nomi[i].split(':')[0] // labels
    linkLabel = nomi[i].split(':')[1] // links
    myMenu.mov.txt = textLabel // adding label
    myMenu.link = linkLabel // link for the button here
    myMenu.acc = acc
    myMenu.smorz = smorz
    myMenu.attachMovie(loghi[i],"logo" + i,(5000+i))
    myLogo = myMenu["logo" + i]
    myLogo._x = posOflogo
    }
    // adding variables to the first element...
    firstElement.attachMovie("cubo","cubo",(7000+1))
    firstElement.cubo._x = -76
    firstElement.mov.txt = nomi[0].split(':')[0]
    firstElement.link = nomi[0].split(':')[1]
    firstElement.acc = acc
    firstElement.smorz = smorz
    }
    createMenu(_root.menu0); // create that menu!

    QUESTO È QUELLO CHE HO DATO AL CLIP:
    onClipEvent(load){
    x_fin = -97
    }
    onClipEvent(enterFrame){
    x = mov._x
    dx = (dx+(x_fin-x)/acc)/smorz
    x += dx
    mov._x = x
    name = _name.substring(4,6) - 1;
    if(name >=0){
    _x = _root["menu" + name].mov._x + _root["menu" + name]._x + 120
    } else {
    _x = 90
    }
    }

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.