flash on 2010-11-25
♥0 |
Line 29 |
Modified 2010-11-25 10:44:48 |
MIT License
archived:2017-03-20 02:45:39
ActionScript3 source code
/**
* Copyright plus-tic ( http://wonderfl.net/user/plus-tic )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/1i4E
*/
package {
import flash.text.TextField;
import flash.events.MouseEvent;
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
var maru:Sprite = new Sprite();
var maru2:Sprite = new Sprite();
maru.graphics.beginFill(0Xff0000);
maru.graphics.drawCircle(0,0,20);
maru.x = stage.stageHeight/2-maru.width;
maru.y = stage.stageHeight/2;
maru2.graphics.beginFill(0Xff0000);
maru2.graphics.drawCircle(0,0,20);
maru2.x = stage.stageHeight/2+maru.width;
maru2.y = stage.stageHeight/2;
addChild(maru);
addChild(maru2);
stage.addEventListener(MouseEvent.MOUSE_OVER,Overhandler);
stage.addEventListener(MouseEvent.MOUSE_OUT,Outhandler);
}
private function Overhandler(e:MouseEvent):void{
e.target.alpha = 0.5;
}
private function Outhandler(e:MouseEvent):void{
e.target.alpha = 1;
}
}
}