[thelist] Laying out components in Flash

Marcus Andersson marcus at bristav.se
Tue May 18 14:44:48 CDT 2004


First, I'm pretty new on Flash so go easy on me.

I'm trying to do the following in Flash:

Load an XML file of the form:

<application name="An Application" description="etc" ...>
   <toolbar .../>
   <content>
     <panel layout="column" name="panelTest">
       <column>
         <textfield label="The label" name="aTextfield" .../>
         <textfield label="Another field" name="anotherField" .../>
       </column>
       ... more columns etc...
     </panel>
   </content>
</application>

I have mostly figured out how to get the XML from the server and do the tree-walking and have also figured out 
how to create instances of components on-the-fly. The problem comes when I want to lay out the components.

I need a way to position components relative to other components (the way you mostly do in HTML) and also 
inside parent containers (a la divs) which would result in that if you move the container you also move it's 
children. I should also say that it must be possible to do this from script (if possible). Is it possible or 
do I have to do some layout manager stuff (a la layout managers in Java)? All I seem to be able to do is 
position the components absolute :(

Any help/pointers is much appreciated.

Regards,

/Marcus


More information about the thelist mailing list