You are on page 1of 2

Zoom In & Zoom Out Step 1: Import image to stage and give the instance name as controlme.

Step 2: Import 3 new buttons for zoom-in, Zoom-out, and reset and convert them into buttons. Step 3: Select zoom-in button press f9 and it opens the actionscript window. Step 4: Copy the following code there.
on (press) { _root.controlme._xscale = _root.controlme._xscale + 4; _root.controlme._yscale = _root.controlme._yscale + 4; } on (release, releaseOutside) { _root.StoredActions.gotoAndStop(1); }

Step 5: Select Zoom-out button and open action script window. Copy the code there.
on (press) { //_root.StoredActions.gotoAndPlay("decrease"); _root.controlme._xscale = _root.controlme._xscale - 5; _root.controlme._yscale = _root.controlme._yscale - 5; } on (release, releaseOutside) { _root.StoredActions.gotoAndStop(1); }

Step 6: Select reset button and copy the code there.


on (press) { controlme._width = 100; controlme._height = 100; controlme._x = 10; controlme._y = 10; }

Now run the application it works.

Hope this will be helpful to many of us. Good luck, For more details click http://www.sumudra.com zoom tool: http://www.sumudra.com/tutorials/drag/zoom.rar

You might also like