Learn Flash Part 10
- Started
- Last post
- 10 Responses
- madino
I have been looking for a tutorial on loading text. I want to load each character... Basicly I want to learn how http://www.group94.com loads their text.
Any help would be appreciated. And thankyou for those who have helped me in the past. I am learning a lot.
- jpea0
i'm fairly sure that they don't load their text one character at a time.
looks like they use a mask to "uncover" the text.
- gabe0
you can either use a mask (terdious) -- or -- put your text in a variable and loop an MC that changs text._length
i don't have flash on this computer, but this looks right: http://www.flashkit.com/movies/E…
- gabe0
tedious i mean, not terdious
- madino0
i am not sure how they do it, but if you watch closely, the text moves in one character at a time and removes a faded version of the old text one character at a time.
but who knows... I am in a serious learning mode right now. So, i would love to understand anything cool...
- TIOIS0
i like terdious
- unfittoprint0
no mask.
a simple text constructor, where they take a text string, split each character into an Array [myArray = myString.split("")], then 'loop it back' again [using a setInterval, for example].
And you should make your textBox.autosize="left"
- madino0
unfit...you are my new flash god.
thanks Gabe for the link
- madino0
UNFIT?
Could you or someone tell me which is better and why? or Why I used one over the other.
The difference between an enterframe loop and using setinterval.
I have rewritten the same code for the link I sent you using enterframe. Just to see if I could do it.
But I don't know why to use one over the other.
- unfittoprint0
setInterval is much more versatile, and it's OOP [Object Oriented programming]. You can control its loop speed, independently of framerate, because its driven by time.
It can loop only specific functions intead of a whole movieclip, if u want, it can include multiple parameters, specific of the funcions being 'looped'.
onEnterFrame is considered by many [including Colin Moock, writer of the essential O'Reilly Actionscript Definitive Guide] an 'ugly' way to deal with dynamic loops, less versatile and constrained to the Stage framerate.
- madino0
i understand.
I am not a programer, so this is a lot of fun for me.
I wanted to see if I could rewrite the scaler script using enterframe. It seems to work fine. http://www.madino.com/onenterfra…
But I will go with what you said about setinterval and use the other one.