很长时间没有摸AS3.0了.自知快要落伍了, 于是下定决心利用有限的业余时间继续研究AS3.0. 整理一些常用的As3.0用法.目前关于AS3按钮的onReleaseOutside,整理了一下.如下:
package {
import flash.display.Sprite; public class Wsbutton extends Sprite { private var button:Sprite; public function Wsbutton() { } button.buttonMode=true; private function buttonPress(e:MouseEvent):void { this.stage.addEventListener(MouseEvent.MOUSE_UP,buttonRelease); } private function buttonRelease(e:MouseEvent):void { this.stage.removeEventListener(MouseEvent.MOUSE_UP,buttonRelease); if (e.currentTarget != button) { trace('onRelease'); } private function buttonOver(e:MouseEvent):void { trace('onDragOver'); trace('onRollOver'); } private function buttonOut(e:MouseEvent):void { } } |
包括了dragover,dragout,onReleaseOutSide等状态.
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |