menu con tendina orizzontale con spostamento verso sinistra
cinzia2009
Ecco l'esempio del menu a cui mi riferisco :
il problema sta nel fatto di fare aprire anche il secondo, il terzo pulsante (prodotti e news) sempre verso sinistra, trascinandosi chiaramente anche i pulsanti inattivi .
Quindi, nel momento in cui mi posiziono su "prodotti" mi si apre la tendina in orizzontale relativa alla sezione, e , di conseguenza, mi si sposterą anche il pulsante "azienda".
Nei pulsanti ho inserito questo script :
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse) == true) {
if (_currentframe == _totalframes) {
stop();
} else {
play();
}
} else {
if (_currentframe !== 1) {
prevFrame();
}
}
}
ma non so andare avanti.
Io saprei risolvere il problema con le interpolazioni, ma mi piacerebbe riuscirci con gli script.
Che suggerisci???
Grazie
Cinzia
max_400
Si avvisano i signori utenti che in questo forum non sono gradite parole di dubbio gusto . Un ringraziamento dal personale di servizio . Il moderatore
Edited by cinzia2009 - 21/4/2010, 16:58
max_400
//-------------------uno--------------------------- //---------------------------------------------------- function unof(){ _root.uno.onEnterFrame=function(){ if(_root.uno.hitTest(_root._xmouse,_root._ymouse)){ _root.uno._x -=25; if(_root.uno._x <=150){ _root.uno._x=150; delete _root.uno.onEnterFrame; } if(_root.uno._currentframe <=1){ _root.uno.play();} }else{_root.uno._x=300; _root.uno.gotoAndStop(1); //delete _root.uno.onEnterFrame; } } } unof(); //-------------------due--------------------------- //------------------------------------------------- function duef(){ _root.due.onEnterFrame=function(){ if(_root.due.hitTest(_root._xmouse,_root._ymouse)){ delete _root.uno.onEnterFrame; _root.due._x -=25; _root.uno._x -=25; if(_root.due._x <180){ _root.due._x=180;} if(_root.uno._x <150){ _root.uno._x=150;} if(_root.due._currentframe <=1){ _root.due.play();} }else{ _root.due._x=330; unof(); _root.due.gotoAndStop(1); } } } duef(); //-------------------tre--------------------------- //-------------------------------------------------- function tref(){ _root.tre.onEnterFrame=function(){ if(_root.tre.hitTest(_root._xmouse,_root._ymouse)){ delete _root.due.onEnterFrame; delete _root.uno.onEnterFrame; _root.tre._x -=25; _root.uno._x -=25; _root.due._x -=25; if(_root.tre._x <210){ _root.tre._x=210;} if(_root.uno._x <150){ _root.uno._x=150;} if(_root.due._x <180){ _root.due._x=180;} if(_root.tre._currentframe <=1){ _root.tre.play();} }else{ _root.tre._x=360; unof(); duef(); _root.tre.gotoAndStop(1); //delete _root.due.onEnterFrame; } } } tref();
max_400
dentro un clip... per poterlo trasportare da uno stage all'altro...
Per capire bene il meccanismo ho creato l'inizio dello script il semplice spostamento
di un clip soltanto...
5 replies since 21/4/2010, 09:42 108 views