Skip to main content
Participant
May 17, 2006
Question

gotoAndplay

  • May 17, 2006
  • 1 reply
  • 219 views
hi
can anybody help me
please say if the gotoAndplay function can be added in onclipEvent of a movie clip
for eg. like this
onClipEvent (enterFrame){
if (life == 0){ //life is number from _root.life
gotoAndPlay(2);
}
}
This topic has been closed for replies.

1 reply

Inspiring
May 17, 2006
Yes, it can. Just take care of the scope of your code:
onClipEvent (enterFrame){
if (_root.life == 0){ //life is number from _root.life
_root.gotoAndPlay(2); // or this.gotoAndPlay(2) if it's the MC that should change, not the main movie
}
}

greets,
blemmo