topical media & game development
[] readme course(s) preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthought(s) appendix reference(s) example(s) resource(s) _

talk show tell print

professional-flex-code-25-AVM2.mx

professional-flex-code-25-AVM2.mx (swf ) [ flash ]


  <?xml version="1.0" encoding="utf-8"?>
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
    initialize="init()"
    layout="vertical">
    <mx:Script>
      <![CDATA[
        private function init():void
        {
          ExternalInterface.addCallback( "retrieveMessage2", retrieveMessage2 );
        }
        private function retrieveMessage2( str:String ):void
        {
          txtOutput.text += str + "\n";
        }
      ]]>
    </mx:Script>
    <mx:HBox>
      <mx:Button 
        id="btnSend2" 
        label="Send AVM2" 
        click="ExternalInterface.call( 'sendMessage', 'AVM2: ' + txtMessage2.text )"/>
      <mx:TextInput
        id="txtMessage2" />   
    </mx:HBox>
    <mx:TextArea
      id="txtOutput"
      width="300" height="120" />
    <mx:SWFLoader
      id="ldrAVM1"
      source="AVM1.swf" />
  </mx:Application>


(C) A. Eliëns 2/9/2007

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.