Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Frame scripts cannot be added to empty keyframes. #62

Closed
kburke3 opened this issue Nov 29, 2017 · 1 comment
Closed

Warning: Frame scripts cannot be added to empty keyframes. #62

kburke3 opened this issue Nov 29, 2017 · 1 comment

Comments

@kburke3
Copy link

kburke3 commented Nov 29, 2017

Hi,
I'm using this.stop() from my timeline in an empty layer. I get an error on export from Adobe Animate:
Warning: Frame scripts cannot be added to empty keyframes. (Layer: 0)

From a desktop web browser, the this.stop() calls work. When I load my Pixi Animate animation in an Android Web View, however, the this.stop() calls are ignored. What would be the best practice for adding a script to a MovieClip?

To prevent the MovieClips from reseting to the first frame upon completion, I added the following. It still does not allow me to stop the timeline from the MovieClip's timeline.

mc.autoReset = false;

Any help would be tremendous. Thanks!

@bigtimebuddy
Copy link
Member

Yes, you cannot add frame scripts on empty keyframes. It's a limitation of the SDK for Adobe Animate, these frame scripts are ignored. You need to add something on the frame, even if it's an invisible graphic.

Try console.log in your frame script to see if it's being called. PixiAnimate by default drops frames on lower performing devices, which might be causing the frame to be skipped. I'm working on a new major release which will make frame-dropping opt-in instead of automatically used.

As a workaround, I'd strongly suggest you use PIXI.animate.Animator API http://jiborobot.github.io/pixi-animate/PIXI.animate.Animator.html

This will allow you to play sequences of your animation by spanning between frame numbers or frame labels. Much easier to control your choreography this way than frame labels.

@kburke3 kburke3 closed this as completed Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants