Flex学习笔记[1]:AS与JS的相互通信
环境:Flex Builder 3(AS3.0) 测试:点击客户端button,底层背景左下移动200px,flex绘制的三角的填充色由0x000000(黑)变0x00ffff(淡蓝)色 注意事项:1.IIS必须部署 2.通信前需检测是否ExternalInterface.available 一 MXML文件:FlexTest3.mxml 1 <? xml version="1.0" encoding="utf-8" ?> 2 < mx:Application xmlns:mx ="http://www.adobe.com/2006/mxml" layout ="absolute" creationComplete ="Init()" backgroundColor ="red" backgroundAlpha ="0" > 3 < mx:Script > 4 <![CDATA[ 5 import mx.core.UIComponent; 6 import flash.external.ExternalInterface; 7 8 protected var itvAnim:Number; 9 protected var itvTime:Number=1000; 10 protected var ucAngle:UIComponent=new UIComponent(); 11