AIR error 2006 after loading <mx:HTML>

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kokababu
    New Member
    • Jul 2008
    • 39

    AIR error 2006 after loading <mx:HTML>

    I am new in AIR/Flex. I have created a browser using <mx:HTML>. During the loading, I am getting the following error:

    RangeError: Error #2006: The supplied index is out of bounds.
    at flash.display:: DisplayObjectCo ntainer/getChildAt()
    at mx.core::Contai ner/getChildAt()
    at mx.containers.u tilityClasses:: BoxLayout/updateDisplayLi st()
    at mx.containers:: Box/updateDisplayLi st()
    at mx.core::UIComp onent/validateDisplay List()
    at mx.core::Contai ner/validateDisplay List()
    at mx.managers::La youtManager/validateDisplay List()
    at mx.managers::La youtManager/doPhasedInstant iation()
    at Function/http://adobe.com/AS3/2006/builtin::apply( )
    at mx.core::UIComp onent/callLaterDispat cher2()
    at mx.core::UIComp onent/callLaterDispat cher()


    I did not creating or adding or removing any child from my mxml file. My code snippet of mxml file is:

    Code:
    	
    ..........
    			public function set jumpToUrl(value:String):void
    			{
    				_jumpToUrl = value;
    				
    				if (value != "" && value != null)
    				{
    					txtLocation.text = value;
    					launchURL();
    				}
    			}
    
    			private function launchURL():void
    			{				
    				htmlBrowser.location = txtLocation.text;		
    			}
    
    .........
    .........
    		<controls:TextInputOnScreen id="txtLocation"
    									height="100%"
    									styleName="urlBox"
    									width="100%"
    									click="_modifyLocation(event)"
    									editable="false">
    			<controls:filters>
    				<mx:DropShadowFilter alpha="0.5"
    									 inner="true" />
    			</controls:filters>
    <mx:HTML id="htmlBrowser"
    			 height="{this.height - 50}"
    			 width="{this.width}"
    			 x="0"
    			 y="50"/>
    
    ................
    
    			 />
    I would be glad if anyone help me about this issue.
Working...