views:

34

answers:

1

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 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! :-)

+1  A: 

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.

thedayturns
Wow that was FAST, thanks @thedayturns. I am so frustrated by this project at the moment that I am quitting for the day. I'll look at this tomorrow!
Josh