开发者

Referencing a Document Class from a child MovieClip

I have a document class with a child MovieClip on the stage. I have the clip already on the stage because it's part of an complex layout provided by the designer and it seems easier to leave it on the stage than to use addChild (since I would have to add about 60 objects).

What is the best way to reference the document开发者_运维技巧 class from inside the child MovieClip class?


You can use MovieClip(root) to access your document class, provided that the swf is not being loaded into another swf.

So if you have on your documentclass some function myFunction(), in your child movieclip you can call MovieClip(root).myFunction()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜