Hi
I have a strange problem that i can not solve. I googled i checked this forum and actionscript.org but i can not find solution to my problem. Here it is:
I my main swf i load preloader swf that contains two layers on time line. First layer is gradient shape and second layer is dynamic text field with instance name preloaderTxt that i am trying to access. Well i load it with sucess and in event complete i have this code:
preloader = new Sprite();
preloader = Sprite(loader.content);
preloaderHolder = new Sprite();
stage.addChild(preloaderHolder);
preloaderHolder.addChild(preloader);
I tryed this:
trace(preloader.getChildAt(1));
trace(preloader.getChildAt(1).name);
First trace is: [object TextField]
Second trace is: preloaderTxt
But when i try to set its text property like this:
preloader.getChildAt(1).text = "test"
i get this error: 1119: Access of possibly undefined property text through a reference with static type
flash.display:DisplayObject.
What am i doing wrong?
Tnx
Luka