Posted on September 26, 2008, 11:13 am, by Daniel, under
actionscript.
If you’ve ever created a digital timer or clock then you probably used something like this function. It adds a leading zero if the number is only one digit long. This means that if the minute value is ’6′ then it will return ’06′. eg. 12:06:43 class com.sitedaniel.utils.StringUtil { public function StringUtil(){} /** * [...]
Posted on August 26, 2008, 7:24 pm, by Daniel, under
actionscript.
Following up on an earlier post, here is the AS2.0 version of the dragToPosition X & Y coordinate tracer. class com.sitedaniel.utils.Design { public static function dragToPosition(mc:MovieClip):Void { mc.onPress = function():Void { startDrag(this, false); } mc.onRelease = function():Void { this.stopDrag(); trace(this._x + ‘, ‘ + this._y); } } }