你好世界Flash Builder

Posted

tags:

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

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  3. xmlns:s="library://ns.adobe.com/flex/spark"
  4. xmlns:mx="library://ns.adobe.com/flex/mx"
  5. width="436" height="248" creationComplete="mainFunction()">
  6. <fx:Script>
  7. <![CDATA[
  8. import mx.controls.Alert;
  9.  
  10. // main function that fires when creation is complete
  11. /* adds event listener to the button with the id "hello2"
  12. * that listens for a mouseclick event and designates
  13. * a function to be called when the mouse is clicked. */
  14. private function mainFunction():void
  15. {
  16. this.hello2.addEventListener(MouseEvent.CLICK, helloFunction);
  17. }
  18.  
  19. //function that is fired on click
  20. private function helloFunction():void
  21. {
  22. Alert.show('Hello World!', 'Message 2');
  23. }
  24. ]]>
  25. </fx:Script>
  26.  
  27. <!--Hello World Example 1 using inline MXML click events -->
  28. <s:Label y="30" text="Hello World Example 1" color="#000000"
  29. fontWeight="bold" horizontalCenter="2"/>
  30. <s:Button y="50" label="Hello World 1"
  31. click="Alert.show('Hello World!', 'Message')"
  32. id="hello1" color="#000000" horizontalCenter="1"/>
  33.  
  34. <!-- Hello World Example 2 using event handlers in AS3 -->
  35. <s:Label y="96" text="Hello World Example 2" color="#000000"
  36. fontWeight="bold" horizontalCenter="2"/>
  37. <s:Button y="125" label="Hello World 2"
  38. id="hello2" color="#000000" horizontalCenter="1"/>
  39. </s:Application>

以上是关于你好世界Flash Builder的主要内容,如果未能解决你的问题,请参考以下文章

python打印“你好世界”与“你好世界”

你好世界

#世界,你好!

世界你好!

Unity WebGL开启“后Flash”世界

使用 GraphQLObjectType 的世界你好