function createRef(picSource:DisplayObject):void{ // 倒置 var bd:BitmapData = new BitmapData(picSource.width, picSource.height, true, 0x12346f); var mtx:Matrix = new Matrix(); mtx.d = -1; mtx.ty = bd.height; bd.draw(picSource, mtx);
在as3中如果繼承的子類中1.沒有加入建構函式,子類將會調用父類的建構函式2.子類中有建構函式,但是沒有調用super(),同樣子類會調用父類的建構函式看下面的例子1:package{ public class A { public function A() { this.initA(); } private function initA():void {
setInterval()函數 public function setInterval(closure:Function, delay:Number, ... arguments):uint語言版本: ActionScript 3.0運行時版本: AIR 1.0 Flash Player 9以指定的間隔(以毫秒為單位)運行函數。作為使用 setInterval() 方法的替代方法,請考慮建立一個 Timer 對象,帶有指定的間隔,並使用 0 作為repeatCount
As包:package com.pag{ import flash.display.Bitmap; import flash.display.BitmapData; import flash.geom.Rectangle; import flash.utils.ByteArray; import mx.controls.Alert; public class BitmapBytes { public function
Alex Uhlmann:http://weblogs.macromedia.com/auhlmann/ChristopheCoenraets:http://coenraets.org/ 精選CodeSlinger:http://blogs.digitalprimates.net/codeSlinger/Deitte:http://www.deitte.com/Dougmccune:http://dougmccune.com/blog/ 精選Flex
1. 驗證中文字元: //初始化Regex類 var pattern:RegExp=/[/u4e00-/u9fa5]/; //需要驗證的字串 var nihao:String="你好"; var hello:String="hello"; //輸出結果 trace("驗證'你好'字串的結果:"+pattern.test(nihao)); trace("驗證'hello'字串的結果:"+pattern.test(hello)); 2.