Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-24 Thread Rich Rainbolt
Unsubscribe Remove On Oct 19, 2007, at 8:35 PM, keith wrote: Is there a reason you can't access the Sprite with the variable you first created? cont.visible=false; -- Keith H -- Alistair Colling wrote: Hiya everyone, good to see the list back up and running. I'm trying to access a

Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-24 Thread Rich Rainbolt
Unsubscribe Remove On Oct 19, 2007, at 9:30 PM, Troy Rollins wrote: On Oct 19, 2007, at 10:05 AM, Alistair Colling wrote: var cont:Sprite = new Sprite(); this.addChild(cont); var cont1:Sprite = new Sprite(); cont.addChild(cont1); var child1:Sprite = new H1(); var target

Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-23 Thread [EMAIL PROTECTED]
sending again because my first post didn't seem to get through. sorry if this is a double post... -- hi alistair, you are confusing variable names with instance names. they're not the same thing. when you do this: var cont1:Sprite = new Sprite(); cont.addChild(cont1); you

Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-23 Thread Troy Rollins
On Oct 19, 2007, at 11:35 PM, keith wrote: Is there a reason you can't access the Sprite with the variable you first created? cont.visible=false; I think the OP was using the code as an example, but that creation and modification would take place at two different times in actual

Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-21 Thread keith
Is there a reason you can't access the Sprite with the variable you first created? cont.visible=false; -- Keith H -- Alistair Colling wrote: Hiya everyone, good to see the list back up and running. I'm trying to access a sprite that is inside of 2 other sprites and I have 2 questions

Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-21 Thread Troy Rollins
On Oct 19, 2007, at 10:05 AM, Alistair Colling wrote: var cont:Sprite = new Sprite(); this.addChild(cont); var cont1:Sprite = new Sprite(); cont.addChild(cont1); var child1:Sprite = new H1(); var target =cont.getChildByName(cont1); var targ2 = target.getChildByName(child1); targ2._visible

Re: [Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-21 Thread [EMAIL PROTECTED]
hi alistair, you are confusing variable names with instance names. they're not the same thing. when you do this: var cont1:Sprite = new Sprite(); cont.addChild(cont1); you are not naming the sprite cont1, you are simply assigning the variable cont1 a reference to the new Sprite. so you

[Flashcoders] Short syntax for accessing nested display objects? (AS3)

2007-10-19 Thread Alistair Colling
Hiya everyone, good to see the list back up and running. I'm trying to access a sprite that is inside of 2 other sprites and I have 2 questions about this: 1) It seems that the syntax for targeting this sprite once it is created is quite long winded (2 temporary vars have to be created):