0 Replies Latest reply on Dec 30, 2011 3:21 AM by anikethm

    Javascript/ActionScript Communication in Flex

    anikethm Level 1

      Hi, I have tried with this code. But when i run it in I.E 8 Its showing some error,




      <?xml version="1.0"?>

      <!-- wrapper/AddCallbackExample.mxml -->




          xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="initApp()">


              import flash.external.*;



               public function initApp():void {





               public function myFunc(s:String):void {

                  l1.text = s;





          <s:Label id="l1"/>





      /// addCallBack.html






      <body scroll='no'>



      <SCRIPT LANGUAGE="JavaScript">

          function callApp() {

              window.document.title = document.getElementById("newTitle").value;






      <h1>AddCallback Wrapper</h1>



      <form id="f1">

          Enter a new title: <input type="text" size="30" id="newTitle" onchange="callApp()">




      <table width='100%' height='100%' cellspacing='0' cellpadding='0'>


              <td valign='top'>

                  <object id='mySwf' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' height='200' width='400'>

                      <param name='src' value='AddCallbackExample.swf'/>

                      <param name='flashVars' value=''/>

                      <embed name='mySwf' src='AddCallbackExample.swf' height='100%' width='100%' flashVars=''/>









      Whether the code is correct.?? If yes what may be the error or problem. Please Help.