I have a movieclip with a dynamic TextField in it, it has the text "Software part" in it by default. In the class of this movieclip I have the following code:
package {
import flash.display.MovieClip;
import flash.text.TextField;
public class soft_4 extends MovieClip {
public static var software_part_4_text:TextField;
public static var software_part_4_text_bg:String;
public static var software_part_4_text_tu:String;
public static var software_part_4_text_li:String;
public static var software_part_4_text_de:String;
public function soft_4() {
// constructor code
software_part_4_text_bg = "Софтуерна част";
software_part_4_text_de = "Software-Teil";
software_part_4_text_tu = "Yazılım bölümü";
software_part_4_text_li = "Programinės įrangos dalis";
software_part_4_text = software_part_4;
software_part_4_text.selectable = false;
}
}
}
I have an instance of this class in my Main class and depending on a button press, the strings in the TextField are changed like so:
soft_4.software_part_4_text.text = soft_4.software_part_4_text_de;
For instance that changes the text in the TextField to be in German. It works for the first instance of this class (for example: public var firstInstance:soft_4 = new soft_4()) that I have on stage BUT the second instance (for example: public var secondInstance:soft_4 = new soft_4()) has the default text which is "Software part".
I've embedded the font that I am using in the text field.