I am trying to create a movie clip where I have a dynamic text with a default caption "Sound '#'".I am trying to make it dynamic and the character '#' should be replaced with any alphabets. I am trying to read the text in the dynamic text and I am replacing the letter with another letter using the replace function in Action Script 3.0. When I used trace to check, the letters are replaced but it is not displaying in the flash stage. To my surprise it only displayes the uppercase letters. Here is the code..
var myPattern:RegExp = /#/g;
myTxt = myTxt.replace(myPattern,"w");
trace(myTxt); // displays the expected output in the output panel
movieclip1.myTxt.text=myTxt;
trace(movieclip1.myTxt.text); // displays the expected output in the output panel
But when I test the movie the replayed letter is missing. Any ideas?
Thanks, H
ok I got it. I opened the properties panel and clicked on embed fonts options and checked :All glyphs under character ranges and it worked. But I am not sure what it exactly does and why do we need that.