5 Replies Latest reply on Aug 12, 2009 1:40 PM by Ned Murphy

    Animated Comic (Play SWF on MouseOver)

    RexxEdge Level 1

      Don't use Flash very often these days and I am sure this is going to be an easy question for most of you, but so far my google-fu has not helped me get a straight tutorial for my application.  I have an idea to make a webcomic that is also animated.  The way I want to do this is by having the page laid out with regular images, but when the viewer puts his mouse over one of the panels, it would begin to animate a loop loaded from an external SWF file.  When the viewer removes his mouse from the panel, it goes back to the original JPEG of the image.


      My problem is that I am not sure how to start.  I think I got the script down to load the SWF into the master SWF dynamically, but all my attempts to add a loop on MouseOver have been failing me with errors.  I am attempting to make sense of AC3 but figured I could get a little head start from the masters around here.


      Any other advice would be appreciated, if anyone has done something similar with better a better application, I would love to hear it.  Thank you.

        • 1. Re: Animated Comic (Play SWF on MouseOver)
          Ned Murphy Adobe Community Professional & MVP

          What is the nature of the swf animation that you are loading, and what do you mean when you mention looping?


          What code have you tried as far as loading the swf goes?  What code in addition to that have you attempted to use to manipulate the loaded swf?

          • 2. Re: Animated Comic (Play SWF on MouseOver)
            RexxEdge Level 1

            Will attempt my best to clarify.


            So first I make a SWF using images I animated in After Effects.  The SWF is set to loop over and over forever.  So, an example is let's say I animate 30 frames of a ball bouncing between two walls.  It will start at the left wall, fly over to the right wall, bounce off, return to the left wall, then once it hits frame 30 it will go back to frame 1 and the SWF will repeat.  This will happen forever if I load the SWF the normal way in Flash Player.


            Now, I want to make a "comic" SWF in which I load up a bunch of JPEGs, adjust them and design them to be a comic with panels, word bubbles, etc...  Now I want it so that when I hover my mouse over one of the panels, the JPEG will be overriden by the SWF I made above.  Thus, the JPEG of just the ball sitting on one of the walls will suddenly come to life and start animating right there inside the panel.


            As for the code, I don't have the system in front of me at this time as I am out of the house.  I wrote this in the hopes I would get some information before returning to that project once I get home.  I will say though that I was using LoadMovie() action for getting the SWF loaded by replacing the movie symbol that has the JPEG.  I can't seem to get this to occur on a MouseOver.


            Wish I had more information.

            • 3. Re: Animated Comic (Play SWF on MouseOver)
              Ned Murphy Adobe Community Professional & MVP

              Your best bet might be to make those swfs/animations provide both the jpeg and the mouseover functionality... meaning have them normally stopped at frame1--providing the static jpeg-like condition effect, and build the button function into them such that onRollOver they play(), looping back using gotoAndPlay(2), and onRollOut they gotoAndStop(1);, returning to the jpeg-like condition.  This way, you won't have to deal with trying to control them from the main file as loaded movieclips.

              1 person found this helpful
              • 4. Re: Animated Comic (Play SWF on MouseOver)
                RexxEdge Level 1

                Interesting.  Really is seems obvious now that you mention using the SWF as both the static image and the animation!  Really shows my inexperience these days.  I think this will correct my problem, even though I will be unable to test it till later I am going to mark this as solved.  Thank you again for the help, I greatly appreciate it.

                • 5. Re: Animated Comic (Play SWF on MouseOver)
                  Ned Murphy Adobe Community Professional & MVP

                  You're welcome