0 Replies Latest reply on Oct 18, 2007 9:57 AM by thellersREM

    Components inside components (Flash 8)

    thellersREM
      Hi,

      I have an Accordion component which needs to contain a number of small forms, each of which is built as a MovieClip containing TextInput, Button, ComboBox, etc.

      So, I build my little forms in Flash, make them into MovieClips, give them a linkage identifier and assign them the AS2 class "mx.core.View", as the documentation says.

      Then I use ActionScript to attach these to my Accordion control, using my_accordion.createChild(). OK, fine. Works nicely.

      The problem is that in the next few lines of code I also want to be able to populate the TextInput and ComboBox components which reside inside my accordion. I can't do it. Trying to do so fails silently. Tracing out the path to the Components shows that they are "there", but if i put some content into, say, one of the TextInputs up-front (i.e. in the Properties panel inside Flash) and then try to trace... my_acc.my_form.my_textInput.text... i get undefined.

      So, it looks like the components inside the form inside the Accordion aren't yet "initialised" when I am trying to get/set their values. I've seen similar behaviour before, but it's not clear in the documentation how to get around it.

      Anyone help? What is the correct way to use components inside components like this? I don't want to have to call a second function or put any code on the timeline or anything like that!

      Many thanks,

      Andy