1 Reply Latest reply on Aug 10, 2009 11:30 PM by kkc_mca

    Unable to import package

    MounikaPeddi

      Hi all,

       

      Iam very new to Adobe Flex,  I have imported packe "mx.controls.Alert" and used statement 'Alert.show("It is running")';' some where.

      Iam getting error "Access of undefined property " means the package is not imported. Please any one send me solution for this.

       

      Thanks in advance...

        • 1. Re: Unable to import package
          kkc_mca Level 2

          The application have one button display on the stage when the user click on the button

           

          the button will call displayAlert() function as it is registered for click event

           

          in the displayAlert() function Alert.show() method is called

           

           

          ==========================

          check the code below

          ===========================

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

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

          <mx:Script>

          <![CDATA[

          import mx.controls.Alert;

          public function displayAlert():void

          {

          Alert.show("displaying alert");

          }

          ]]>

          </mx:Script>

          <mx:Button label="Click to see Alert" click="displayAlert()"/> 

          </mx:Application>