[COLOR=#000000][FONT=verdana]Hi i’ve a fla with a timer, it is a circle and this is the code
[/FONT][/COLOR]public class TimeDisplay extends MovieClip { private var radius:Number;
function TimeDisplay() {
radius = Math.max(width, height);
}
public function setTime(ratio:Number):void {
foregroundMask.graphics.clear();
foregroundMask.graphics.beginFill(0);
foregroundMask.graphics.moveTo(0, -radius);
if(ratio > 1 / 4) foregroundMask.graphics.lineTo(radius, 0);
if(ratio > 1 / 2) foregroundMask.graphics.lineTo(0, radius);
if(ratio > 3 / 4) foregroundMask.graphics.lineTo(-radius, 0);
foregroundMask.graphics.lineTo(radius * Math.sin(Math.PI * 2 * ratio), -radius * Math.cos(Math.PI * 2 * ratio));
foregroundMask.graphics.lineTo(0, 0);
foregroundMask.graphics.lineTo(0, -radius);
foregroundMask.graphics.endFill();
}
}
}[COLOR=#000000][FONT=verdana]
[/FONT][/COLOR][COLOR=#000000][FONT=verdana]i would like to change it and have a bar as graphic element, can u help me?[/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]thanks[/FONT][/COLOR]