你好,World Flex 3
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了你好,World Flex 3相关的知识,希望对你有一定的参考价值。
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="436" height="248" creationComplete="mainFunction()"> <mx:Script> <![CDATA[ import mx.controls.Alert; //main function to run at application startup /* adds event listener to the 'hello2' button * that listens for a user mouseclick. */ private function mainFunction(): void { this.hello2.addEventListener(MouseEvent.CLICK, helloFunction); } //event function that fires an alert window on click private function helloFunction(): void { Alert.show('Hello World!', 'Message 2'); } ]]> </mx:Script> <!-- Hello World Example 1 utilizing in line MXML click events --> <mx:Label y="36" text="Hello World Example 1" color="#FFFFFF" fontWeight="bold" horizontalCenter="0"/> <mx:Button y="62" label="Hello World 1" click="Alert.show('Hello World!', 'Message')" id="hello1" color="#000000" horizontalCenter="0"/> <!-- Hello World Example 2 using event handlers in AS3 --> <mx:Button y="125" label="Hello World 2" id="hello2" horizontalCenter="0"/> <mx:Label y="99" text="Hello World Example 2" color="#FFFFFF" fontWeight="bold" horizontalCenter="0"/> </mx:Application>
以上是关于你好,World Flex 3的主要内容,如果未能解决你的问题,请参考以下文章