随笔分类 - as3
摘要:Flex中As调用Js的方法是: 1、导入包 (import flash.external.ExternalInterface;) 2、使用ExternalInterface.call("Js函数名称",参数)进行调用,其返回的值就是Js函数所返回的值Js调用As的方法是: 1、导入包 (import flash.external.ExternalInterface;) 2、在initApp中使用ExternalInterface.addCallback("用于Js调用的函数名",As中的函数名)进行注册下 3、js中 就可以用document.getE
阅读全文
摘要:public function decodeSnapshot():void{ lbl.text="checking..."; bmd=new BitmapData(300, 300); bmd.draw(videoDisplay, null, null, null, null, true); videoDisplay.cacheAsBitmap=true; videoDisplay.cacheAsBitmapMatrix=new Matrix; decodeBitmapDat...
阅读全文
摘要:这里的三种方式分别为:1、二进制传输(BINARY)2、字符串传输(String)3、文件流上传(File)开发IDE:FlashDevelop、Zend Studio。1)设置FlashDevelop使用flash player10(debug版本,因为有一个demo使用了本地预览)“工具”菜单 –》 “软件设置”(快捷键F10)—》 点击左侧的“AS3Context”,在Language中的“Default Flash Version”修改为10,选择Player Debug 的路径2、因为在flashDevelop中使用到了fl组件,所以需要先下载fl.swc,可以在google cod
阅读全文
摘要:红绿反色:代码varfilterObj=newflash.filters.ColorMatrixFilter();filterObj.matrix=newArray(0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0);displayObject.filters=[filterObj];黑白:代码varfilterObj=newflash.filters.ColorMatrixFilter();filterObj.matrix=newArray(1/3,1/3,1/3,0,0,1/3,1/3,1/3,0,0,1/3,1/3,1/3,0,0,0,0,0,1,0);di
阅读全文

浙公网安备 33010602011771号