12 Replies Latest reply on Oct 11, 2011 1:33 PM by Ned Murphy

    Adobe Flash CS5 Help!


      Hi. I am new here. I was wondering if someone could please help. I have tried look for tutorials but just couldn't find one that could help me do want to do in Flash. I am trying to make an animiation. I have a background with some text on it. The text says Happy Birthday and below it says Start. I added a motion preset to Happy Birthday. I made an invisible button and added that to Start since I want the animation to start when you click on start. I added the acton GoToandStop on Press and Release to go to the frame where there is an image of the presents. The action works and when you click on Start it goes over to that frame where the image of the presents are and stops. However, even when I don't click on Start it still goes on over to the frame where the present images are - I don't want it to do that. What should I do so that it doesn't do that? What I am doing wrong? Any help would be appreciated. Thank you so much.

        • 1. Re: Adobe Flash CS5 Help!
          Ned Murphy Adobe Community Professional & MVP

          HAve you placed a stop(); command in the frame where you want it to stop?

          • 2. Re: Adobe Flash CS5 Help!
            miguel_610 Level 1

            It doesn't let me. It says there are no parameters. I am new to Flash so I don't know what that means.

            • 3. Re: Adobe Flash CS5 Help!
              Ned Murphy Adobe Community Professional & MVP

              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.

              1 person found this helpful
              • 4. Re: Adobe Flash CS5 Help!
                miguel_610 Level 1

                Thank you. I am going to try to do that now. I hope it works.

                • 5. Re: Adobe Flash CS5 Help!
                  miguel_610 Level 1

                  It still isn't working. I don't know what it is that I am doing wrong.

                  • 6. Re: Adobe Flash CS5 Help!
                    Ned Murphy Adobe Community Professional & MVP

                    What isn't working?  Adding the code or having it stop where you want?

                    • 7. Re: Adobe Flash CS5 Help!
                      miguel_610 Level 1

                      Having it stop where I want it.

                      • 8. Re: Adobe Flash CS5 Help!
                        Ned Murphy Adobe Community Professional & MVP

                        Show all of the code that you are using in the different frames of the timeline if you can.

                        • 9. Re: Adobe Flash CS5 Help!
                          Ned Murphy Adobe Community Professional & MVP

                          By the way, are you getting any error messages?

                          • 10. Re: Adobe Flash CS5 Help!
                            miguel_610 Level 1

                            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.

                            • 11. Re: Adobe Flash CS5 Help!


                              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

                              import flash.events.MouseEvent;



                              // 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.

                              btn.addEventListener(MouseEvent.CLICK, btnMouseClickHandler);



                              // 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.

                              function btnMouseClickHandler(event:MouseEvent):void


                                        // 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:

                              http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-8000.html

                              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.


                              Happy Flashing!

                              1 person found this helpful
                              • 12. Re: Adobe Flash CS5 Help!
                                Ned Murphy Adobe Community Professional & MVP

                                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.