你好,World Flex 3

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了你好,World Flex 3相关的知识,希望对你有一定的参考价值。

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
  3. width="436" height="248" creationComplete="mainFunction()">
  4. <mx:Script>
  5. <![CDATA[
  6. import mx.controls.Alert;
  7.  
  8. //main function to run at application startup
  9. /* adds event listener to the 'hello2' button
  10. * that listens for a user mouseclick. */
  11. private function mainFunction(): void
  12. {
  13. this.hello2.addEventListener(MouseEvent.CLICK, helloFunction);
  14. }
  15.  
  16. //event function that fires an alert window on click
  17. private function helloFunction(): void
  18. {
  19. Alert.show('Hello World!', 'Message 2');
  20. }
  21. ]]>
  22. </mx:Script>
  23.  
  24. <!-- Hello World Example 1 utilizing in line MXML click events -->
  25. <mx:Label y="36" text="Hello World Example 1" color="#FFFFFF"
  26. fontWeight="bold" horizontalCenter="0"/>
  27. <mx:Button y="62" label="Hello World 1"
  28. click="Alert.show('Hello World!', 'Message')"
  29. id="hello1" color="#000000" horizontalCenter="0"/>
  30.  
  31. <!-- Hello World Example 2 using event handlers in AS3 -->
  32. <mx:Button y="125" label="Hello World 2"
  33. id="hello2" horizontalCenter="0"/>
  34. <mx:Label y="99" text="Hello World Example 2" color="#FFFFFF"
  35. fontWeight="bold" horizontalCenter="0"/>
  36. </mx:Application>

以上是关于你好,World Flex 3的主要内容,如果未能解决你的问题,请参考以下文章

html 你好,world.html

html 你好world.html

html 你好world.html

html 你好world.html

html 你好world.html

[oeasy]教您玩转python - 0002 - 你好世界(hello world!)