1 Reply Latest reply on Feb 18, 2010 4:12 AM by Vikram_S

    passing parameters from html to flash and setting the width

    Prashant Waykar

      Hello sir,

       

      i am passing the width and height from my html file to the flash file.

      and i want to set the Applications width and height using the passed data

      this is my html file.

       

      <html>

      <body>

      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

      codebase="http://download.macromedia.com/pub/shockwave/

      cabs/flash/swflash.cab#version=6,0,40,0" 

      width="100%" height="100%"  id="frame">

      <param name="movie" 

      value="$e.getURL('flash.swf')?screenWidth=1295&screenHeight=485" /> 

      <param name="quality" value="high" />

      <param name="bgcolor" value="#ffffff" />

      <param name="allowFullScreen" value="true" />

      <embed src="$e.getURL('flash.swf')?screenWidth=1295&screenHeight=485" quality="high" bgcolor="#ffffff"

      width="100%" height="100%" allowFullScreen="true"

      name="mymoviename" align="" type="application/x-shockwave-flash"

      pluginspage="http://www.macromedia.com/go/getflashplayer">

      </embed>

      </object>

      </body>

      </html>

       

       

      Using the screenWidth and screenHeight i want to set the width and height of my flex application

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">

      <mx:Script>

      <![CDATA[

      public function init():void

      {

      Application.application.width = Application.application.parameters.screenWidth;

      Application.application.height = Application.application.parameters.screenHeight;

      }

      ]]>

      </mx:Script>

       

      </mx:Application>

       

      I have tried with this but its still not working.

      Can some one please help me out

      Thanks in advance.