AS3 SWC组件创建库实例
如果有人能帮助我解决以下问题,我将不胜感激。
我想知道 Flash 创作阶段的 AS3 组件是否可以实例化当前文档 (fla) 库中的图像,并在实时预览期间将它们显示在舞台上的组件中。
为了澄清这一设想,如果您要创建一个新的 fla,请将 Adobe UILoader 组件放置在舞台上,当您设置源(在本例中为 fla 库中的图像)时,它将在 UILoader 中显示该图像。当然 UILoader 不会发生这种情况,但这就是我想要实现的目标。
我知道可以在实时预览期间从外部源进行图像的 URL 加载,但我正在寻找的是加载当前文档的库资源。
任何帮助将不胜感激。
I would greatly appreciate it if anyone could help me with the following question.
I would like to know if it is possible for an AS3 component on the flash authoring stage to instantiate images from the current document (fla)'s library and display them in the component on the stage during Live Preview.
To clarify this imagine if you were to create a new fla, place the Adobe UILoader component on the stage and when you set the source (which in this case would be an image from the fla library) it would show the image in the UILoader. This does not happen with the UILoader of course but that is what I am trying to achieve.
I know that one can do URL loading of images from an external source during Live Preview but what I am looking for is loading of the current document's library resources.
Any assistance would be greatly and deeply appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用 UILoader.loadbytes(yourBitmapDataAsByteArray);
您应该能够使用 loadBytes() 函数让它加载图像。
首先让你成像一个字节数组。
Try using UILoader.loadbytes(yourBitmapDataAsByteArray);
You should be able to get it to load the image using the loadBytes() function.
First make you image a bytearray.