# Programming Question (how would you do this?)

**URL:** <https://forum.kirupa.com/t/programming-question-how-would-you-do-this/265260>\
**Category:** flash\
**Created:** [July 7, 2008, 5:54am UTC](https://forum.kirupa.com/t/programming-question-how-would-you-do-this/265260 "2008-07-07T05:54:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashdaddy](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@flashdaddy](https://forum.kirupa.com/u/flashdaddy)\
**Post date:** [July 7, 2008, 5:54am UTC](https://forum.kirupa.com/t/programming-question-how-would-you-do-this/265260/1 "2008-07-07T05:54:05Z")

</div>

Hi All,

I have a question. I’m building a site that has 5 different pages. The layout on all 5 pages are exactly the same (except for the image and content). What I would usually do in this situation is create 5 movie clips, and put them all in one movie clip, add markers, and for the nav, I’d do a "gotoAndStop and that would be that. A friend of mine who’s an extremely good developer told me that - that is not a good way to do it. He advised me to create a template (the image and content holder), create an array of objects for the images and content and run a for loop to call the specific image and content to display the data and then go from there. I understand the concept of that but not really sure what that’s called or exactly how it works, but I’d like to know what everyone else is doing.

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [July 7, 2008, 6:10am UTC](https://forum.kirupa.com/t/programming-question-how-would-you-do-this/265260/2 "2008-07-07T06:10:20Z")

</div>

Your friend is right. Go ahead and try to code it yourself and post if you have any issues.

---

<div class="post-metadata">

**Author:** ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)\
**Post date:** [July 7, 2008, 1:52pm UTC](https://forum.kirupa.com/t/programming-question-how-would-you-do-this/265260/3 "2008-07-07T13:52:40Z")

</div>

The magic word is…

_dynamic… flaaaashhhh_

🙂

The next step obviously is using an XML or direct DB connection instead of internal arrays.

---

<div class="post-metadata">

**Author:** ![flashdaddy](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@flashdaddy](https://forum.kirupa.com/u/flashdaddy)\
**Post date:** [July 8, 2008, 12:15am UTC](https://forum.kirupa.com/t/programming-question-how-would-you-do-this/265260/4 "2008-07-08T00:15:46Z")

</div>

Nice, any good links or tutorials you guys can direct me to? I’ve looked at [http://www.tutorialized.com/tutorials/Flash/Dynamic-Content/1](http://www.tutorialized.com/tutorials/Flash/Dynamic-Content/1) and a few others but I haven’t found exactly what I’m looking for. As mentioned above, i’m just trying to find a tutorial that I can create a single template, and apply the content from my array depending on which link is clicked.
