0 Replies Latest reply on Apr 8, 2011 1:51 AM by TGeorgy

    Failed Alert window when application loaded from SWFLoader

    TGeorgy

      For example i've created two simple application.

       

      Parent application must to load another child application

       

      Main.mxml

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                     xmlns:s="library://ns.adobe.com/flex/spark" 
                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                     creationPolicy="all">
                     
          <mx:SWFLoader id="subApp1" trustContent="true" source="../subapp/Subapp.swf"/>    
      </s:Application>
      

       

      In child application i only call Alert.show in button click event.

       

      Subapp.mxml

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                     xmlns:s="library://ns.adobe.com/flex/spark" 
                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                     pageTitle="Subapplication" 
                     xmlns:ns1="*" width="600" height="1000"
                     creationPolicy="all">
          <s:Button id="btnAlert" label="Alert" click="Alert.show('test mess', 'Title')"/>
      </s:Application>

       

      As a result we receive an Alert-window displaced upwards of a window of a browser.

       

      Screenshot:

      http://clip2net.com/clip/m75928/1302192924-clip-10kb.png

      Instead of a usual window which is normally displayed if child application to call directly

       

      Screenshot:

      http://clip2net.com/clip/m75928/1302192880-clip-9kb.png

       

      The problem can be solved if i specify parent object for Alert call

      <s:Button id="btnAlert" label="Alert" click="Alert.show('test mess', 'Title', Alert.OK, this)"/>

       

      But it is not the desirable decision as the real child application very big.

       

      Somebody worked with this sort of problems?
      How it probably to solve?

       

      Thank you very mach!