2012年12月5日
摘要:
package{/** * @author zoe * */import flash.display.Sprite;import flash.events.Event;public class Main extends Sprite{ private var rect:Sprite; private var bar:Sprite; public function Main() { init(); } private function init():void { rect = new Sprite(); ...
阅读全文
posted @ 2012-12-05 17:16
橙小风
阅读(627)
推荐(0)
2012年12月3日
摘要:
functionrotateArrow(event:Event):void{vardx:Number=mouseX-arrow.x;vardy:Number=mouseY-arrow.y;varradians:Number=Math.atan2(dy,dx);arrow.rotation=radians*180/Math.PI;}
阅读全文
posted @ 2012-12-03 20:22
橙小风
阅读(166)
推荐(0)
2012年11月20日
摘要:
package{ import flash.display.Bitmap; import flash.display.Loader; import flash.display.Sprite; import flash.events.Event; import flash.net.URLRequest; [SWF(width = 600,height = 450,backgroundColor = 0x000000)] public class Main extends Sprite { private var...
阅读全文
posted @ 2012-11-20 16:46
橙小风
阅读(341)
推荐(0)
2012年11月8日
摘要:
package { import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFieldType; import flash.text.TextFieldAutoSize; import flash.utils.Timer; import flash.events.TimerEvent; import flash.events.Event; public class Timer_constructorExample extends Sprite ...
阅读全文
posted @ 2012-11-08 16:03
橙小风
阅读(235)
推荐(0)
摘要:
package{/** * @author zoe * */import flash.display.Sprite;import flash.events.TimerEvent;import flash.text.TextField;import flash.utils.Timer;[SWF(width = 750,height = 600)]public class Main extends Sprite{ public function Main() { init(); } private var timer:Timer; private...
阅读全文
posted @ 2012-11-08 15:53
橙小风
阅读(308)
推荐(0)
2012年11月5日
摘要:
package{/** * @author zoe * */import flash.display.Sprite;import flash.events.MouseEvent;import flash.net.URLRequest;import flash.net.navigateToURL;public class Main extends Sprite{ public function Main() { var _rectA:Sprite = new Sprite(); var rand:uint = Math.random()*0xFFF...
阅读全文
posted @ 2012-11-05 08:48
橙小风
阅读(1350)
推荐(0)
2012年11月1日
摘要:
private var sound:Sound;private var soundChannel:SoundChannel;private var soundTrans:SoundTransform;private function playMusic():void{sound = new Sound(new URLRequest("resource/music/wangfei.mp3"));//resouce文件夹和SWF文件同级都在bin-debug文件夹中//*只有在未将有效的 URLRequest 对象传递到 Sound 构造函数或传递了 null 值的情况下,才需
阅读全文
posted @ 2012-11-01 17:06
橙小风
阅读(256)
推荐(0)
2012年10月31日
摘要:
private var picLoder:Loader; private var picLoderRequest:URLRequest;private function pictureLoder():void { picLoder = new Loader(); picLoderRequest = new URLRequest("resource/pic/girl.jpg");//resouce文件夹和swf文件同级 picLoder.contentLoaderInfo.addEventListener(Event.COMPLETE,loderCompleteHandler
阅读全文
posted @ 2012-10-31 00:06
橙小风
阅读(168)
推荐(0)
2012年8月22日
摘要:
package sound{/** * @author zoe * */public class SoundManager{ private static var _instance:SoundManager; public static function getInstance():SoundManager { if(!_instance) { _instance = new SoundManager(new SingletonInfo()); } return _instance; } public function SoundManager(singleInfo:Singl...
阅读全文
posted @ 2012-08-22 14:13
橙小风
阅读(132)
推荐(0)
2012年8月21日
摘要:
package{/** * @author zoe * */import flash.display.Shape;import flash.display.Sprite;import flash.events.Event;import flash.geom.Point;[SWF(width =400,height = 400)]public class Main extends Sprite{ private var circle:Shape; private var crtTargetX:int; private var crtTargetY:int; private var r:int;
阅读全文
posted @ 2012-08-21 12:15
橙小风
阅读(245)
推荐(0)