# \[AS2\] Need help with creating buttons and content dynamically

**URL:** <https://forum.kirupa.com/t/as2-need-help-with-creating-buttons-and-content-dynamically/303580>\
**Category:** flash\
**Created:** [January 22, 2010, 4:36pm UTC](https://forum.kirupa.com/t/as2-need-help-with-creating-buttons-and-content-dynamically/303580 "2010-01-22T16:36:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![silvermario1](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@silvermario1](https://forum.kirupa.com/u/silvermario1)\
**Post date:** [January 22, 2010, 4:36pm UTC](https://forum.kirupa.com/t/as2-need-help-with-creating-buttons-and-content-dynamically/303580/1 "2010-01-22T16:36:11Z")

</div>

Hi, i’m developing a website for my client. Here is the test version [http://www.net-plus.eu/test/denis/strona/](http://www.net-plus.eu/test/denis/strona/)  
The page Partnerzy (Partners) will look like this:

![](http://forum.kirupa.com/uploads/kirupa/6094/e555d0a96f5cc80e.jpg)

There will be a menu created dynamically from a XML file, after clicking a menu button a MovieClip with a photo and category description will show up.  
After clicking the button “View more” the MovieClip with description will be removed and MovieClips with category products will show up through a for-loop on XML products nodes from this category.

The XML will look like this:

```auto
<category name="torty" url="torty.jpg" description="Category description">
    <item name="Tiramisu" make="Balconi" url="tiramisu.jpg"><![CDATA[Product description...]]></item>
    <item name="Cake" make="Balconi" url="cake.jpg"><![CDATA[Product description...]]></item>
</category>
<category name="ciastka" url="ciastka.jpg" description="Category description">
    <item name="Tiramisu" make="Asolo Dolce" url="tiramisu.jpg"><![CDATA[Product description...]]></item>
    <item name="Cake" make="Asolo Dolce" url="cake.jpg"><![CDATA[Product description...]]></item>
</category>

```

I can create the navigation menu, and maybe i will manage to create first MovieClip with the category photo and description but i don’t have any idea how to create those next MovieClips with products desciption after clicking the button “View more”.

I don’t ask you for complete code and explanation how to do this.  
I’m begging you for hints how to start and how should i get on with this.  
Maybe somebody have seen some tutorials that will help me with this job?

I’m trying right now to mess with code from this tutorial [http://flashexplained.com/actionscript/making-the-ultimate-dynamic-image-gallery-in-flash-8/](http://flashexplained.com/actionscript/making-the-ultimate-dynamic-image-gallery-in-flash-8/)  
when i will have some code to show i will write it here, but as for now please help me ☹
