home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 145
/
MOBICLIC145.ISO
/
pc
/
DATA
/
DSS145
/
DSS145_07
/
DSS145_07.swf
/
scripts
/
dss145_07
/
BarreProgres.as
next >
Wrap
Text File
|
2012-07-18
|
1KB
|
53 lines
package dss145_07
{
import flash.display.MovieClip;
public class BarreProgres
{
private var _movie:MovieClip;
public var value:int = 0;
private var unityValue:Number = 1;
private var numberMarks:int = 6;
public function BarreProgres(param1:MovieClip)
{
super();
this._movie = param1;
this.unityValue = 100 / this.numberMarks;
this.refresh();
}
public function refresh(param1:Number = 0) : void
{
var _loc2_:MovieClip = null;
if(param1 >= 100)
{
this.value = 6;
}
else
{
this.value = Math.floor(param1 / this.unityValue);
}
var _loc3_:int = 1;
while(_loc3_ <= this.numberMarks)
{
_loc2_ = this._movie.getChildByName("TETE_0" + _loc3_) as MovieClip;
if(_loc3_ > this.value)
{
_loc2_.gotoAndStop("E0");
}
else
{
_loc2_.gotoAndStop("E1");
}
_loc3_++;
}
}
}
}