Улыбнуло
http://www.thefuntheory.com/
![]() | You are viewing Log in Create a LiveJournal Account Learn more |
![]() |
| дождь |
package {
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.IEventDispatcher;
import flash.events.MouseEvent;
public final class StrangeIssue extends Sprite {
public function StrangeIssue() {
this.stage.scaleMode = StageScaleMode.NO_SCALE;
this.stage.align = StageAlign.TOP_LEFT;
this.drawNormal();
this.initListeners(this);
}
private function initListeners(target:IEventDispatcher):void {
target.addEventListener(MouseE vent.MOUSE_OVER, this.mouseOverHandler);
target.addEventListener(MouseE vent.MOUSE_OUT, this.mouseOutHandler);
}
private function mouseOverHandler(e:MouseEvent):void {
this.drawHover();
}
private function mouseOutHandler(e:MouseEvent):void {
this.drawNormal();
}
private function drawNormal():void {
this.graphics.beginFill(0xFF0000, 1);
this.graphics.drawRect(0,0,100,100);
}
private function drawHover():void {
this.graphics.beginFill(0xFF, 1);
this.graphics.drawRect(0,0,100,100);
}
}
}
* This source code was highlighted with Source Code Highlighter.| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |