摘要:
package{importflash.display.Sprite;importflash.utils.setInterval;//运行间隔运行函数importflash.utils.clearInterval;//停止间隔运行函数publicclassMainextendsSprite{vari:uint=1;vara:uint;publicfunctionMain():void{a=setInterval(b,1000,"当前次数:");//1000毫秒=1秒}privatefunctionb(str:String):void{trace(str+":&qu 阅读全文
摘要:
package{importflash.display.Sprite;importflash.events.ContextMenuEvent;importflash.net.URLRequest;importflash.net.navigateToURL;importflash.ui.ContextMenu;importflash.ui.ContextMenuItem;publicclassMainextendsSprite{privatevarb:ContextMenuItem=newContextMenuItem("XXX");//添加新项privatevarc:Con 阅读全文
摘要:
package{importflash.display.Sprite;importflash.display.Stage;importflash.events.KeyboardEvent;importflash.ui.Keyboard;importflash.events.Event;publicclassMainextendsSprite{privatevarflag:Boolean=newBoolean();publicfunctionMain():void{stage.addEventListener(KeyboardEvent.KEY_DOWN,a);stage.addEventLis 阅读全文
摘要:
package{importflash.display.Sprite;importflash.events.MouseEvent;importflash.ui.Mouse;publicclassMainextendsSprite{privatevarflag:Boolean=newBoolean();publicfunctionMain():void{//创建一个新光标(小方块)vara:Sprite=newSprite();a.graphics.beginFill(0xff0000);a.graphics.drawRect(0,0,50,50);a.graphics.endFill();th 阅读全文