Hi all,
I'm passing 3 variables from a php script to flash.
$city
$temperature
$conditions
I want to target a movie clip to appear on condition of the result of the $conditions variable.
"Cloudy" = target instance name cloudy - movie clip cloudy_mc
"Mostly Cloudy" = target instance name mostly_cloudy - movie clip mostly_cloudy_mc
"Sunny" = target instance name sunny- movie clip sunny_mc
"Rain" = target instance name rain - movie clip rain_mc
"Snow" = target instance name snow - movie clip snow_mc
Actionscript
actionscript Code:
// load values
loadVariables("ip5.php", "");
// hide weather icons
_root.mostly_cloudy._visible = false;
_root.cloudy._visible = false;
_root.sun._visible = false;
_root.rain._visible = false;
_root.snow._visible = false;
_root.thunder._visible = false;
// show weather icon for the weather condition
if (conditions == "Cloudy") {
_root.cloudy._visible = true;
}
The 'if statement' doesn't seem work.
Can anyone tell me what I'm doing wrong?
Many thanks
pjking