I don’t think it would be very difficult to do. Basically create a movieclip animation of a thermometer with the liquid filling up across x number of frames. Where’s the data coming from?
create a movieclip called thermo and another inside it called mercury inside thermo. make mercury 100 frames long and make it frame one make it the height you want it to be for 1% and frame 100 make it the height you want it to be for 100% and make a motion tween so you have a 100 frame motion tween of the mercury rising in the thermo mc. put a stop() action in the begining of the mercury mc to prevent it from playing. then put the thermo mc on the maintime line and use this code:
var getPercent:LoadVars = new LoadVars();
getPercent.load(‘the-php-file-to-get-the-amount-gotten-and-goal.php’);
getPercent.onLoad = function (success) {
if(success){
goal = getPercent.goal;
amount = getPercent.amount;
setThermo(amount,goal);
}
}
function setThermo(a:Number,g:Number){
percent = Math.round((a/g)*100);
thermo.mercury.gotoAndStop(percent);
}
OK, thanks guys —
Would that scripting only work for a .php file??
Problem is i dont know Nutting about developing or actionscript –
All i know is that the developers here use asp.net and sometimes VB … so how would that example above work?
I just know that it has to somehow tie in from an amount in the database - and im guessing that they will use asp.net or VB to get this –
just change where it says .php file to .aspx or whatever its coming from, and the .aspx page needs to get the info from the DB and send it to flash as a variable amount for the amount they’ve grossed and goal for the goal amount