开发者

Actions on timeline frames using baseclass in actionscript

I have fla file with a movieclip. The movieclip has a baseclass where some actions are performed. This fla is exported as an swc. What I want is to be able to add actions to the movieclip from it's base 开发者_如何学Pythonclass, without having to do it like onEnterFrame.

Ideas?


There's an undocumented method within MovieClip called addFrameScript which will do exactly that:

myMc.addFrameScript(2, myFunction);

function myFunction() {
   trace("this is the 3rd frame");
}

(the frame number is zero based instead of one based like gotoAndPlay's)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜