zoukankan      html  css  js  c++  java
  • Flash Builder 初试(一)信息提示窗口

    Flash Builder的安装就不多说了,网上有很多教程,先来试一个最基本的功能,加载完成页面后,弹出“页面加载完成”提示框。

    在<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" >中输入creationComplete,按ALT+/,选择"生成creationComplete处理函数",系统会自动生成代码。

    
    
    import mx.events.FlexEvent;

    protected
    function application1_creationCompleteHandler(event:FlexEvent):void {   // TODO Auto-generated method stub
      // 这里输入的代码会在加载完成时执行
    }

    在application1_creationCompleteHandler中输入代码,Alert.show("页面加载完成","欢迎",Alert.OK);弹出提示框,程序会自动生成import mx.controls.Alert;

    代码如下:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                   xmlns:s="library://ns.adobe.com/flex/spark" 
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
        <s:layout>
            <s:BasicLayout/>
        </s:layout>
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.events.FlexEvent;
                
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                {
                    // TODO Auto-generated method stub
                    Alert.show("页面加载完成","欢迎",Alert.OK);
                }
                
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- 将非可视元素(例如服务、值对象)放在此处 -->
        </fx:Declarations>
    </s:Application>
  • 相关阅读:
    二进制位运算
    Leetcode 373. Find K Pairs with Smallest Sums
    priority_queue的用法
    Leetcode 110. Balanced Binary Tree
    Leetcode 104. Maximum Depth of Binary Tree
    Leetcode 111. Minimum Depth of Binary Tree
    Leetcode 64. Minimum Path Sum
    Leetcode 63. Unique Paths II
    经典的递归练习
    案例:java中的基本排序
  • 原文地址:https://www.cnblogs.com/taobox/p/2913152.html
Copyright © 2011-2022 走看看