Flex控制外部加载的swf文件[外部swf文件flex版]
1-首先写一个加载外部swf文件的类
package Package
{
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.events.*;
import flash.net.URLRequest;
import mx.core.UIComponent;
import mx.events.FlexEvent;
public class CtmObjLoader extends UIComponent
{
private var loader:Loader;
private var ProgressHandle:Function=null;
public var _bLoaded:Boolean=false;
public function CtmObjLoader(UrlRequest:String=null,progressHandle:Function=null)
{
super();
if(UrlRequest)LoadThis(UrlRequest,progressHandle);
}
public function LoadThis(UrlRequest:String,progressHandle:Function=null):void{
RemoveChild();
loader = new Loader();
ProgressHandle=progressHandle;
//DeleteListeners(loader.contentLoaderInfo);
configureListeners(loader.contentLoaderInfo);
addChild(loader);
var request:URLRequest = new URLRequest(UrlRequest);
loader.load(request);
}
public function UnLoadThis():void{
try{
RemoveChild();
this.parent.removeChild(this);
}catch(e:Error){}
//this=null;
}
public function get content():DisplayObject{
if(!_bLoaded)return null;
return loader.content;
}
private function RemoveChild():void{
i
相关文档:
flex控件对象、RemoteObject等都有一个共同的方法addEventListener。
addEventListener方法如下:
public function addEventListener(type:String, listener:Function,
useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
{
eventDispatcher.addEventListener(type, listener, us ......
一、
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
addedToStage="stage.addEventListener(KeyboardEvent.KEY_DOWN, myKeyDown)"
click="clickEvt(event)"
layout="absolute"
&nb ......
http://blog.minidx.com/2008/08/06/1227.html good
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" verticalAlign="top"
horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" ......
对arcgis server for flex学习了一段时间了,需要对自己的学习过程总结一下:
准备工作:1一般对arcgis server软件的安装需要确保自己的电脑上安装了IIS服务器;
2,确保一些arcgis server本身会占用80端口,如果你的电脑上已经装了迅雷软件的话,需要修改迅雷所占用的80端口。3最后你的电脑上装有arcgis desktop,一遍数 ......
uint int Number
Flex 四舍五入:
整数的四舍五入法,Math.round(一个Number类型的数)
小数的有 tofixed(uint) 方法
例如 var num:Number = 56.159;
num.tofixed(2); 它是个S ......