Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
LeClou

condition "if" don't work

Go to solution Solved by LeClou,

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

Ok. How about this. Check what you want to play. Same concept.

See the Pen 423cc82d16d8bfd8ef186c9f87ee7f38?editors=001 by osublake (@osublake) on CodePen

 

Arrays are your friend, allowing you to do some serious chaining to build dynamic timelines.

Filter: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter

Map: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map

Reduce: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce

 

And here's another demo I made earlier today showing reduce...

See the Pen 9f89e2986656748b11dab1a5d1f54564?editors=001 by osublake (@osublake) on CodePen

  • Like 3
Link to comment
Share on other sites

  • Solution

I had try it whit a second master timeline but it was not working because of the error i done whit the return fonction.

but now it is working good. 

 

function master1(){
sessionStorage.removeItem("abeille");
var timeline = new TimelineMax({repeat:0, delay:5});
timeline.add(act1())
.add(act1a())
.seek(11);
}
 
function monster(){
if(sesSto1==1){
master1();
}
else{master();}
}
monster();

 

 

Thank you every body.

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.
×