# Loading swf's using variable counter - HELP!

**URL:** https://forum.kirupa.com/t/loading-swfs-using-variable-counter-help/186958
**Category:** flash
**Created:** [April 25, 2006, 4:08pm UTC](https://forum.kirupa.com/t/loading-swfs-using-variable-counter-help/186958 "2006-04-25T16:08:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![a\_livedesign](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@a\_livedesign](https://forum.kirupa.com/u/a_livedesign)
#### Post date: [April 25, 2006, 4:08pm UTC](https://forum.kirupa.com/t/loading-swfs-using-variable-counter-help/186958/1 "2006-04-25T16:08:22Z")

</div>

I am building my website, and I have a section called work where I will be display the different mediums that I use (print, web, motion graphics) the idea is each of the sections will have the top 5-10 projects to showoff. I want it so that when the user clicks one of the categories it loads the first swf for that category (ex. print1.swf) however after the user clicks the arrow that will be there, or the right arrow key it would go grab print2.swf, and so on till it hit the end. Then the user could click one of the other mediums such as web, and it would automatically load in web1.swf.

I know that I have to use some sort of counter system, but I’m confused on how the code would go to enable me to load print1, print2, print3 … so that I can just update the individual swf’s to make an update.

Any help would be much appreciated.

Here is the site: [http://www.a-livedesign.com/testing](http://www.a-livedesign.com/testing)  
(click on work)

PS: The site graphics on work are temporary to show what I’m trying to do.  
:ponder:

---

<div class="post-metadata">

### Author: ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)
#### Post date: [April 25, 2006, 4:16pm UTC](https://forum.kirupa.com/t/loading-swfs-using-variable-counter-help/186958/2 "2006-04-25T16:16:54Z")

</div>

sounds like a database or a the very least an XML system would be warranted for this operation

---

<div class="post-metadata">

### Author: ![a\_livedesign](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@a\_livedesign](https://forum.kirupa.com/u/a_livedesign)
#### Post date: [April 25, 2006, 4:23pm UTC](https://forum.kirupa.com/t/loading-swfs-using-variable-counter-help/186958/3 "2006-04-25T16:23:52Z")

</div>

Yeah I was thinking XML would be the way to go, but there has got to be actionscript that would listen to what swf is there now, and then depending on whether the user clicked the back or foward arrow it would add +1 or -1, to create print1.swf, or print2.swf.

I’ve seen it done with the xml photo albumns that kirupa did here, but not sure how to modify the code to work here.

I’m open to other suggestions as well anything to allow me to easily update the individual swfs
