12 Replies Latest reply on Feb 14, 2013 4:48 AM by NewR4581

    Animation Help

    NewR4581

      Hello, I am trying to find a solution for the following on the animation I am working on.

      http://www.lancastersc.biz/

       

      When you mouse over an area the center content show up but I can't find a solution so it return to the home image, the phone and building, or the initial state, any help would be appreciated.

        • 1. Re: Animation Help
          Ned Murphy Adobe Community Professional & MVP

          What is the problem you are trying to solve?  Are you saying you want it to return to the original center part when you move the mouse away?  What code are you using for what you have now?

          • 2. Re: Animation Help
            NewR4581 Level 1

            Yes Murphy, that is what I want. I need it to return to the home image once the User mouse out. The circle pie is a design with six button and each button call the their external .swf that show in the middle, here is the code for one buttons, they are all the same, the only different is the url change, I don't know how to do so when you mouse out it return to the first image or index image

             

            Here is the code:

             

            on (rollOver)

            {

                contenido1.onEnterFrame = function ()

                {

                    if (this._currentframe != 70)

                    {

                        this.nextFrame();

                    }

                    else

                    {

                        this.stop();

                        delete this.onEnterFrame;

                    } // end else if

                };

            }

            on (rollOut)

            {

                contenido1.onEnterFrame = function ()

                {

                    if (this._currentframe != 1)

                    {

                        this.prevFrame();

                    }

                    else

                    {

                        this.stop();

                        delete this.onEnterFrame;

                    } // end else if

                };

            }

            on (rollOver)

            {

                loadMovieNum("c1.swf", 1);

            }

            on (release)

            {

                getURL("http://www.lancasterscworks.com", _blank);

            }

            • 3. Re: Animation Help
              Ned Murphy Adobe Community Professional & MVP

              If you are using loadMovieNum to load each different rollover image, then you need to use unloadMovieNum(1) to remove it when you rollout.  If the home page image is also an externally loaded piece, another option could be to loadMovieNum the home page section for every rollout so that it replaces the current rollover image..

              1 person found this helpful
              • 4. Re: Animation Help
                NewR4581 Level 1

                I'm really new at flash. It's not my forte, how do i write this code, can you help me out? I would really appreciate it.

                • 5. Re: Animation Help
                  Ned Murphy Adobe Community Professional & MVP

                  I can't really help without more information about how you've designed this relative to the home image showing.  If it is also dynamically added then you would probably only need to use...

                   

                  on (rollOut)

                  {

                      loadMovieNum("home.swf", 1);

                  }

                   

                  where home.swf is the name of whatever file you use for the home image that appears.

                   

                  If the home image is a permanent fixture in the design and is not loaded dynamically, then you probably only need to use...

                   

                   

                  on (rollOut)

                  {

                      unloadMovieNum(1);

                  }

                  • 6. Re: Animation Help
                    NewR4581 Level 1

                    Thank you Ned, I got it working. Appreciate your help.

                    • 7. Re: Animation Help
                      Ned Murphy Adobe Community Professional & MVP

                      You're welcome

                      • 8. Re: Animation Help
                        NewR4581 Level 1

                        I have one more question, if you take a look at the govemment entities, I need that one a little different, when you mouse over show the center those are logos with 4 link, when you mouse over return to home but how can i do to keep the mouse over a little timed so it show the link and you can click and go to their websites?

                        • 9. Re: Animation Help
                          Ned Murphy Adobe Community Professional & MVP

                          If you want to delay the unloading then you can use the setTimeout() function.  If you are not familiar with it, try searching Google using terms like "AS2 setTimeout tutorial"

                          1 person found this helpful
                          • 10. Re: Animation Help
                            NewR4581 Level 1

                            I can get this to work or figure out how, having some issues, is there a way you can maybe show me where to put the code for that button?

                            • 11. Re: Animation Help
                              Ned Murphy Adobe Community Professional & MVP

                              You would put the setTimeout call in the rollout function and it would end up calling a function that you place on the timeline.  So on the button you could put...

                               

                              on(rollOut){

                                   var sto = setTimeout(unloadGov, 2000);

                              }

                               

                              which will give a 2 second delay (2000 msecs) before it calls the unloadGov function that you will place in the timeline.

                               

                              Since I don't know which approach you took for changing the images back, hopefully you can make it match what you did for the others...

                               

                              function unloadGov(){

                                   unloadMovieNum(1);

                              }

                              1 person found this helpful
                              • 12. Re: Animation Help
                                NewR4581 Level 1

                                This works perfectly...

                                 

                                I also need another tip. I have another button that you mouse over and show an image with a button on the middle, when I click the button and want the Fancybox popup windowload, do I put that code on the flash and html or just one source?

                                 

                                Have you done anything like that click a section of the flash an a popup opens?