menu con tendina orizzontale con spostamento verso sinistra

« Older   Newer »
  Share  
cinzia2009
view post Posted on 21/4/2010, 09:42     +1   -1




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

 
Top
max_400
view post Posted on 21/4/2010, 15:22     +1   -1








:regista: 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

Download attachment
menu_current_e_spostamento.rar ( Number of downloads: 17 )

 
Top
max_400
view post Posted on 22/4/2010, 14:48     +1   -1





un esempio migliore per la mia piccola...

TVB :bacio:



Download attachment
menu_spost_ok_2.rar ( Number of downloads: 15 )

 
Top
max_400
view post Posted on 22/4/2010, 16:02     +1   -1




//-------------------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();
 
Top
max_400
view post Posted on 22/4/2010, 20:37     +1   -1




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...



:book:


Download attachment
menu_spost_ok_3_in_clip_perfect_1a_parte.rar ( Number of downloads: 18 )

 
Top
max_400
view post Posted on 22/4/2010, 21:18     +1   -1




ed ecco la seconda parte



:pc2:
image





//-------------------uno---------------------------
function unof(){
uno.onEnterFrame=function(){
if(uno.hitTest(_root._xmouse,_root._ymouse)){
delete due.onEnterFrame;
delete tre.onEnterFrame;
uno._x -=25;
if(uno._x <=150){
uno._x=150;}
if(uno._currentframe <=1){
uno.play();}
}else{
duef();
tref();
uno._x=300;
uno.gotoAndStop(1);}}}
unof();
//-------------------due---------------------------
function duef(){
due.onEnterFrame=function(){
if(due.hitTest(_root._xmouse,_root._ymouse)){
delete uno.onEnterFrame;
delete tre.onEnterFrame;
due._x -=25;
uno._x -=25;
if(due._x <=180){
due._x=180;}
if(uno._x <=150){
uno._x=150;}
if(due._currentframe <=1){
due.play();}
}else{ //se non č al contatto col due attiva gli altri enterframe
unof();
tref();
due._x=330;
due.gotoAndStop(1);}}}
duef();
//-------------------tre---------------------------
function tref(){
tre.onEnterFrame=function(){
if(tre.hitTest(_root._xmouse,_root._ymouse)){
delete uno.onEnterFrame;
delete due.onEnterFrame;
tre._x -=25; //<---------
due._x -=25;
uno._x -=25;
if(tre._x <=210){
tre._x=210;}
if(due._x <=180){
due._x=180;}
if(uno._x <=150){
uno._x=150;}
if(tre._currentframe <=1){
tre.play();}
}else{
unof();
duef();
tre._x=360;
tre.gotoAndStop(1);}}}
tref();

MODELLO MAX - SCALINI

image

....
image

Download attachment
menu_spost_ok_3_in_clip_perfect_2a_parte.rar ( Number of downloads: 15 )

 
Top
5 replies since 21/4/2010, 09:42   108 views
  Share