Hi…Please help, I’m a beginner in Flash AS3.
I want to simulate a LEVEL INDICATOR (mc_Level) in a Vessel when opening Filling Valve (mc_Valve). On the stage i’ve drawn in Layer ‘Tool’ frame 1: The Vessel, mcLevel and mc_Valve. in Layer ‘Action’ frame 1, i wrote the code like these:
mc_Valve.addEventListener(MouseEvent.CLICK, actLevel);
function actLevel(e:MouseEvent):void{
var maxLevel:Number=100;
while(mc_Level.height<=100){
mc_Level.height +=2;
}
}
The Question; Why the above code is not showing simulation of increasing level/height in the mc_Level ? Correction please, or give me if there’s a better code.
Thanks.