转自:http://avanry.iteye.com/blog/592609
//应用程序窗口 Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import flash.events.Event;
import mx.managers.PopUpManager;
public var popUp:TestTitleWindow;
public function displayForm():void {
// Array with data for the custom control ComboBox control.
var doctypes:Array = ["*.as", "*.mxml", "*.swc"]
// Create the pop-up and cast the return value of the createPopUp()
// Method to the ArrayEntryForm custom component.
popUp =TestTitleWindow(PopUpManager.createPopUp(this, TestTitleWindow, true));
// Set TitleWindow properties.
popUp.title="Select File Type";
popUp.showCloseButton=true;
// Set the event listeners for the ArrayEntryForm component.
popUp.addEventListener("close", removeMe);
popUp["cancelButton"].addEventListener("click", removeMe);
popUp["okButton"].addEventListener("click", submitData);
// Set properties of the ArrayEntryForm custom control.
popUp.myArray = doctypes;
PopUpManager.centerPopUp(popUp);
}
// OK button click event listener.
// Sets the target component in the application to the
// selected ComboBox item value.
private function submitData(event:Event):void {
ti1.text = String(popUp.cb1.selectedItem);
//removeMe();
PopUpManager.removePopUp(popUp);
}
// Cancel button click event listener.
private function removeMe(event:Event):void {
PopUpManager.removePopUp(popUp);
}
]]>
</mx:Script>
<mx:VBox>
<mx:TextInput id="ti1" text=""/>
</mx:VBox>
<mx:Button id="btnSelect" label="Select File Type" click="displayForm();"/>
</mx:Application>
//弹出窗口 TestTitleWindow.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
showCloseButton="true" width="410" borderAlpha="1" height="260">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
// Variables whose values are set by the main application.
// Data provider array for the components ComboBox control.
[Bindable]
public var myArray:Array;
]]>
</mx:Script>
<mx:ComboBox id="cb1" dataProvider="{myArray}" width="124"/>
<mx:HBox height="22">
<mx:Button id="okButton" label="OK"/>
<mx:Button id="cancelButton" label="Cancel"/>
</mx:HBox>
</mx:TitleWindow>
分享到:
相关推荐
Flex 点击按钮 弹出窗口并居中显示代码 复制就行了
Flex中弹出对话框的定制Flex中弹出对话框的定制Flex中弹出对话框的定制Flex中弹出对话框的定制
Flex使用弹出窗口(titlewindos)为DataGrid添加新数据
好东西,个人总结 自动弹出窗口(右下角弹出,右上角弹出)
好东西 个人总结,flex弹出窗口并居中显示
Flex-TitleWindow的弹出窗口中播放一段影像.zip Flex-TitleWindow的弹出窗口中播放一段影像.zip Flex-TitleWindow的弹出窗口中播放一段影像.zip
功能强大的弹出窗口选择器,支持模糊检索功能,通过配置文件可以使用多个检索关键字,支持托转功能,配置简单,使用方便,欢迎大家改进组件,奉上源代码。
NULL 博文链接:https://hje.iteye.com/blog/364524
flex4自定义弹出窗口 支持最大化 最小化
一个完成的Flex4 Air 自定义窗口,可以缩小到托盘中,后台运行
Flex特效_可拖动弹出窗口布局容器TitleWindow.zip )
flex TitleWindow 放大、缩小、可缩放 弹出窗口 直接把mytest项目导入flexBuilder可直接运行mytest.mxml看效果。
ListTitleWindow.mxml test.xml 博文链接:https://wangcheng.iteye.com/blog/79125
基于国外的 MacPopup 苹果风格,自己很喜欢,但是国外提供的 该控件 是基于flex 3的 ,所以在目前flex4为主流的 sdk 情况下,会出现错误。本控件 已经做了修正。可以直接运行。请指导。
flex4 线上带点,并弹出窗体效果代码,分享给大家做个参考,不能运行,这个是需要我的后台代码(java)结合才能看到效果,大家下载下来自己修改就可以了。 这个是效果图 ...
用flex实现苹果样子菜单,很酷,也很简单哦!
FLEX弹出框特效,FLEX弹出框特效,很好很强大