• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Tween easing

Explorer ,
Jun 06, 2017 Jun 06, 2017

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.

Views

219

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jun 06, 2017 Jun 06, 2017

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

Votes

Translate

Translate
LEGEND ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 06, 2017 Jun 06, 2017

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???

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

Did you import the Bounce class?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines