6 Replies Latest reply on May 15, 2008 10:54 PM by Madhav Subedi

    Problem in using custom component.

    Madhav Subedi Level 4
      i want to create a custom component using action script
      i'm using flex builder 2.
      i looked at flex 2 devlopers' guide, and tried with the simplest example, having two parts:

      MyButton.as file, for the custom component:
      package myControls
      import mx.controls.Button;
      public class MyButton extends Button
      public function MyButton():void


      the main application mxml file contains:
      <?xml version="1.0" encoding="utf-8"?>
      xmlns:mx=" http://www.adobe.com/2006/mxml"
      layout="absolute" xmlns:myControls="myControls.*">
      <myControls:MyButton width="100" height="25"/>

      while compiling, flex builder shows a message:
      Errors exist in required project(s):myproject
      Continue Launch?

      however, when i remove the following line from main application file:
      <myControls:MyButton width="100" height="25"/>
      it successfully runs.

      please somebody help if there is any other issue regarding.