2012-02-23 26 views
0

可能重复:
currentFrame of root timeline from inside object
In flash with as3.0, I have to call a function on the main stage from a movieClipAS3调用方法,从影片剪辑中

我已经在我的场景的框架此方法:

function toggleStreaming():void { //something }

,我希望能够从movieClip中调用该方法,我如何指向该方法?

+0

@MartyWallace不要让编辑这样的,因为我们要回滚他们的旗帜被复制。 – casperOne 2012-02-29 13:40:33

+0

@casperOne不知道你的意思,但没有probs ... – Marty 2012-03-01 23:33:24

+0

@MartyWallace你在问题中放置[[重复标题]横幅](http://stackoverflow.com/revisions/9421641/3)。如果/当关闭时它会自动放置在那里。 – casperOne 2012-03-01 23:47:09

回答

2

假设包含该函数的框架是主时间轴,你可以使用:

MovieClip(root).toggleStreaming();