views:

409

answers:

1

Be aware that I might be doing this totally wrong, so I apologize in advance.

I have mxml thingy, for example:

    <mx:VBox id="isThisVBoxAwesomeOrWhat" width="500" height="500"
    backgroundImage="@Embed('images/500x500.jpg')" verticalAlign="bottom" 
    includeInLayout="false"
    blendMode="{BlendMode.ERASE}"
    x="-1000"
    y="-1000">

    <mx:VBox width="500" height="80" borderStyle="applicationControlBar" horizontalScrollPolicy="off" verticalScrollPolicy="off" styleName="Gradient">
        <mx:Text id="Title" width="500" text="{loremTitle}" height="30" styleName="CompNaslov"/>
        <mx:Text id="CompText" width="500" text="{loremIpsum}" height="40" styleName="CompText"/>           
    </mx:VBox>

</mx:VBox>

So, I have a Vbox names isThisVBoxAwesomeOrWhat that contains another VBox that containst two text fields.

Now, further in the code I make a plane out of it so I can make a 3D object out of it, here is the snippet:

[for i in totalPlanes]
...

var material:MovieMaterial = new MovieMaterial(isThisVBoxAwesomeOrWhat, true, true, true); 
...
plane = new Plane(material, isThisVBoxAwesomeOrWhat.width, isThisVBoxAwesomeOrWhat.height, 10, 10);
...
linkedList.append(plane);
...
basicView.scene.addChild(plane);

So now I have my scene filled with planes made out of VBox composite as I wanted. I also have those planes in a linkedList, and what I would like to do now is to "SOMEHOW" access each individual VBox and it's composites for each individual plane.

Something like this (obviously doesn't work! Just an example):

linkedList.node.data.VBox.VBox.Text[0]

so I could modify parameters on the fly. Or maybe I'm totally wrong on this and I should have as many Vbox'en as I have planes and id each individually. Whatever the case I can't figure out how to access children of the parent in this mxml example. Trivial, I know.

+1  A: 

You can access the VBox in the Plane with:

(plane.material as MovieMaterial).movie as VBox.

viatropos
I just need a bit more help. How can I access properties of that VBox or its children and their properties with this? Thanks. nm, I just cached it into a var of type VBox. Thanks!
Keyframe