# Can we use "user defined templates" in flash and load data from xml in it accordingly

**URL:** <https://forum.kirupa.com/t/can-we-use-user-defined-templates-in-flash-and-load-data-from-xml-in-it-accordingly/297073>\
**Category:** flash\
**Created:** [September 25, 2009, 7:33am UTC](https://forum.kirupa.com/t/can-we-use-user-defined-templates-in-flash-and-load-data-from-xml-in-it-accordingly/297073 "2009-09-25T07:33:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Linka](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@Linka](https://forum.kirupa.com/u/Linka)\
**Post date:** [September 25, 2009, 7:33am UTC](https://forum.kirupa.com/t/can-we-use-user-defined-templates-in-flash-and-load-data-from-xml-in-it-accordingly/297073/1 "2009-09-25T07:33:16Z")

</div>

Here is the basic structure of my xml code:

[COLOR=blue]\<Screen [COLOR=red]TemplateType[/COLOR]=""\>  
\<Content Delay=""\>  
\<Text Delay=""\>\</Text\>  
\<Audio Delay=""\>  
\<Script\>\</Script\>  
\<Filename\>\</Filename\>  
\</Audio\>  
\<Image Delay=""\>  
\<Description\>\</Description\>  
\<Filename\>\</Filename\>  
\<Caption\>\</Caption\>  
\</Image\>  
\</Content\>  
\</Screen\>[/COLOR]

[COLOR=black]Now what i want to do is, [/COLOR]  
[COLOR=black]1. create some templates in Flash CS3 [/COLOR][COLOR=teal]\<!–i want to learn --\>[/COLOR]  
[COLOR=black]2. use actionscript 2.0 for coding [/COLOR][COLOR=teal]\<!–i m working on it but help would be appreciated–\>[/COLOR]  
[COLOR=black]3. read nodes from xml [/COLOR][COLOR=teal]\<!-- i know how to do this --\>[/COLOR]  
[COLOR=black]a. read the template type of the screen [/COLOR][COLOR=#008080]\<!-- i know how to do this --\>[/COLOR]  
b. for a particular screen on flash, load the template (made in 1) onto stage [COLOR=#008080]\<!–i want to learn --\>[/COLOR]  
c. read data from xml file [COLOR=#008080]\<!-- i know how to do this --\>[/COLOR]  
d. load the data onto template in flash. [COLOR=#008080]\<!–i want to learn --\>[/COLOR]

I want to do this because i think re-using will make my application size smaller.

Can I do this?
