0 Replies Latest reply on Feb 1, 2010 8:40 PM by Setec Astronomy 0

    Popup Creates error in Web Browser, Error# 1009, but still works?

    Setec Astronomy 0

      I have an application that I am working on. in a module I am trying to create a Popup of a custom mxml component that I have created a file for. when I run it and click the button that opens the popup I get a null object reference error and after I hit continue it works fine. I get the same error when I remove the popup. I have set it up like in this example. the popup is based on the mx:TitleWindow.

       

       

      
           <fx:Script>
                <![CDATA[
                     import components.ahVideoPlayer;
                     import mx.core.IFlexDisplayObject;
                     import mx.managers.PopUpManager;
                     
                     protected function displayVid():void
                     {
                          var vidWindow:IFlexDisplayObject = PopUpManager.createPopUp(this , ahVideoPlayer);
                     }
                ]]>
           </fx:Script>
      

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" 
                          xmlns:s="library://ns.adobe.com/flex/spark" 
                          xmlns:mx="library://ns.adobe.com/flex/halo" layout="absolute" width="720" height="515" showCloseButton="true" close="close(event)">
           <fx:Script>
                <![CDATA[
                     import mx.events.CloseEvent;
                     import mx.managers.PopUpManager;
      
                     protected function close(event:CloseEvent):void
                     {
                          PopUpManager.removePopUp(this);
                     }
      
                ]]>
           </fx:Script>
           <fx:Declarations>
                <!-- Place non-visual elements (e.g., services, value objects) here -->
           </fx:Declarations>
           <s:VideoPlayer left="0" right="0" top="0" bottom="0" autoPlay="false" id="vid"/>
      </mx:TitleWindow>