View Full Version : How to give instance names to accordion children?
MIXPOSURE
10-31-2007, 11:51 PM
Hi,
I need to target a list item that is nested within a mc which loads into an accordion component at runtime. The problem is that the clip is not given an instance name when loaded from the library so I am unable to target it with accordionMC.myListBox. I tried using it's linkage identifier but no go. Any help?
Thanks much.
Scuba_Steve
12-05-2007, 06:30 PM
hoping to find an answer to this too... I've got an accordion whose children are created at runtime based on an XML file...
i know the linkage identifier of the MC in the library that is loaded into each child, and i have a textArea component inside that MC, but i can't seem to add any text to the textArea once the children are created. driving me insane.
darkzak
12-05-2007, 07:11 PM
If you are creating the children using code then the instance name is the second parameter:
myAccordion.createChild(linkage_name, instance_name);
For example if I have a movieclip in the library with linkage name "textbox_mc" which contains a textbox with instance name "txt". I can set the text for the text box like this
myAccordion.createChild("textbox_mc","newTextbox_mc");
myAccordion.newTextbox_mc.txt.text = "New Text"
If you are setting the children through the properties panel then childNames are the instance names.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.