如何向现有 Flash 应用程序添加缩放功能?

发布于 2024-09-24 18:47:25 字数 623 浏览 0 评论 0原文

我有一个 Flash 应用程序,其中包含一个场景、三个帧和一堆 ActionScript 代码,以提供许多ExternalInterface 挂钩。这三个框架包含一个输入文本框,当使用 JavaScript 调整 标签的大小时,该输入文本框会增大和缩小(而不是缩放)以适应。

我现在想要添加放大/缩小此应用程序的功能,以便在不增加文本点大小的情况下放大屏幕上的小文本。我认为使用 Flash 对象的 Javascript Zoom(percent) 方法会很容易,但这不起作用,因为我的 ActionScript 代码包含:

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

我怀疑我需要按照我的方式拍摄整部电影现在,并将其放入影片剪辑中,添加一个缩放ExternalInterface调用,以某种方式缩放影片剪辑,并将我现在拥有的外部接口方法从新的影片剪辑外部移动到舞台......但这听起来像是一个接近完整的过程改写?这个方法还能用吗?有更好的办法吗?

如果我能以任何方式澄清这个问题,请提问!我是 JavaScript 专家,不是 Flash 专家! :-)

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

み青杉依旧 2024-10-01 18:47:25

我认为您需要一个 vcam:

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

它基本上是一个可调整的矩形,仅显示其边界内的内容。您可以将其放大或缩小以放大和缩小。您只需连接一个 actionListener 即可使其根据滚轮事件或某些按钮按下进行缩放。

如果您需要更多帮助,请告诉我。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文