flash on 2011-1-7
/**
* Copyright Ryogo_Quberey ( http://wonderfl.net/user/Ryogo_Quberey )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/kEtD
*/
package {
import flash.display.Sprite;
import flash.events.Event;
public class FlashTest extends Sprite {
private var maru:Sprite = new Sprite;
private var shitamaru:Sprite = new Sprite;
private var color:uint = 0xD8EB00;
private var speed:Number = 0.2;
public function FlashTest() {
maru = new Sprite();
shitamaru = new Sprite();
this.addChild(maru);
this.addChild(shitamaru);
this.addEventListener(Event.ENTER_FRAME, MoveLine);
}
private function MoveLine(event:Event):void {
/* maru.x += (mouseX - maru.x)*speed ;
maru.y += (mouseY - maru.y)*speed ; */
maru.graphics.lineStyle(.5, color);
maru.graphics.moveTo(0,0);
maru.graphics.lineTo(mouseX,mouseY);
shitamaru.graphics.lineStyle(.5, color);
shitamaru.graphics.moveTo(465,465);
shitamaru.graphics.lineTo(mouseX,mouseY);
}
}
}