有没有一种方式来加载外部SWF到Flash沙盒?加载、方式、SWF、Flash

2023-09-08 14:54:17 作者:把眼泪咽下去

我装在我的所有Flash网站与装载机Flash广告,横幅。我在code无法控制的标语里面,因为他们都来自广告。

I'm loading flash ad-banners inside my all flash site with Loader. I have no control over the code inside the banners as they come from advertisers.

我想加载它们,这样是没有办法,他们可以搞砸了自己的有限区域以外网站上的鼠标事件。对广告商的旗帜马虎code不应该杀死在任何情况下我的网站的功能。

I'd like to load them so that there is no way they can mess up the mouse events on the site outside their limited area. Sloppy code on advertisers banner should not kill my site's functionality in any situation.

奖金的问题,如何解决所造成的横幅是一个不同的帧速率比我的主网站的问题? (或者是有一个简单的方法来绘制当前动画转换成我的帧速率,同时保持动画的速度和以前一样?)

Bonus question, how can I solve the problems caused by the banners being a different frame rate than my main site? (Or is there an easy way to convert currently drawn animations into my frame rate while keeping the animation speed same as before?)

必须有谁处理了这些问题之前的人。

There must be people who have dealt with these issues before.

什么是做到这一点的最好方法是什么?

What's the best way to do this?

谢谢!

推荐答案

在加载外部SWF,确保它加载到一个独立的安全域,到子应用程序域。它不会是这种方式能访问阶段鼠标和键盘事件(以及某些其他),并且不会有任何类定义冲突。

When you load the external swf, make sure it's loaded into a separate Security domain and into a child application domain. That way it won't be able to access stage Mouse and Keyboard events (and certain others), and there won't be any class definition conflicts.

看看这个文件:发展和装载子应用