1 Reply Latest reply on Nov 11, 2009 12:40 AM by blaka zakata

    TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@11c63ce9 to mx.events.FlexMouseEvent.

    n.vara1799

      Hi,

      I am new to flex coding inspite of importing import mx.events.* and mx.events.*, when i mouse over the check box i am getting the error

       

      "TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@11c63ce9 to mx.events.FlexMouseEvent."

       

       

      this is the code

      private function discontrydata():void
            {
             contryform.removeAllChildren();
            var wc:World_countries= new World_countries;
             var chkheight:int;
             var sortContKey:Array = wc.featureNames.sort();
            
             for(var i:int=0,chkheight=0; i<sortContKey.length; i++,chkheight=chkheight+20)
              {
               var chkBox:CheckBox =  new CheckBox;
               chkBox.id = "chk"+i;
               chkBox.label = DefaultData.getCountryName(sortContKey[i])
               chkBox.y = chkheight;
               chkBox.addEventListener(MouseEvent.MOUSE_OVER,showCont);
               contryform.addChild(chkBox);
              
              }
            }
            private function showCont(evt:FlexMouseEvent):void
            {
            
              Alert.show("conttryfom contains");
            
            }

       

      Please help me.

      vara prasad