FLASH MX 2004 - typewritereffect/buttons

FLASH MX 2004 - typewritereffect/buttons

Hello,

Does somebody know how to use the typewriter effect with buttons. By clicking a button a text should start ‘typewriting’. Each button has another text.

I’ve got this code to get the text shown inside the textfield (but there is no typewrite effect yet) in frame 1 of the _root

_root.MCWorld.usa_btn.onPress = function() {
_root.country_txt.text = “Your departure: United States of America”;
}
_root.MCWorld.spain_btn.onPress = function() {
_root.country_txt.text = “Your departure: Spain”;
}
_root.MCWorld.uk_btn.onPress = function() {
_root.country_txt.text = “Your departure: United Kingdom”;
}

Maybe somebody knows how i can have less AS so that the function onPress is written only once for all the countrybuttons?

Thanx