Flash 中非文档类的目标 MovieClip
有没有办法从不是文档类的外部类中定位 MovieClip?
将文档类作为主视图和视图是否正确?
is there any way to target a MovieClip from an external class that's NOT the Document Class?
Is it correct to have the Document Class as Main AND View?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以从属于项目一部分的任何类访问 MovieClip。如果MovieClip是手动放置在舞台上的,您只需给它一个实例名称。
如果要动态创建实例,请确保在 MovieClip 的属性中选择“导出为 Actionscript”,并在 (AS3) 项目中使用它:
添加第二个类以显示文档类中的列表:
将 MovieClip 添加到显示列表中第二类:
You can access a MovieClip from any class that is part of the project. If the MovieClip is manually placed on the stage, you just need to give it an instance name.
If you want to dynamically create an instance, make sure 'Export for Actionscript' is selected in the MovieClip's properties and use this in your (AS3) project:
Add second class to display list from the doc class:
Add MovieClip to display list in the second class: