La porta che si apre e si chiude

« Older   Newer »
  Share  
maxmaxuell
view post Posted on 22/3/2016, 16:28     +1   -1




La porta che si apre e si chiude
inversione time line con _currentframe

porta che si apre e si chiude
porta che si apre e si chiude


CODICE
on (press) {
       if(porta._currentframe <=1){
               porta.play()}
               
       if(porta._currentframe >=10){
               porta.onEnterFrame=function(){
                       porta.gotoAndStop(porta._currentframe-=1);
                       if(porta._currentframe <=1){
                               delete porta.onEnterFrame;
                       }
               }
       }
}


Quest'esempio serve a verificare il funzionamento del _currentframe (fotogramma corrente)
Con la funzione play() la porta di apre fino a raggiungere fotogramma 10 ;
mentre con la funzione _currentframe la porta si richiude e si ritorna al fotogramma 1
cioè al fotogramma iniziale

Esempio
 
Top
0 replies since 22/3/2016, 16:28   23 views
  Share