Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var gfx:MovieClip = new a_Character(); //(a library object exported for Actionscript)
- var do1:DisplayObject = null;
- var do2:DisplayObject = null;
- for( var i:int = 0 ; i < gfx.amSword.numChildren ; i++ )
- {
- var child:DisplayObject = gfx.amSword.getChildAt(i);
- if( child.name == "amWeaponExchange" ) //An instance name set in the IDE
- {
- do2 = child;
- }
- }
- trace("do2:", do2 );
- var do1:DisplayObject = gfx.amSword.getChildByName("amWeaponExchange");
- do2: [object MovieClip]
- ReferenceError: Error #1069: Property amWeaponExchange not found on builtin.as$0.MethodClosure and there is no default value.
- var do1:DisplayObject = gfx.amSword.getChildByName["amWeaponExchange"];
- ReferenceError: Error #1069: Property amWeaponExchange not found on builtin.as$0.MethodClosure and there is no default value.
- var do1:DisplayObject = gfx.amSword.getChildByName("amWeaponExchange");
Add Comment
Please, Sign In to add comment