来源:
http://livedocs.adobe.com/flex/3_cn/langref/mx/containers/TitleWindow.html
代码:
<?xml version="1.0" encoding="utf-8"?> <!-- Simple custom MXML TitleWindow component. The TitleWindowApp application displays this component. You cannot run it independently. --> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Title Window" x="168" y="86"> <mx:Script> <![CDATA[ import mx.managers.PopUpManager; import mx.controls.Text; // A reference to the TextInput control in which to put the result. public var loginName:Text; // Event handler for the OK button. private function returnName():void { loginName.text="Name entered: " + userName.text; PopUpManager.removePopUp(this); } ]]> </mx:Script> <mx:HBox> <mx:Label text="Enter Name: "/> <mx:TextInput id="userName" width="100%"/> </mx:HBox> <mx:HBox> <mx:Button label="OK" click="returnName();"/> <mx:Button label="Cancel" click="PopUpManager.removePopUp(this);"/> </mx:HBox> </mx:TitleWindow>
<?xml version="1.0" encoding="utf-8"?> <!-- Main application to demonstrate TitleWindow layout container. --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import mx.managers.PopUpManager; import mx.containers.TitleWindow; import flash.geom.Point; private var point1:Point = new Point(); // Open the TitleWindow container. // Cast the return value of the createPopUp() method // to SimpleTitleWindowExample, the name of the // component containing the TitleWindow container. private function showWindow():void { var login:SimpleTitleWindowExample=SimpleTitleWindowExample(PopUpManager.createPopUp( this, SimpleTitleWindowExample , true)); // Calculate position of TitleWindow in Application's coordinates. // Position it 25 pixels down and to the right of the Button control. point1.x=0; point1.y=0; point1=myButton.localToGlobal(point1); login.x=point1.x+25; login.y=point1.y+25; // Pass a reference to the TextInput control // to the TitleWindow container so that the // TitleWindow container can return data to the main application. login.loginName=returnedName; } ]]> </mx:Script> <mx:Panel title="TitleWindow Container Example" height="75%" width="75%" paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"> <mx:Button id="myButton" label="Click to open the TitleWindow container" click="showWindow();"/> <mx:Text id="returnedName" text="" width="100%"/> </mx:Panel> </mx:Application>
相关推荐
FLEX弹出框特效,FLEX弹出框特效,很好很强大
Flex文本框自动提示源码,flex,flex
使用Flex ,AS,实现的适用于Flex Mobile平台的对话框。
Flex实现带复选框的列表树,实现全选和反选
flex as3 遮罩的使用例子flex as3 遮罩的使用例子flex as3 遮罩的使用例子flex as3 遮罩的使用例子
flex+AS3编程规范flex+AS3编程规范flex+AS3编程规范flex+AS3编程规范flex+AS3编程规范flex+AS3编程规范flex+AS3编程规范flex+AS3编程规范
学习flex/as3不错的入门资料,强烈推荐
flex中的as3xls读写excel的代码
flex as3 帮助文档 pdf格式 flex as3 帮助文档
flex 制作的文本框组件,能够根据加载的字符串长度,自动调整文本框大小。将源码导入Flash builder即可使用。
Flex教程系列之(一) AS3语法——编程基础 http://download.csdn.net/source/1161756 Flex教程系列之(二) AS3语法——流程控制语句 http://download.csdn.net/source/1161804 Flex教程系列之(三) AS3语法——控制...
Flex文本框自动提示源码 用到Flex文本框自动提示的功能 设计思路 思路比较简单,组件分成两个部分,1文本框;2提示的下拉列表; 自动提示: 在文本框中输入文字时,在数据源(所有的提示项)查找匹配的选项,若...
flex3as3jquery学习资料flex3as3jquery学习资料
flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线flex as3 园 线
flex as3虚线
关与flex中项目渲染器的使用,有源码,说明详尽.仅供学习参考.
flex移动应用开发中Alert不能使用,该文件是AS3写的Alert,可以替代SDK自带的ALERT,超级好用
一款flex+as3游戏源码,是学习的好资料。
在项目实施中对弹出框的样式需求会有很多,也会要求...主要思路,弹出框可以选择任意的控件,主要是制作了一个可以变换形状的三角指向,通过在featureslayer上添加feature实现,也可以使用flex自己的绘图控件来实现。
用flex实现苹果样子菜单,很酷,也很简单哦!