本文介绍了AS3:从装载机获取图像最佳实践()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用装载机加载图像,什么是preferred方式将图像添加到显示列表?在拼抢中的数据引发Event.COMPLETE处理如新的位图(位图(的LoaderInfo(e.target).content).bitmapData),或添加Loader实例本身?

When loading images using Loader, what's the preferred way to add the image to the display list? Grabbing the data in an Event.COMPLETE handler like new Bitmap( Bitmap(LoaderInfo(e.target).content).bitmapData ) , or adding the Loader instance itself?

推荐答案

如果你只是想显示加载的内容,然后随意装载程序添加到列表中,而不是将其内容提取。这是当你需要reparent一个加载的内容的罕见情况。

If you only want to display the Loader's content, then feel free to add the Loader to the display list rather than extracting its contents. It's an uncommon situation when you'll need to reparent a Loader's content.

此外,值得一提的是,一个装载机的内容并不总是访问。例如,Flash播放器放置其他域加载的内容的安全限制。当执行这些更强的安全规则,Flash Player将引发安全错误在运行时,如果您尝试访问加载器的内容。

Additionally, it's worth noting that a Loader's content will not always be accessible. For instance, Flash Player places security restrictions on content loaded from other domains. When these stronger security rules are enforced, Flash Player throws security errors at runtime if you try to access the Loader's content.

这篇关于AS3:从装载机获取图像最佳实践()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 13:14