Copy link to clipboard
Copied
Hi,
I'm trying to call in a text box from a button. It's working fine but I want to experiment with different easing but can't find a list of easing options in the code snippets.
This is what I've got so far. I just would like the movement to be a bit "slicker".
import fl.transitions.Tween;
import fl.transitions.easing.None;
text_btn.addEventListener(MouseEvent.CLICK,clickF);
var tween:Tween;
function clickF(e:MouseEvent):void{
tween = new Tween(textbox1, "y", Strong.easeOut, textbox1.y, 0, 0.8, true); // define destinationX. if you want to tween the y property use another Tween()
}
The text box drops down like a brick. I'd like something a bit smoother if poss.
Thanks.
I had this:
import fl.transitions.Tween;
import fl.transitions.easing.None;
When I should of had:
import fl.transitions.*;
import fl.transitions.easing.*;
It's working fine now.
Thanks.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/transitions/easing/Bounce.html
Copy link to clipboard
Copied
All there in the manual...
fl.transitions.easing - Adobe ActionScript® 3 (AS3) API Reference
Copy link to clipboard
Copied
Thanks.
I've just tried that like this:
function clickF(e:MouseEvent):void{
tween = new Tween(textbox1, "y", Bounce.easeIn, textbox1.y, 0, 0.8, true); // define destinationX. if you want to tween the y property use another Tween()
}
So replacing Strong.easeOut, with Bounce.easeIn
But I'm getting this in the compiler: 1120 Access of undefined property Bounce
I'm obviously doing something wrong???
Copy link to clipboard
Copied
Did you import the Bounce class?
Copy link to clipboard
Copied
I had this:
import fl.transitions.Tween;
import fl.transitions.easing.None;
When I should of had:
import fl.transitions.*;
import fl.transitions.easing.*;
It's working fine now.
Thanks.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/transitions/easing/Bounce.html