HAve you placed a stop(); command in the frame where you want it to stop?
It doesn't let me. It says there are no parameters. I am new to Flash so I don't know what that means.
1 person found this helpful
First, open your Actions window and turn off anything to do with any code assist functionality. In the newest version of Flash, you would turn the script assist by clicking a magic wand to the far right top of the Actions window such that it is niot highlighted.
Then, select the frame in the timeline where you need to have it stop and in the Actions panel type: stop(); If you did it correctly there should be a lower case "a" in the frame and when you select the frame you should see the code in the Actions window.
Thank you. I am going to try to do that now. I hope it works.
It still isn't working. I don't know what it is that I am doing wrong.
What isn't working? Adding the code or having it stop where you want?
Having it stop where I want it.
Show all of the code that you are using in the different frames of the timeline if you can.
By the way, are you getting any error messages?
Yes, I have been getting error messages too. This all really furstrating. I've been working on the same thing all day and can't seem to get it right. Thanks for trying to help. I do appreciate it.
1 person found this helpful
Here is a link to a zip file with an FLA built what I imagine you are trying to accomplish, kind of:
This is the very basics of using Flash with a little bit of ActionScript3.
You'll notice on the timeline I have 5 layers.
1. labels - this is where you will put frame label names.
2. as - this is the layer where you will add any and all code
3. txt_happyBirthday - on this layer is an animated text field (wrapped in a movieClip)
4. btn - there is an invisible "_square" movieClip on stage with an instance name of "btn"
5. Start - this is simply static text.
Open up the Actions Panel on frame 1 of layer "as" and there is a small amount of code to control the movie. There is a deal of comments to assist you.
Here is what is on that frame (it is easier to read in the file):
// The code for any mouse events needs to be imported
// stops the playhead at the current frame
// so it does not continue.
// This takes no "parameters" as stop doesn't
// need any to do what it needs to do.
// Button Code
// We want to have our "button" tell Flash to do something
// when it is clicked.
// This is a little more complex in ActionScript3 vs AS2, but the
// following code is the most basic of all AS3.
// First we have an "event listener" for the button.
// This is so we can wait for something to happen to it
// before responding. The function at the end is what happens
// when btn hears the CLICK mouse event.
// Now we want to respond to the CLICK event
// In this first line we open the function.
// It has an event type of MouseEvent, meaning that that is
// what kind of event we are responding to.
// This line tells our playhead to go to and play at a
// defined frame. In this case, we have a frame label of "motion"
// on frame two. But you can also use a frame number but not have it in quotes.
// You can add a frame label on a frame by creating a new keyframe
// (notice how I have a layer called "labels"), selecting it, and
// adding a label in the Properties Panel.
// You can also use gotoAndStop() to stop on a frame.
I suggest starting by watching the videos on AdobeTV:
Also, You can learn the fundamentals of Actionscript 3 here:
It is a little bit daughnting but there is a lot of good info there.
This can all be a little bit frustrating at first, but don't let that stop you. Flash really does get fun from here.
If you are getting error messages, that's one of the things you should post when you start a new posting... including the actual error messages... saves folks that offer to help alot of guesswork. So if you post your error messages, and your code, and explain where it is, there is hope of helping you.