如何从库中添加一个影片剪辑到舞台编程?库中、影片剪辑、舞台

由网友(ㄢ” 虚情假意)分享简介:我想知道如何从库中添加一个影片剪辑到舞台上编程。 I am wondering how to add a MovieClip from the library onto the stage programmatically. 我怎么会去这样做?推荐答案符号可以定义的动作联动的。AS连接可以通过右击从库中的元件和...

我想知道如何从库中添加一个影片剪辑到舞台上编程。

I am wondering how to add a MovieClip from the library onto the stage programmatically.

我怎么会去这样做?

推荐答案

符号可以定义的动作联动的。

AS连接可以通过右击从库中的元件和选择的属性设置... 的

AS Linkage may be set by right-clicking a symbol from the library and selecting Properties...

检查的为ActionScript导出的,然后输入一个类名。

Check Export for ActionScript and enter a Class name.

如果您不需要明确定义超越了符号类型的基类,你可以输入链接直接从库:

If you don't need to explicitly define a base class beyond the symbol type, you can enter AS Linkage directly from the Library:

这将创建一个类定义比,如果你写了一个ActionScript类没有什么不同。

This creates a class definition no different than if you had written an ActionScript class.

通过实例化您的AS联动类型的新实例创建实例:

Create instances by instantiating new instances of your AS Linkage type:

var symbolExample:SymbolExample = new SymbolExample();
addChild(symbolExample);
阅读全文

相关推荐

最新文章