Jump to content
Search Community

Flash CC HTML5 canvas' elements are not reseting GSAP properties while replay

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 HTML5 project using Flash CC HTML5 canvas.

 

What I do is adding animation code to each frame. After all frames passed the banner loops and I want it to have exact animation as at the first playing. But all instances are loosing their original position and properties. I need all the stage elements to reset just as it is at regular flash projects.

 

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

 

Best regards, Vital

banner_test (3).zip

Link to comment
Share on other sites

Sorry, this seemed like a duplicate of your other post (or atleast very similar)

 

http://greensock.com/forums/topic/12556-problem-with-oncomplete-option-cant-move-to-next-frame/

 

Also, marking your posts as "answered" means we don't need to look at them ;)

 

I looked at your zip, but without an fla I really don't know what's going on.

This seems like it has more to do with how CreateJS works than what TweenLite is doing. 

 

I'm pretty sure that's the way CreateJS works.

Remove your TweenLite / GSAP code and just do something really simple like

 

on frame1 place a clip called mc at x = 0;

 

on frame2 add code that says:

this.mc.x = 300

 

on frame10 add code that loops back to frame 0:

this.play(0);

 

when it loops back to frame 0 mc will still be at x:300

  • Like 1
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...