Only first frame played with gotoAndPlay


hello,

 

my issue is: have 120 frame movieclip stop(); action on first frame.  have (below) tells mc 'gotoandplay(2); goes frame 2 , stops (no action on frame) instead of continuing frame 120.  here example of code:

 

my_mc.onenterframe=function(){

if((mctext1 eq "hit")){

_root.other_mc.gotoandplay(2);

}

else{

_root.other_mc.gotoandstop(1);

}

}

 

any ideas make mc play automatically when function requirements met???

i should know this.

 

thank you

each frame (thanks onenterframe ) condition (mctext1 eq "hit") true or false each frame go frame 1 or frame 2 ever!!.

 

when the movie is going to frame 3 again is sent to frame 2

 

change onenterframe to onload or call function once when need

 

my_mc.onload=function(){

if((mctext1 eq "hit")){

_root.other_mc.gotoandplay(2);

}

else{

_root.other_mc.gotoandstop(1);

}

}



More discussions in ActionScript 1 and 2


adobe

Comments