PDA

View Full Version : changing the easing on a tree component


TimDiacon
07-19-2005, 10:16 AM
Hello there,

I'm trying to alter the openEase on a a tree component in a document. I only have one tree component and so am just using global styles here is my code.


import mx.styles.CSSStyleDeclaration;
if (_global.styles.Tree == undefined) {
_global.styles.Tree = new CSSStyleDeclaration();
}
_global.styles.Tree.setStyle("openEasing", Elastic.easeOut);


However it isn't working?

TimDiacon
07-19-2005, 10:44 AM
OK I've worked it out. I wasn't importing the easing transitions. The following code applied to the clip itself works if anyone is interested.


on(load){
import mx.transitions.easing.*;
this.setStyle("openDuration", 2000);
this.setStyle("openEasing", Elastic.easeOut);
}



Cheers.