Jump to content
Search Community

Problem with onComplete option - can't move to next frame

vital test
Moderator Tag

Go to solution Solved by vital,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello!

 

I'm creating a banner using Flash CC HTML5 canvas.

What I do is adding animation code to each frame. After it completes I want the next frame to be played.

 

I included two libs into the HTML file:

  • EasePack.min.js
  • TweenLite.min.js

 

So at the current frame I am writing the following code (source file: test7.zip ):

this.stop();

TweenLite.to(this.target, 1.35, {delay: 0.1, y: 180, ease:Elastic.easeInOut, onComplete: pplay } );


function pplay(){    

    this.play();
    window.alert('123');
    
};

The frame is animated but it stops at the end instead of going to next frame. At this time the alert works, but I can not skip it - it's like a loop function.

 

How can I get to the next frame?

 

 

P.S. Previously I worked with greensock AS2 at Flash CS 6 - everything worked perfect.

 

Best regards, Vital

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...