tags:

views:

469

answers:

2

Hi, I have an xml code something like this

<root>
<render>
 <head>
<transition id="fadeIn" type="fade" subtype="" dur="3s"/>
<transition id="fadeOut" type="fade" subtype="" dur="3s"/>
<layout>
  <root-layout width="480px" height="360px" backgroundColor="0"/>
  <region id="rootRegion" dur="15s">
    <region id="background" soundLevel="100%" top="0px" left="0px"   width="480px"          height="360px" z-index="0"/>
    <region id="foreground" soundLevel="100%" top="0%" left="0%" width="480px" height="360px" z-index="1"/>
  </region>
</layout>
</head>
<body>
<par region="background" begin="0s">
  <img>
    <meta name="assetsource" content="stock"/>
    <src>http://s3.amazonaws.com/JivoxStockImage/000003296736.jpg&lt;/src&gt;
    <width>102.49999999999999%</width>
    <height>97.5%</height>
    <left>0%</left>
    <top>0%</top>
    <clipBegin/>
    <clipEnd/>
    <begin>0s</begin>
    <dur>15</dur>
  </img>
  <audio>
    <meta name="assetsource" content="stock"/>
    <src>http://audio.mp3&lt;/src&gt;
    <clipBegin/>
    <clipEnd/>
    <begin>0s</begin>
    <dur>15s</dur>
  </audio>
</par>
<par region="foreground" begin="0s">
  <img>
    <meta name="assettype" content="user"/>
    <src>http://image.png&lt;/src&gt;
    <width>20%</width>
    <height>20%</height>
    <left>41.5%</left>
    <top>25.555555555555557%</top>
    <begin>2s</begin>
    <dur>10s</dur>
    <id>BA6B7CF0BD9080CAD7A02199483224EA61A6E08A</id>
  </img>
  </par>
  </body>
 </render>

<form>

<map formId="BA6B7CF0BD9080CAD7A02199483224EA61A6E08A" type="image" label="Logo" />  
<map formId="F635A9123082A15834389030382683C55EB29E75" type="text" label="Company Name" />


</form>
</root>

Here I need to match formId in 'form' with that of 'id' in 'render' and create the form dynamically in flex.

I am able to get the xml file via the httpservice. All I need to know is how to match it and render the form dynamically!!

A: 

You are using the terms rather loosely here, what exactly is the "form" you are intending to dynamically create in Flex?

Boon
Its a form for the respective video that I am playing. That form needs to be filled. The fields for that form are provided based on the ids. So i need to match the id and generate the form. Did this help?
A: 

If i am not wrong, you have the ID's and you need it to match with form ID's which is again dynamic and form will have elements based on the ID's.

My Questions:

  1. Why don't you create the entire form without using any ID's to match. You can directly create the entire form with elements by parsing an XML file.

Let me know if you are looking at this solution or something else, before i spend more wee on this.