7 Replies Latest reply on May 11, 2011 10:58 AM by funguygordy

    Flash PRO CS5 Troubles




      Hello all,


      I have seen a few different people with my problem, but have not found a good guide to follow in order to fix it.  I am working on a webpage for a friend of mine, and started by designing a home page in photoshop cs5.  I have a static header, HOME and DONATE buttons below, and then four images with four buttons as the body of the home page.  (ABOUT, PROJECTS, GALLERY, CONTACT US).  I had been following the guide linked above.  I have been able to make a movieclip for the first image (ABOUT) which makes the other three images slide behind it and fade out while a text box fades in to replace the three pics.  What I want is to be able to click the about button, and make this happen. What I have seen suggests making this happen within scene1, but am at a loss.  The file is set for actionscript 3.0. 


      I appreciate any help,



        • 1. Re: Flash PRO CS5 Troubles
          Rothrock Level 5

          Can't really understand what you need. Your post doesn't really explain it.


          And you are asking volunteers to go somewhere else, check something out, understand it and give you directions. You will probably get more help if you are more clear about what you want to do and what problem you are having.


          You want to click the about button and make "this" happen? What is this?


          And if you have been able to make something happen when you click the about button, and if what you want to happen is similar to that, then what is the problem doing it again?

          • 2. Re: Flash PRO CS5 Troubles
            funguygordy Level 1

            To clarify:


            I have a movieclip that will make "this" happen. ie the sliding presentation that I want. What I need is the ability to link that movieclip to a clickable button.

            I am not asking someone to google answers for me, because I have done that and come up with nothing. I am looking for someone who knows how to make an animation occur after clicking a specified button.  http://http://www.youtube.com/watch?v=TeBPvQIamBA&feature=relmfu  <-- this link seems to have the general idea, I haven't had success with it yet but it is only a matter of time i suppose.

            • 3. Re: Flash PRO CS5 Troubles
              Rothrock Level 5

              Is your button an instance of SimpleButton or a MovieClip/Sprite with buttonMode? Do you know how to use an event listener?


              If your button has an instance name of myButton and the animated clip has an instance name of myAnimationMovie then something like this:




              function handleClick(e:MouseEvent){




              Of course if things are inside of various other movies or clips then the paths will change.


              Is that what you mean?

              1 person found this helpful
              • 4. Re: Flash PRO CS5 Troubles
                funguygordy Level 1

                The guide I recently found and mentioned earlier goes over event listeners.  I think that will work, cannot try it out at the moment. There is an image instance of the button, a movie instance of the button (making it glow/blur when clicked), and a button instance.  I think I have got it, will post back after I get a chance.

                • 5. Re: Flash PRO CS5 Troubles
                  funguygordy Level 1


                  I have been unable to test the event listener so far.  I have all of the animations(images sliding) on the main timeline, and I have them divided into sections for each button along with a home section that has everything in its' normal spot.  I created a layer named actions and inserted a stop(); at the end of each section.  When I test the scene the entire timeline continually loops instead of stopping at the home section.  any idea?



                  I tried putting:




                  function buttonClick(event:MouseEvent);void{



                  about.enabled = true;

                  projects.enabled = true;

                  gallery.enabled = true;

                  contact.enabled = true;


                  event.target.enabled = false;


                  about.addEventListener(MouseEvent.CLICK, buttonClick);

                  projects.addEventListener(MouseEvent.CLICK, buttonClick);

                  gallery.addEventListener(MouseEvent.CLICK, buttonClick);

                  contact.addEventListener(MouseEvent.CLICK, buttonClick);



                  in a keyframe in the actions layer at frame 1...but no luck.

                  • 6. Re: Flash PRO CS5 Troubles
                    Rothrock Level 5

                    In what manner is there "no luck"? There is generally one way that works and millions that don't. Narrowing down what kind of don't is very helpful for getting to yes.


                    Now would be the time to add some trace statements to see what might be happening.


                    So inside your button click function add a line like this:


                    trace("Clicked on: "+e.target.name);


                    Also look at what you are telling the playhead to do:




                    Given the screenshot you show here, is there anything about the words gotoAndStop() that seems like it might not be what you want?


                    As for the looping I have no idea what could be causing that. If you have a stop in that actions keyframe at 3 or 4 it should stop. When you say test the scene do you mean you publish it or are you only pressing enter to make the timeline play?


                    Also when you say "scene" are you actually using scenes? If you are using code (especially code that moves the playhead around) you shouldn't use scenes. They can/will mess you up at some point.


                    Finally looking at your timeline I can't figure out where the buttons are. There aren't any layers that look like they run across all the frames. So in that case you are likely to have many different instances of the buttons and the code might not be available to the button when it needs it and/or vice versa.

                    • 7. Re: Flash PRO CS5 Troubles
                      funguygordy Level 1

                      I. Saying no luck I just meant that the several guides and posts I have

                      looked through have not worked for my particular project. I am out of town

                      till tonight so I will try in a few hours. I have been working from scene1,

                      and the "buttons" are indeed I stances of the text that is below each photo.

                      They also have a movie instance.