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

Change Text as it's Moving in Tween?

New Here ,
Mar 01, 2017 Mar 01, 2017

(Very new to Animate. Still learning)

I have a box with text in it that says 10. I have both the box and the text in the same layer moving in a classic tween. I would like to be able to edit the number as it is moving (9...8...7... etc)

I tried converting to frame-by-frame. Then changing a later frame to 9. However this changes all frames in the frame-by-frame span to be 9. When I change the text, it isolates the text (everything else grays out) and my timeline switches to only one layer (not sure why?)

Any help is appreciated!

1.6K
Translate
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

Advocate , Mar 01, 2017 Mar 01, 2017

You need to use keyframes to avoid changing things on every frame.

You can double click a symbol to edit its contents and create nested animations.

Here, I set up a quick example for you to play with; hopefully this helps make things clearer for you: Dropbox - nested_counting

Translate
Community Expert ,
Mar 01, 2017 Mar 01, 2017

either:

use actionscript to tween your textfield and change its text property or

timeline tween the textfield with one number on one layer and timeline tween it on another layer with the 2nd number

Translate
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
New Here ,
Mar 01, 2017 Mar 01, 2017

Thanks for the quick reply. In regards to your second suggestion, would I have to create a layer for every number I wanted to include? I want it to switch around from 10 through 1.

Why can't I just edit the value in frame-by-frame?

Thanks!

Translate
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 ,
Mar 01, 2017 Mar 01, 2017

if you have anything other than 1 or 2 number change/motion tweens it would be impractical to use the timeline.

use actionscript:

var myTween:Tween = new Tween(tf, "x", Elastic.easeOut, 0, 300, 13, true);

tf.text = 'hi';

var t:Timer = new Timer(1500,1);

t.addEventListener(TimerEvent.TIMER,timerF);

t.start()

function timerF(e:TimerEvent):void{

tf.text = 'bye'

}

Translate
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
Advocate ,
Mar 01, 2017 Mar 01, 2017

You can create nested animations by converting your text to a movieclip or graphic symbol.  Within that symbol, create a keyframe for each different number (or any other animation you want to add) and you should get the results you want.

If you're still having issues, it would be helpful to see a demo fla file to help troubleshoot.

Translate
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
New Here ,
Mar 01, 2017 Mar 01, 2017

I sort of resolved it in a messy way. Thanks just.emma

I created a symbol, 10. Then moved it with the box and then created blank keyframe and new symbol 9 and put it in the center of the square and moved it with the box again. rinse repeat. Kind of shocked there isn't a simpler way of doing this (without needing to get into actionscript) Thanks kglad​ but I just don't want to put in the effort to learn actionscript (I probably won't be doing this often)

Translate
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
Advocate ,
Mar 01, 2017 Mar 01, 2017

I think you're misunderstanding/overcomplicating things a bit. 

You can change/animate the numbers inside of the symbol, and you only need one tween in the main/parent timeline to move the symbol that contains the changing numbers.

Translate
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
New Here ,
Mar 01, 2017 Mar 01, 2017

When I do that, it changes the number for the number in all frames. Start with 10, a few frames later I edit it to 9, now all frames before it are 9 too. I think I might be misunderstanding your suggestion? Could you elaborate? What do you mean by "inside the symbol"?

Translate
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
Advocate ,
Mar 01, 2017 Mar 01, 2017

You need to use keyframes to avoid changing things on every frame.

You can double click a symbol to edit its contents and create nested animations.

Here, I set up a quick example for you to play with; hopefully this helps make things clearer for you: Dropbox - nested_counting

Translate
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
New Here ,
Mar 01, 2017 Mar 01, 2017
LATEST

Okay great that worked for me. Thank you! (didn't realize what the double click was doing. Now I know that it's clear)

Translate
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