Reputation: 67
When I run the code below I receive the following error:
Scene 1, Layer 'Library', Frame 1, Line 12 1119: Access of possibly undefined property fl_name through a reference with static type flash.display:DisplayObject.
How can I fix it?
09. mc_library.getChildByName("folder_"+(1)).x=189,00;
10. mc_library.getChildByName("folder_"+(1)).y=485,55;
11. mc_library.getChildByName("folder_"+(1)).visible=true;
12. mc_library.getChildByName("folder_"+(1)).fl_name.text='Something';
http://puu.sh/6QSWi.png - image on folder_1 (The digits in the beginning of every line are the numbers of the lines)
Upvotes: 0
Views: 250
Reputation: 15213
Try to convert it to a MovieClip:
MovieClip(mc_library.getChildByName("folder_"+(1))).fl_name.text
Upvotes: 1