Skip to main content
Participant
January 13, 2012
Question

can't get a simple gotoAndPlay to work...

  • January 13, 2012
  • 2 replies
  • 908 views

Hi there.

I'm not familiar with AS3 at all.

I'm working on a simple 2 minute presentation.

For testing purposes, I have a layer named "label" that I am using to set a label called "test" (currently it's on frame 1445)

I'm trying to put an action in the timeline, frame 1, that will cause the play head to automatically jump to the "test" label so as I build the presentation and test it, I don't have to sit through the entire thing just to see if my latest animations are working as expected. I'd like to move this "test" label down the timeline as I continue to build new parts of the presentation.

So in frame 1, on my actions layer, I have:

gotoAndPlay("test");

Is this not the right code?

I would expect this code to jump the play-head to where ever I put that "test" label....

Instead, it either doesn't work at all, or it jumps to some other random spot around frame 160. NO other labels are being used in this presentation.

(I'm using the FlashEff component plugin for effects, in case that info is necessary)

Any advice would be great, since it's really time consuming to have to watch the entire presentation for each tweak I'm testing....

Thanks.

-Karen

This topic has been closed for replies.

2 replies

Inspiring
January 13, 2012

My guess would be that by the time the code has executed on fram 1 only about 160 frames of your timeline has loaded. If the frame with "test" isn't loaded when the code executes you might get behavior like that.

Ned Murphy
Legend
January 13, 2012

gotoAndPlay("test");

should work if it is the only command you have in frame 1 and no ther code is commanding it to go elsewhere.  If it is not going where you expect, then chances are theris something else telling it to do so.