home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Esportes
/
GHtP.swf
/
scripts
/
__Packages
/
GUINumbers.as
< prev
next >
Wrap
Text File
|
2008-09-03
|
1KB
|
44 lines
class GUINumbers extends MovieClip
{
function GUINumbers()
{
super();
this.m_numbers = new Array();
var _loc4_ = 0;
while(_loc4_ < this.m_characters)
{
var _loc3_ = this.attachMovie("mc_GUI_number","number_1",this.getNextHighestDepth());
if(this.m_width == 0)
{
_loc3_._x = _loc4_ * _loc3_._width;
}
else
{
_loc3_._x = _loc4_ * this.m_width;
}
this.m_numbers.push(_loc3_);
_loc4_ = _loc4_ + 1;
}
var _loc5_ = new flash.geom.ColorTransform();
_loc5_.rgb = parseInt(this.m_color,16);
var _loc6_ = new flash.geom.Transform(this);
_loc6_.colorTransform = _loc5_;
}
function SetValue(number)
{
var _loc4_ = number.toString();
if(_loc4_.length > this.m_numbers.length)
{
return undefined;
}
var _loc5_ = this.m_numbers.length - _loc4_.length;
var _loc2_ = _loc4_.length - 1;
while(_loc2_ >= 0)
{
var _loc3_ = _loc4_.substring(_loc2_,_loc2_ + 1);
this.m_numbers[_loc2_ + _loc5_].gotoAndStop("#" + _loc3_);
_loc2_ = _loc2_ - 1;
}
}
}