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 {
 
相关文档:
We're going to keep this post lean and mean, and get down to
business with 10 Tips that will keep your Flex applications fast, lean,
and responsive.
Rule # 1: Clean up after yourself
In general, it is good practice to maintain clean code. Not only
in the sense of having properly formatted and ......
FLEX中所有的布局都需要容器。<mx:Application>标签实际上就是一个容器。每个容器都有一定的规则来确定子元素的排列方式,也就是本文讨论的FLEX容器布局规则。
VBox
子元素沿垂直方向排列。每个子元素都会绘制在前一个子元素的下方。
HBox
子元素沿水平方向排列。每个子元素都会绘制在前一个子元素的右方。
Canv ......
一、自定义Panel组件
package test
{
import mx.containers.Panel;
import mx.core.UIComponent;
/**
* 自定义Panel
* **/
public class MyPanel extends Panel
......
Flex中如何通过strokeWidth, strokeColor和shadowColor样式,创建一个自定义风格的HRule或VRule
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
&nbs ......
1、假如一个自定义控件被用在一个主控件里,在自定义控件里的方法可以转换为主控件的方法,完成调用。
userRulesCanvas.mxml 和 editRulesCanvas.mxml
compent控件代码如下:
private function submitClick():void
{
......