0 Replies Latest reply on Oct 13, 2009 2:54 AM by spugalia

    SWFLOADER Control - Passing parameters dynamically




      My requirement is to pass parameters to external swf file dynamically. For this I am using SwfLoader control. I am trying to bind the source property of swfLoader to a variable which gets set at creationComplete event of application but this do not work and swf file is not rendered.


      Second option I tried creating the control dynamically in creation complete event of application, but this is also not working.


      I am using Flex 3 and flash 9. Please let me know how to proceed. The parameter to the external swf should be passed dynamically. Below is the code.


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="LoadSwf()">




              public static var fileName:String = null;


              private function LoadSwf():void
                  fileName = "C:\eitms\data\thermo\swffiles\preview.swf?amountXML=C:\eitms\data\thermo\swffiles\total. xml";




      <mx:VBox id="secondStack" width="100%" height="100%">
          <mx:SWFLoader id="mapLoader" width="300" height="300" source = "{fileName}"  autoLoad="true" />




      This is urgent please help