Jump to content
Search Community

clearProps not work

bevial test
Moderator Tag

Recommended Posts

Please help.

I am trying to clear properties on a tween and/or timeline.

But no matter what or where i use it, it wont clear the properties.


menuToSlideAnimate[k] = new TimelineLite({paused:true});

menuToSlideAnimate[k].set(productSlide[k], {visible:true});
menuToSlideAnimate[k].set(productSlide[k], {scaleX: 0.7, scaleY: 0.7, alpha:0});
menuToSlideAnimate[k].to(list_mask[iList][jList], 0.5,
{
x:0,
y:0
},
0
);
menuToSlideAnimate[k].to(list[iList][jList], 0.5,
{
x:0,
y:0
},
0
);
menuToSlideAnimate[k].to(list_mask[iList][jList], 1,
{
ease: Power2.easeIn,
width: 1024+200,
height: 768+200
},
0
);
menuToSlideAnimate[k].to(list[iList][jList], 1,
{
ease: Power2.easeIn,
width: 1024+200,
height: 768+200
},
0
);
menuToSlideAnimate[k].fromTo(menu, 0.3,
{
alpha: 1
},
{
alpha: 0
},
"-=0.3"
);
menuToSlideAnimate[k].set(menu, {visible:false});
menuToSlideAnimate[k].to(productSlide[k], 0.3,
{
scaleX: 1,
scaleY: 1,
alpha: 1
},
"-=0.3"
);
menuToSlideAnimate[k].fromTo(menuSmall, 0.5 ,{y:828}, {y:708});


menuToSlideAnimate[k].eventCallback("onComplete", function(){

trace("x: "+list[iList][jList].x);

TweenMax.set(list[iList][jList], {clearProps:'all'});
TweenLite.set(list[iList][jList], {clearProps:'all'});
menuToSlideAnimate[k].set(list[iList][jList], {clearProps:'all'});

trace("clear x: "+list[iList][jList].x);
}

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

It seems you may have stumbled into the HTML5 / JavaScript documentation for GSAP.

clearProps is a special value only recognized by our CSSPlugin as a way to clear inline styles on DOM elements.

There isn't a clearProps equivalent in flash.

 

In ActionScript will need to use set() and pass in the values you want set. 

 

Just so you know we moved away from our Flash / ActionScript tools a few years ago. Our sole focus is on HTML5 / JavaScript now in response to very strong market demand. 

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