6 Replies Latest reply on Apr 4, 2011 4:52 AM by robdillon

    a question based on classroom in a book cs5????

    donnym2010

      So i am new to flash and wanted to learn so i went and bought the classroom in a book for flash cs5 to self teach my self and well in chapter 6 it has you create a navagation menu. This menu has four boxes you can hover over and click ( i completed the whole lesson so its ready to go) and well when you go to test (command + enter) the flash movie plays but it plays on a custom loop over and over. I went to the top and went under control and deselected loop and it still does it and or it stops but then nothing is clickable.. what gives?? the lesson had me design the menu so you are able to hover over and have a box appear and then when you click it makes a sound and then after you click a new window pops up with info about that particular button and well when you test it it loops through at the blink of an eye and none of the buttons work and it just plays like a movie. I can email the file to get some answers but i just need some help so please if you have read this book or have the book you may know what i am talking about.

       

      Thanks

        • 1. Re: a question based on classroom in a book cs5????
          robdillon Most Valuable Participant

          This sounds like there is a compiler error. Do you see a window with one or more error listings?

          • 2. Re: a question based on classroom in a book cs5????
            donnym2010 Level 1

            when I am in the actions window and hit the check mark it makes a ding sound and says no errors but then when i run the video to test i do see errors that pop up but everything seems to look fine. I am new to this so i am not sure but I followed the steps word for word and triple checked it but  I am new to flash so i may have missed something or hit something that i shouldn't have...  i just spent an hour and a half on hold with adobe and the call got dropped and I am back on hold once again..

            • 3. Re: a question based on classroom in a book cs5????
              robdillon Most Valuable Participant

              Those errors are important. If they are compiler errors, they will usually direct you to a particular line of code. Output errors are usually less precise, but are still useful. Can you copy and paste them here?

              1 person found this helpful
              • 4. Re: a question based on classroom in a book cs5????
                Miss8rightside

                Hi, I am also experiencing the same issue. The code that's inserted in frame 1 (actions) appears as follows:

                 

                stop();

                gabelloffel_btn.addEventListener(MouseEvent.CLICK, restaurant1);
                function restaurant1(event:MousEvent):void
                {
                gotoAndStop("label1");
                }
                garygari_btn.addEventListener(MouseEvent.CLICK, restaurant2);
                function restaurant2(event:MousEvent):void
                {
                gotoAndStop("label2");
                }
                ilpiatto_btn.addEventListener(MouseEvent.CLICK, restaurant3);
                function restaurant3(event:MousEvent):void
                {
                gotoAndStop("label3");
                }
                pierreplatters_btn.addEventListener(MouseEvent.CLICK, restaurant4);
                function restaurant4(event:MousEvent):void
                {
                gotoAndStop("label4");
                }
                /* Click to Go to Frame and Stop
                Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and stops the movie.
                Can be used on the main timeline or on movie clip timelines.

                Instructions:
                1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
                */

                movieClip_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

                function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void
                {
                gotoAndStop(1);
                }

                 

                When you test the movie, the following errors appear:

                 

                Scene 1, Layer 'actions', Frame 1, Line 4 1046: Type was not found or was not  a compile-time constant: MouseEvent.

                • 5. Re: a question based on classroom in a book cs5????
                  robdillon Most Valuable Participant

                  There is a typo in the supplied code! In of the functions, for instance:

                   

                  function restaurant1(event:MousEvent):void

                   

                  The word MouseEvent is misspelled "MousEvent".

                   

                  Change the spelling and the code should work correctly.

                  1 person found this helpful
                  • 6. Re: a question based on classroom in a book cs5????
                    Miss8rightside Level 1

                    Hi Rob,

                     

                    Thank you so much for spotting that. I checked it three times and somehow managed to miss it. I shall give it go.

                     

                    Many thanks!

                     

                    Bethan