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

gotoAndStop VS. gotoAndPlay

LEGEND ,
Mar 26, 2008 Mar 26, 2008
Using this code for a button. If I want it to go to a later frame and play
from that frame on, how should I change th code? Thanks!



btnproducts.addEventListener(MouseEvent.CLICK, buttonClick2);

function buttonClick2(event:MouseEvent):void{

gotoAndStop(54);

};


TOPICS
ActionScript
2.2K
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
LEGEND ,
Mar 26, 2008 Mar 26, 2008
LATEST
Rick,

> Using this code for a button. If I want it to go to a later
> frame and play from that frame on, how should I change
> th code? Thanks!

gotoAndStop() means, literally, go to the frame designated and stop
there. On the other hand, gotoAndPlay() means, go to the frame disignated
and play from there.

> btnproducts.addEventListener(MouseEvent.CLICK, buttonClick2);
>
> function buttonClick2(event:MouseEvent):void{
> gotoAndStop(54);
> };

What you've shown means the playhead will go to frame 54 and stop. If
you wanted the playhead to skip to frame 54 and keep rolling, you would
replace gotoAndStop(54) with gotoAndPlay(54).


David Stiller
Contributor, How to Cheat in Flash CS3
http://tinyurl.com/2cp6na
"Luck is the residue of good design."


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