FLEX 窗口居中
import flash.display.DisplayObject;
import mx.core.Application;
import mx.managers.PopUpManager;
var win:TestWindows= PopUpManager.createPopUp(DisplayObject(Application.application),TitleWindows,true) as TitleWindows;
PopUpManager.centerPopUp(win);
相关文档:
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/07/creating-full-screen-flex-applications/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init(event)" viewSourceURL="srcview/index.html">
& ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Panel width="392" height="300" layout="absolute">
<mx:Label x="19" y="10" text="{user}" width="171" height="20"/>
<mx ......
发现了一个Flex中TextInput的一个比较有用的属性restrict(约束,限定),先看下例子:
1,<mx:TextInput id="test_ti" width="160" maxChars="20" restrict="0-9" text="0"/>
这样,这个输入框最多只能输入20个字符,只能输入0到9之间的数字了,你如果输入别的是输入不进去的
2,<mx:TextInput id="test_ti" width="1 ......
1.下载eclipse的插件包:FB3_WWEJ_Plugin.exe
地址:http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe
2.在任意目录建一个以下结构的目录:flex_plugin->eclipse->plugins和features
3.进入Flex Builder 3 的安装目录 将plugins目录下所有以 com.adobe 开头的文件或文件夹copy到上 ......
var login:infoChange=infoChange(PopUpManager.createPopUp( this, infoChange , true));
login.x=250;
login.y=150;
login.userid.text=dg.selectedItem.aa;
login.username.text=dg.selectedItem.bb;
......