Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
icraft-websites

Assigning variable to Tween Object

Recommended Posts

Hey there. 

 

In my Project I use allot of Tweens. At a specific point it wish to reset all current tweens excluding a select few. I wish to store a variable on these Tween to exclude so when resetting all the current tweens these can be tracked an avoided. I've tried this sofar but when assigning the failed tag SStimer return undefined. Yet I can access this tween when using TweenMax.getAllTweens()[index]. Am i Missing something major here? 

           trigger.SStimer = new TimelineMax({delay: 180})
            .call(function () {
                console.log('Slow selection fired');
                delete this
            });


            trigger.SSTimer.failedTag = true;
 
Link to post
Share on other sites

Sorry, but I'm having difficulty understanding your problem and how the code you provided relates. 

I believe a simple CodePen demo would be very helpful: http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/

 

You mentioned flagging tweens but you seem to be trying to assign a variable to a timeline.

 

I believe you should be ok adding a custom data object to your tween like

 

var t = TweenLite.to("h2", 3, {x:200, data:{isSafe:true}});

console.log("isSafe = " + t.vars.data.isSafe);
  • Like 2
Link to post
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.

×