Php and mysql

What method could be used to change the colour or appearance of a flash mx mc using by changing the value of a variable or cell in a mysql database, of course using php as the middle man so to speak??

cheers

well, I’m not sure what you mean.

1- How are you changing the color? (button event? time-based event?)

2- How often will the variable be changing? (Many times per movie? A few times per movie? OnLoad?)

A client has an accomodation business and wants a way to display when the accomodation is free or not. Many accomodation web sites such as hotels have a way of surfers putting in the dates in a web form of when they want a room and then the site must utilise a php and mysql combination to inform the surfer whether there is a room free.

My idea would be to use a calendar with each date in a month being a movie clip. Then I wanted to store an associated value in a mysql database field. When a booking is then made my client can use a simple interface such as the mysql_send method to change the value of the field in the database which then tunnels into the flash web site and changes the colour of each date. Say white for date free and grey for date not free.

Does this make any sense?? It does to me, but then I have an odd way at solving problems, most probably the long way round. I need also to see whether arrays in flash would prevent me having to create mc’s for every day of the year.

Any ideas on any of the above would be great.

Cheers Jubba

ok, so let me see… say these are days of the week, and certain ones are free

1- no
2- no
3- no
4- yes
5- no
6- yes
7- yes
8- no
9- yes
10- no
11- no
12- no
13- yes

those values are added to the database. Then you want to call them so that the movieclip that displays the date will be a different color?

If that is correct then you would write a php script that would pull the values out of the database and echo them in a format that Flash can read.

Then from Flash you would use

loadVariablesNum(“phpPage.php”, 0, “post”)

to call the variables…

yep I reckon that is the way forward. I am going to give it a go as i have written a php script before to communicate with flash.

My only question is how I change the colour of dates once the variable has been called.

i.e. if the variable that is called using loadVariablesNum is one value colour of date = white, if variables is another value, colour of date=grey