topical media & game development
actionscript-wii-Cursor.ax
actionscript-wii-Cursor.ax
[swf]
flex
package
{
import flash.display.Sprite;
public class @ax-actionscript-wii-Cursor extends Sprite
{
/*private var w:Number;
private var h:Number;
private var color:uint;
public var vx:Number = 0;
public var vy:Number = 0;
public function @ax-actionscript-wii-Cursor(width:Number=5, height:Number=5, color:uint=0xffffff) {
w = width;
h = height;
this.color = color;
init();
}
public function init():void {
graphics.beginFill(color);
graphics.drawRect(-w / 2, -h / 2, w, h);
graphics.endFill();
}*/
public var radius:Number;
private var color:uint;
public var vx:Number = 0;
public var vy:Number = 0;
public function @ax-actionscript-wii-Cursor(radius:Number=12, color:uint=0x000000) {
this.radius = radius;
this.color = color;
init();
}
public function init():void {
graphics.beginFill(color);
graphics.drawCircle(0, 0, radius);
graphics.endFill();
}
public function changeColor(color:uint=0xff0000):void {
this.color = color;
graphics.clear()
this.init();
}
}
}
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.