# XML/PHP - Updateability

**URL:** <https://forum.kirupa.com/t/xml-php-updateability/263683>\
**Category:** Uncategorized\
**Created:** [June 18, 2008, 9:53am UTC](https://forum.kirupa.com/t/xml-php-updateability/263683 "2008-06-18T09:53:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thedaveyb](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@thedaveyb](https://forum.kirupa.com/u/thedaveyb)\
**Post date:** [June 18, 2008, 9:53am UTC](https://forum.kirupa.com/t/xml-php-updateability/263683/1 "2008-06-18T09:53:51Z")

</div>

Hi Guys,

Am working on this site at the moment…  
[URL=“[http://www.mwis-web.co.uk/newz/](http://www.mwis-web.co.uk/newz/)”]  
[http://www.mwis-web.co.uk/newz/](http://www.mwis-web.co.uk/newz/)

If you make your way to the celebs tab, you will see a list of celebs which by clicking on change the image alongside - sample of this code is below…

```auto

_root.image_cont.contentMain.c0.text_hold.text = "Shane Filan (Westlife)";
    _root.image_cont.contentMain.c0.onRollOver = function() {
    _root.image_cont.contentMain.c0.gotoAndPlay("off");
    _root.image_cont.contentMain.c0.onRollOut = function() {
    _root.image_cont.contentMain.c0.gotoAndPlay("on");
    };
    _root.image_cont.contentMain.c0.onPress = function() {
        _root.image_cont.gotoAndPlay(109);
        _root.image_cont.celeb.img.loadMovie("img/celeb/c0.jpg");
        _root.image_cont.celeb.lineani.gotoAndPlay(1);
    };
};

```

pretty simple AS, the celeb names are just a movieclip duplicated and given an instance name… then all hardcoded into the AS.

The client now wants this area updatable via a PHP/MYSQL CMS…I know the logic but am really going to struggle with the AS.

My logic is…

1. Import Variables via a PHP file
2. Create An Array of the celebs (image name and celeb name)
3. Create a blank movie clip to hold a single celeb
4. Create a loop which duplicates the celeb name movie clip and places it under itself, using my as from above in the loop as well…

Am i right and where the hell do i start!?

ta muchly.

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 18, 2008, 10:00am UTC](https://forum.kirupa.com/t/xml-php-updateability/263683/2 "2008-06-18T10:00:51Z")

</div>

yes pritty much, however you will putting yourself out of a job:P

you could easily do it with xml, php mySQL is a tad over kill

look at tutorials, even if it is XML it will give you the basis if you intend to use php/mySQL

…

yes you are correct, I assume you could follow xml tuts, then switch the xml, for php variables

---

<div class="post-metadata">

**Author:** ![thedaveyb](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@thedaveyb](https://forum.kirupa.com/u/thedaveyb)\
**Post date:** [June 18, 2008, 1:09pm UTC](https://forum.kirupa.com/t/xml-php-updateability/263683/3 "2008-06-18T13:09:07Z")

</div>

> [@randomagain;2344824](#):
>
> yes you are correct, I assume you could follow xml tuts, then switch the xml, for php variables

yo, all good. Sorry i should of pointed out that was why i mentioned XML in the post title - my assumption was it would be better to do via XML and my workaround was i could get a PHP file to write/update the XML file everytime they add a new celeb VIA the CMS?

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 18, 2008, 3:21pm UTC](https://forum.kirupa.com/t/xml-php-updateability/263683/4 "2008-06-18T15:21:19Z")

</div>

this maybe help more than I

> **[Blog/CMS system for Flash/PHP/MySQL](https://www.kirupa.com/forum/showthread.php?t=190375)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!
