开发者

How can I add a zoom feature to my existing Flash application?

I have a Flash application with one scene, three frames and a bunch of ActionScript code to provide a number of ExternalInterface hooks. The three frames contain a single Input Text box which, as the <embed> tag is resized using JavaScript, grows and shrinks (not scales) to fit.

I now want to add the ability to zoom in/out of this application, for enlarging small text on screen without increasing the text point size. I thought this would be easy using the Javascript Zoom(percent) method of the Flash object, but this doesn't work because my ActionScript code contains:

Stage.align = "TL";
Stage.scaleMode = "noScale";

I suspect I need to take the entire movie as I have it now, and put it inside a movie clip, add a zoom ExternalInterface call which somehow scales the movieClip, and move the External Inteterface methods I开发者_Go百科 have now from the new Movie Clip outside to the stage... but this sounds like a near complete rewrite? Will this method even work? Is there a better way?

If I can clarify the question in any way, please ask! I'm a JavaScript expert not a Flash expert! :-)


I think that you want a vcam:

http://bryanheisey.com/blog/?p=1

It's basically an adjustable rectangle that only displays to screen what's inside of its boundaries. You can make it larger or smaller in order to zoom in and out. You could just wire up an actionListener to make it scale based on a scroll wheel event or some button press.

If you need more help, just let me know.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜