Flex Alert
<?xml version="1.0"?>
<!-- Simple example to demonstrate the Alert control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.CloseEvent;
// Event handler function uses a static method to show
// a pop-up window with the title, message, and requested buttons.
private function clickHandler(event:Event):void {
Alert.show("Do you want to save your changes?", "Save Changes", 3, this, alertClickHandler);
}
// Event handler function for displaying the selected Alert button.
private function alertClickHandler(event:CloseEvent):void {
 
相关文档:
一、自定义Panel组件
package test
{
import mx.containers.Panel;
import mx.core.UIComponent;
/**
* 自定义Panel
* **/
public class MyPanel extends Panel
......
as:
var app:Object;
function setApp(ap:Object):void{
this.app=ap;
}
btn.addEventListener(MouseEvent.CLICK,onClick);
function onClick(event:MouseEvent):void{
app.fun(btn.label);
}
flex:
private function onSwfLoaded(event:Event):void
{
myloader.addEventListen ......
FLEX--仿Google联想框效果--现在好多地方都用到了这样的效果,当然,现在Google下线了,不让用了,但是跟网上说的一样,想办法,它还是能出来的
首先是事件源,也就是从何而起,如下的一个输入框:
复制代码 代码如下:
<mx:FormItem label="集团客户:" width="42%">
<!--change1-->
<mx:TextInput id="txt ......