0 Replies Latest reply on Apr 24, 2014 6:28 PM by FHiroyuki

    If the flash object is placed in 0px div, the creationComplete event is fired after a long wait time

    FHiroyuki

      <Problem>

      My requirement is to hide flash object on browser. However, If the flash object is placed in 0px div, the creationComplete event is fired after a long wait time. Is this a bug of Flex? (or Flash Player?)

       

      <Sample Code>

      <?xml version="1.0" encoding="utf-8"?>

       

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"

                initialize="app_initialize(event);" creationComplete="app_creationComplete(event);" >

      <mx:Script>

              <![CDATA[

              import mx.events.FlexEvent;

         

          private function app_initialize(evt:mx.events.FlexEvent):void

          {

                    ExternalInterface.call("alert", "application initialize.");

          }

         

          private function app_creationComplete(evt:mx.events.FlexEvent):void

          {

                    ExternalInterface.call("alert", "application creation complete.");

          }

         

          private function button_creationComplete(evt:mx.events.FlexEvent):void

          {

                    ExternalInterface.call("alert", "button creation complete.");

          }

              ]]>

          </mx:Script>

          <mx:Button id="testButton"  label="button"  creationComplete="button_creationComplete(event);"/>

      </mx:Application>

       

       

      <Steps to reproduce>

      1) Dowload the following samples

      MySwf-src.zip

      https://files.acrobat.com/a/preview/c6b7a191-c6c4-486f-9345-e2b5c21a4c0b

      TestSwf.zip

      https://files.acrobat.com/a/preview/98e613e1-63b1-4b2f-93f3-f6e4f4a27f24

      2) Unzip TestSwf.zip.

      3) Copy MySwf.swf, TestInvisible.html, and TestVisible.html to "c:\inetpub\wwwroot\". (Need to install the IIS.)

      4) Visit "http://localhost/TestVisible.html" via IE. notice the creationComplete event fired after initialize event immediately.  -- Correct

      5) Visit "http://localhost/TestInvisible.html" via IE. notice the creationComplete event fired a long time after initialize event.  -- Incorrect

       

      <Environment>

      Win8.1x64+IIS8.5+IE11+Flash player(13.0.0.182)

       

      <Note>

      If the flash object is placed in 1px or larger div, the creationComplete event is fired immediately.

      The problem occurs with other browsers(IE9,IE10,FF,Chrome) too.