Skip to main content
Participant
November 3, 2009
Question

CS4 : AS3 : How do I access a Global Instance?

  • November 3, 2009
  • 1 reply
  • 769 views

When I created a Symbol in a Scene, I gave it an Instance Name.  How do I access it later on from within an objected added to the Scene.  The only stuff I've found is for AS2.0

Thanks

This topic has been closed for replies.

1 reply

Inspiring
November 3, 2009

You're going to have to give a little more detail. "Accessing it" could mean a whole lot of things. Can you explain what you're trying to accomplish?

dvdrgodsAuthor
Participant
November 3, 2009

basically, I'm trying to test collision against it.  My avatar was defined as a instance within the Symbol properties.  Now I have bullets that are created dynamically and I need to test against the avatar.

Inspiring
November 3, 2009

Use getChildByName( "INSTANCE_NAME" ). This method return a dispay object so you must cast the result to right type like MovieClip();