PDA

View Full Version : Need Help!


Aki
08-12-2003, 12:37 PM
I am working on a project that I need to finish ASAP. I am not very good with flash AS so please help.
Project: Flash map of plots that will dynamicly change collors depending on data from DB. To simplify; I have map that has 40 parts (plots) to it. So my DB has 40 records and each record has a field Status that value can be "Available", "Closed" , "Allocated" . Depending on that status value I need plots to change collors. So if plot#5 on the map status = Closed that part of the map changes collor to red.


This is what I got so far:

I created link from flash to be via remote and I am getting all the data just fine.
I have list box that gets list of records from db
Map is broken into 40 parts and each part is MC.
I've came up with this code to change colors

onClipEvent (enterFrame) {
r1 += (r-r1)/step;
g1 += (g-g1)/step;
b1 += (b-b1)/step;
colchange.setRGB(r1 << 16 | g1 << 8 | b1);
if (_root.dsp_status == "Available") {
r = 0;
g = 255;
b = 0;
}

else if (_root.dsp_status == "Sold") {
r = 0;
g = 0;
b = 255;
}
else if (_root.dsp_status == "Allocated") {
r = 255;
g = 0;
b = 0;

} else {

r = 0;
g = 193;
b = 0;
}

}

This changes collor of the PLOT but only for record that I select from list box.

So what I need is to connect each of 40 Plots to its corresponding record in DB and when swf starts it will change all 40 PLOTS dynamicly.

FLASH MX
ColdFusion
Win 2000 server IIS

I hope I explained this the right way just let me know if you have any questions. I really need help with this and I would apprechiate it.