5 Replies Latest reply on May 11, 2013 2:39 PM by kglad

    How to trigger motion preset code (with a mouseClick)?

    paul_james123 Level 1

      Hi All,

      I'm a novice at Flash and would greatly appreciate help here. I"m using Flash cs5.5.

       

      I would like to use a motion preset (2d zoom)  in my movie...but I want it to be triggered by a mouse click. (I don't want the zooming to begin when the movie starts, which is what happens when you just apply the preset to the movie clip on the stage).

       

      I'm probably being incredibly simplistic here but I copied the 2d Zoom motion preset's code (by right clicking on a timeline tween and choosing 'copy motion as actionscript 3.0') and then pasted it into the function that is called by the click event in my action script (making the changes in the code recommended by the help file so that it works with my movie). This doesn't make the movie clip zoom on click...oddly, it even makes the movie clip invisible.

       

      Here is my test movie: http://home.comcast.net/~samiri/director/flashQuestion/testZoom.fla

      When you click on the black shape, the brain image should become visible and zoom in.

       

      But the brain image doesn't appear or zoom. (When I comment out the zoom motion preset code in the script, the brain appears when you click on the black shape. Not sure why just putting that code in the 'function zoomIn()' code should keep the brain from appearing when it shouldn't run until a click occurs.)

       

      Anyways, this seems like a simple thing but I'm not doing it right. Thanks for any help you can offer.

      Paul

      pfortier@bigbendhc.org