layers problems in flash mx ?


#1

Hi guys, I’ve been learning flash for the last 4 weeks. I’ve got most of the nuts and bolts working. Today I ran into a problem.

I want to stop an movie and wait for the user to select a button.
the button in question has a tween in animation and a tween out animation. Anyway once the selection is made the user should be taken to the corresponding scene. Before this happen the tween out animation plays and then that scene is loaded.

Problem I have is that the incorrect scenes are being loaded even when I use goto scene and label the frames to start from correctly.

Is this a flash layer problem, how or where can I get the info to fix it.

Cheers


#2

I assume you’re using the movieClip buttons - what with the animations and all - so don’t forget that they have their own timelines. Target the main timeline of the movie with either _root. or _level, like so:

_root.gotoAndPlay(“scene2”, “start”);

this should work for you.


#3

Nope not using Movie buttons. Just your bog standard for states. I just basically want to pause the scene mid flow, for a user choice and then carry on from that paused frame. The user has five choices(5 scenes) but the same scene gets loaded no matter what is pressed.


#4

now I’m sure you’ve got something far more complex happening in your scene, but sometimes I find it’s best to find a base-level simple example for comparison, so I whipped this simple little thing up in just a few moments. Let me know if it’s at all applicable - it’s really just a few stop() actions, and gotoAndPlay()'s. Take a look - if it doesn’t help at all, maybe you could post your fla so we can take a look at it.

sceneButtonsSimple.zip


#5

Cheers Your probably right, I’ve been I haven’t written code for 12 years so its all rusty for me.

I’ll let you know how I get on.


#6

you might want to create an “actions” layer, and then on the frame which you would like the animation to stop, create a keyframe, then just add a stop action on the keyframe. now your button can just be scripted to move to the next scene:

on(release){
gotoAndPlay(“scene”,“label”);
}

without the stop(); on the frame, your animation is gonna keep moving/looping or watever.

a side note… don’t forget to label your frames! just click on your keyframe, and name the frame in your property inspector.


#7

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.