topical media & game development

talk show tell print

actionscript-book-HelloWorld-HelloWorld.mx

actionscript-book-HelloWorld-HelloWorld.mx [swf] [flash] flex


  <?xml version="1.0" encoding="utf-8"?>
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" 
          layout="vertical"
          creationComplete = "initApp()" >
          
          <mx:Script>
                  <![CDATA[
                          private var myGreeter:actionscript_book_HelloWorld_Greeter = new actionscript_book_HelloWorld_Greeter();
                          
                          public function initApp():void 
                          {
                                  // says hello at the start
                                  mainTxt.text = myGreeter.sayHello();
                          }
                  ]]>
          </mx:Script>
          
          <mx:Label id="title" 
                    fontSize="24" 
                    fontStyle="bold" 
                    text="Hello World Example" />
                    
          <mx:Label id="subtitle" 
                    fontSize="12" 
                    text="From Programming ActionScript 3.0, Chapter 2: Getting started with ActionScript" />
  
          <mx:TextArea id = "mainTxt" width="400"/>                
          
  </mx:Application>
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.