Groups | Blog | Home
all groups > flash actionscript > january 2007 >

flash actionscript : Understanding Symbol/Instance hierarchy relationships



DMennenoh **AdobeCommunityExpert**
1/13/2007 11:10:22 AM
[quoted text, click to view]
name of "instHeader".

Then you just want to do: instHeader.text = "blabla";

The first name you gave it - symHeader is just the clips name in the
library. When you actually take the clip from the library and place it on
the stage - then you are creating an instance of that clip.

HTH


--
Dave -
Head Developer
www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Scott Johnson
1/13/2007 12:05:43 PM
That makes sense, thanks for your help.

[quoted text, click to view]
Perseus101
1/13/2007 4:08:24 PM
Hello

I am looking for some insight into the symbol/instance hierarchy.

First off what I have done simple enough is create a dynamic text field and
convert it to a symbol.

This symbol has an instance name of "symHeader".

I then dragged an instance of that symbol to the stage and gave it an instance
name of "instHeader".

I was having problems populating it with what seemed like a logical approach:

symHeader.instHeader.text = "blabla";

with no luck.

In looking at the object list in debug, it occurred to me that it should be:

instHeader.symHeader.text = "blabla".

This seems sort of backwards in the hierarchy of things.

I figured since instHeader was and instance of symHeader, symHeader would be
the first item listed, then drill down to instHeader.

Can someone familiar with the symbol/instance hierarchy explain why this is
this way, maybe I need to look at this in a different way.

Thanks
Scotty

Shan-Dysigns
1/13/2007 8:44:45 PM
It's easiest to think about it as if you are at the main timeline looking at
the stage - follow the instance name(s) as you double click on the symbols
until you get to the symbol you are trying to control with AS.

Like reading your addess to someone in AS - to tell someone your zip code, you
would have to say something like:

myName.myAddress.myCity.myState.myZip = "79109"
Scott Johnson
1/13/2007 10:02:27 PM
So I am basically controlling the symbol through the instance with the
instance being the wrapper.

[quoted text, click to view]
AddThis Social Bookmark Button