Hi I just wanted to know what would be the simplist way to do a trypwriter affect because I think that would really impress my boss, I want to impress her cos then I can ask her out on a date, please help!!
Place a textfield onn stage. Give an instance name of textfield_txt. Set it to dinamic, multiline. Now place these actionson 1st frame:[AS]myText = “your text goes here”;
this.onEnterFrame = function() {
textfield_txt.text = myText.substr(0, type);
type += 1;
};
[/AS]
hey man, when u say you need to put a textfield on the screen what do u mean by that, and when u’ve put ’ put ur text here’ is that the text that i want the affect to be on?Sorry for the stupid questions I am a bit of a beginner at this!
Select the text tool. Make a texfield on stage with the text tool. On properties, set type to dynamic and line type to multiline. Now on your timeline, select 1st frame. Hit F9 to open Actions panel. Paste the code i provided. Replace “your text goes here” with the text you want to typewrite.
Dats it.
Hey man, not to worry, thanks for the advice, u must be a real pro at this stuff, respect to u!!
*Originally posted by bigbadmilkman *
**Hey man, not to worry, thanks for the advice, u must be a real pro at this stuff, respect to u!! **
I wish!
Hey man, say if I wanted a lot of text rather than just a couple of words, would I use the same method, or is there a better method?
Do the same. Although u may want to speed up a little by increasing the fps of your movie or incresing the value of the variable type.
Hey Claudio I really appreciate ur help, i have another minor problem, i typrwriter affect is working fine, but just before the typwriter affect happens, the block of text appears for a flash second and then the typewriter affect happens, do u know why this might be happening ?
Ok, use this code:[AS]myText="";
this.onEnterFrame = function() {
textfield_txt.text = myText.substr(0, type);
type += 1;
myText = “your text goes here”;
};[/AS] Should do the trick :-\
Oh man, that works a treat, hey another question, I am probably bugging the hell out of u, but when i put the text in, when the typriter affect happens, it after each line, it leaves 1 blank line, this takes up too much space, how do i delete these empty lines?
don’t worry I have sorted it out!!Man I owe you one, thanks a lot man!!
You’re welcome