Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

gotoandplay function

Contributor ,
Jun 16, 2007 Jun 16, 2007
Is there a gotoandplay function in actionscript 3? I can't seem to find it. I would like to use a frame label instead of a frame number if possible. I would also like to play the flash movie backwards to a certain point when the user clicks a certain button. I have seen it done before in Actionscript 2, but do not know how in actionscript 3.
TOPICS
ActionScript
529
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 16, 2007 Jun 16, 2007
Of course it still exists – anyting timeline based wouldn't be very useful without something at least similar.

What has happened is that the global methods that many folks grew to love in earlier versions of flash have gone away. Instead of just being plain old "gotoAndPlay()" it is now "MovieClip.gotoAndPlay()."

In other words, look in the help files under MovieClip class methods and there you will find it – just the same as it has always been.
Translate
LEGEND ,
Jun 16, 2007 Jun 16, 2007
Of course it still exists – anyting timeline based wouldn't be very useful without something at least similar.

What has happened is that the global methods that many folks grew to love in earlier versions of flash have gone away. Instead of just being plain old "gotoAndPlay()" it is now "MovieClip.gotoAndPlay()."

In other words, look in the help files under MovieClip class methods and there you will find it – just the same as it has always been.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 16, 2007 Jun 16, 2007
just remember that in order to use MovieClip.gotoAndPlay() you will need to import the MovieClip display object...

import flash.display.MovieClip;
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 17, 2007 Jun 17, 2007
That worked perfectly. Now does any know how to make a movie play in reverse until a certian point.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 17, 2007 Jun 17, 2007
initiate a loop (like the ENTER_FRAME event or use the Timer class) and repeatedly execute the prevFrame() method of your movieclip.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 17, 2007 Jun 17, 2007
I have seen an example like this: does this make any since?

onClipEvent(load) {
_root.reverse_flag=0;
}

onClipEvent(enterFrame) {
if(_root.reverse_flag==1) {
num=_parent._currentframe;
num--;
_parent.gotoAndStop(num);
}
}

But they applied to an object and I believe they are using Actionscript 3.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 17, 2007 Jun 17, 2007
LATEST
that wasn't good coding in as2 but would work. it will not work in as3.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines