Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 114192

Re: Typewriter effect skip to end

$
0
0

Oh thank you, this helped a lot. For the code I used

 

button.addEventListener(MouseEvent.CLICK, stops);

function stops(e:MouseEvent)

{

mytimer.stop();

 

T1.text = myString;

if (mytimer.stop){mySoundChannel.stop();}

}

 

and it works great, but I seem to be having a little bug. When the button is clicked my text "jumps" up by a whole line. It seems that the code that holds the text is in fact not starting at the very start of the text box but one line below it. I've been poking around but I'm unsure what's causing this gap. Is there a way fix this or have when the button is clicked the text jump down by one line?

 

Edit: I know I can make it by doing

 

T1.text = "\nTexthere"

 

But there has to be a better way somewhere.


Viewing all articles
Browse latest Browse all 114192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>