Sunday, April 4, 2010

very basic beginner question

I'm very new to Flash. I'm converting some old Director/Shockwave animations to Flash, and I'm setting up a navigation system. I've reached what I suspect is the first of my frustrating problems.

I have a simple animation that runs from from 1 to frame 110, and I'd like it to loop until the user clicks a button. The timeline goes on beyond frame 110 with other stuff. In an ''actions'' layer in frame 110, I have the following

gotoAndPlay(1);

I thought that this would lead to the looping, but it doesn't. The movie just moves on beyond frame 110. Just as a test, I put the following at frame 110 instead.

stop();

and when I test the movie, it doesn't stop. The commands don't seem to be seen.

What's going on?

Thanks

Mark

very basic beginner question

you have a loop somewhere that's executing code after the code you displayed.?for example, do you have an onEnterFrame() loop anywhere?

very basic beginner question

Is your document an Actionscript 3 document or Actionscript 2?

If it is AS2, what you're doing should work. My guess is it's AC3.

Try this....

- make sure your movieClip is named (in properties)

- give your first keyframe a label ( ie 'start')

- add the following AS in frame 110:

stop();
yourMovieName.gotoAndPlay(''start'');

good luck!

elaine

Thanks for responding...no, there's no other looping code. My trouble seems to be more basic than that. There's no other code at all.

that code works in both as2 and as3.

post a link to your fla or post a link to your fla

Thanks for sticking with this. I know I'm going to be embarrassed when I find out what I'm doing wrong. This may be related to how I'm putting in the code.

I select frame 110, press F9 to get the Actions panel, and type

stop();
gotoAndPlay(''start'');

Is it a clue that in the Actions panel it says that the action is for frame 1?

I've attached the file.

Trying again to upload file

bummer...there seems to be a problem uploading the file...trying one more time.

zip your file and wait a minute or so after clicking ok on the file browse window before clicking post message.?that seems to give a better chance for virus scanning or whatever is taking place on the forum end to work better.

yes - it is a clue if the panel says frame one.

when you are in frame 110, are you creating a keyframe, and then adding the code?

Sounds like you are putting the code on the first frame....

elaine

That's it...no keyframe...thanks

glad to be of assistance

elaine

No comments:

Post a Comment