About addFrameScript

#1

There are two modification suggestions of MovieClip.addFrameScript

  • It should allow putting into more than two parameters.
mc.addFrameScript(0,()=>mc.stop(),10, ()=>mc.stop());
  • It should be available when the animation is not playing.

:grimacing:

0 Likes

#2

addFrameScript is a hidden Flash Player API that I think only accepts two parameters, so more would break Flash Player compatibility (but it may not be an issue for the NPM release)

What do you mean when you say that it should be available when the animation is not playing? When would the scripts fire if it is not playing?

Thanks :slight_smile:

0 Likes

#3

Maybe it doesn’t work with gotoAndStop?

0 Likes

#4
mc.stop();
mc.addFrameScript(1,()=>console.log('hello'));
mc.nextFrame();
// should call console.log

:grimacing:

I tried to modify the source code, but I find that will have a great impact on the original code structure, so I think maybe it’s time to rebuild the source code of MovieClip. :rofl:

0 Likes