PDA

View Full Version : Is it possible to turn a variables value into movie clip?


madcat
01-30-2009, 08:05 PM
Basically, I'm just looking for a yes or no.

If I have a dynamic textfield that rotates through the numbers 1 - 10, and I want smooth, tweened transitions between the numbers, would I first have to turn each number into a movieclip and tween, or can I turn a number sitting into a variable to a movieclip and then tween based on that text or number?

Maybe I should just think of variables as things to store information.

CyanBlue
01-30-2009, 08:08 PM
MovieClip with the Tween idea would work well... ;)

madcat
01-30-2009, 08:19 PM
Right, I guess I was just thinking if you had to count from 1 to 1,000 and tween through each number, do you have to make 1,000 movie clips and then apply a tween to each...

...or is there a way to dynamically create the number (like you can dynamically create shapes) and then turn those into movie clips and do your transitions.

Just trying to get a grasp for terms.

CyanBlue
01-30-2009, 08:26 PM
Just on top of my head, I'd create the numbers into the movieClips and tween them...

How fast is the transition happening between the numbers??? If it is happening fast enough, you could just have Flash write '1', '2', '3' and so on into the same textField and be done with it???

madcat
01-30-2009, 08:32 PM
Just on top of my head, I'd create the numbers into the movieClips and tween them...

You'd create them dynamically? I guess that's pretty much what I mean, how can I dynamically generate the numbers 1 - 1,000 and turn each one into a movie clip at the same time. That way, I can tween each movie clip in any manner I need...

I can do that with sprites for example, but not with numbers.

This is not a real-world project, this is just so I understand how things work. As you can see I'm still a bit confused on the basics :)

CyanBlue
01-30-2009, 09:10 PM
What I was saying was...

Create 0 to 1 in the library as movieClip...
Add them to the stage according to the number you need to create, 0 for example...
Add the next one, 1, to the stage, but make it to be alpha 0...
Tween the '0' from 1 to 0 on alpha to disappear, and have '1' go from 0 to 1 to appear on the stage...
Once '0' become alpha 0, remove it from the stage...
Loop through that till wherever your ending number is...

madcat
01-30-2009, 09:14 PM
I think I know what you mean, I'll look at it this weekend --

Thanks much for your help!

CyanBlue
01-30-2009, 09:21 PM
You're welcome... ;)

BTW, I am not Japanese... :)

madcat
01-30-2009, 09:24 PM
lol, it's kind of like a catch-all ;)

CyanBlue
01-31-2009, 06:35 PM
Well... That definitely is not a catch-all... You are missing Korean and Klingon... ;)