XML/PHP - Updateability

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/

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…


_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.

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

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?

this maybe help more than I