5 Replies Latest reply on Feb 26, 2011 1:47 PM by kglad

    Making a zoomable comic

    undesignuk

      Hi,

       

      I am trying to make a comic by putting the comic in a movie clip called graphic_novel (also the instance name) but I want to have individual thumbnails in the comic zoomable so that if you hover over them then you get a further zoom into each thumbnail of the comic.

       

      So far I have the following actionscript on the main comic which also has a motion tween between frame 1 and 20 so that it zooms in or out over that amount of frames.

       

      The zoom works fine but I have tried numerous methods of creating invisible movie clip buttons over the individual thumbnails and tried to add similar actionscript to make a further zoom. Basically I want to navigate around the comic using zoom in zoom out.

       

      Any ideas?

       

      // whenever player enters frame, perform the actions between the curly brackets

       

      onClipEvent (load){

       

      _root.graphic_novel.onEnterFrame = function(){

       

      // if our zoom is "true", then previous frame (rewind)

      if(zoom == true){

      _root.graphic_novel.prevFrame();

      }

      }

       

       

      }

       

       

      // when mouse is over this symbol, perform the actions between the curly brackets

      onClipEvent (load){

       

       

      _root.graphic_novel.onRollOver = function(){

       

      // sets zoom as false, contradicting our "if" statement above, so it plays our clip

      zoom = false;

      play();

      }

       

       

      }

      // when mouse is not over this symbol, perform the actions between the curly bracktes

       

       

       

      onClipEvent (load){

       

       

      _root.graphic_novel.onRollOut = function(){

       

      // sets zoom as true thus meeting the requirements of our "if" statement above

      // so it goes to the previous frame of our movie clip

      zoom = true;

      }

       

      }

        • 1. Re: Making a zoomable comic
          kglad Adobe Community Professional & MVP

          remove code from objects and delete those onClipEvent(load) lines.   then use the trace() function to see if you're detecting a rollover.

          • 2. Re: Making a zoomable comic
            undesignuk Level 1

            Thanks for your reply. The whole comic movie clip (called graphic_novel) with an instance name graphic_novel is working fine with that code above. It zooms in and out over 20 frames. The problem is when I add another movie clip on a separate layer of (as indicated by the slightly green button over the top of the policeman), I want it to zoom further to that clip and then I intend to set up all the individual thumbnails so that you can view them all in detail.

            I tried the following code on the green button (see below image) its doing something just not what I want it to do.

             

             

            Screen shot_as2_comic.png

             

             

             

             

            // when mouse is over this symbol, perform the actions between the curly brackets

            onClipEvent (load){

             

             

            _root.graphic_novel.onRollOver = function(){

             

            // sets zoom as false, contradicting our "if" statement above, so it plays our clip

            zoom = false;

            _root.graphic_novel.gotoAndPlay(21);

            }

             

             

            }

            // when mouse is not over this symbol, perform the actions between the curly bracktes

             

             

             

            onClipEvent (load){

             

             

            _root.graphic_novel.onRollOut = function(){

             

            // sets zoom as true thus meeting the requirements of our "if" statement above

            // so it goes to the previous frame of our movie clip

            zoom = true;

            }

             

            }

            • 3. Re: Making a zoomable comic
              kglad Adobe Community Professional & MVP

              again, remove code from objects and delete those onClipEvent(load) lines.    then use the trace() function to see if you're detecting a rollover.

              • 4. Re: Making a zoomable comic
                undesignuk Level 1

                Hi

                 

                Thanks for your reply,

                 

                Just to be clear. Do you mean delete the code from the object (object action) and make it a frame action but also delete the onClipEvent (Load) lines then add a trace to see if anything is output when you roll over.

                 

                thanks

                • 5. Re: Making a zoomable comic
                  kglad Adobe Community Professional & MVP

                   

                  Just to be clear. Do you mean delete the code from the object (object action)

                  yes

                   

                  and make it a frame action

                  yes

                   

                  but also delete the onClipEvent (Load) lines

                  yes

                   

                  then add a trace to see if anything is output when you roll over.

                  yes