views:

198

answers:

2

When playing a flash movie in a browser, we can right-click on stage and zoom in.

can we also code these as functions in our actionscript-3 file? like automatically zooming onto the stage at a particular point? can we do it when some key is pressed?

A: 

if you decrease a display objects z property it will move closer to the 'camera' effectively zooming it. To zoom into a particular position you'll have to move its x and y properties as well. Other than the legacy supported 'zoom in' on the right click menu there's no auto zoom functionality in flash.

greg
thanks. I was trying to have the screen scroll effect for a platform game using this functionality. It would be really helpful for programmers instead of coding it separately. I think adobe should add this functionality through actionscript.
NIRBHAY
this only works on flash 10
unkiwii
A: 

You can also use a Matrix to do this, here's a simple example

just_a_dude
nice. but this doesn't zoom-in (or out) on stage. it does on a different DisplayObject
unkiwii