Archive for category Flex

Error: Constructor functions must be instance methods in Adobe Flex

Error: Constructor functions must be instance methods

One cause of the error message : ‘Error: Constructor functions must be instance methods’ in Flex can be caused when you have a component with the same ID or the variable with same name as the Application.

So if you have a file hitTestPoint1.mxml and a component <mx:Label id="hitTestPoint1" text="test" /> or  private var hitTestPoint11:Boolean = false; you might get this error.


Leave a comment

isPopUp property for PopUpManager in Adobe Flex

1) I created the popup window of  treatmentPlan :

var treatPlanPopup:treatmentPlan ;

treatPlanPopup = PopUpManager.createPopUp(Application.application as DisplayObject, treatmentPlan,true) as treatmentPlan;
treatPlanPopup.isPopUp = true;

2) isPopUp property can be used in 2 ways:

  1. Prevent creation of multiple window of treatmentPlan by PopUpManager by setting the isPopUp property to true and check the value again on next creation
  • on creation of popup window object  treatPlanPopup is created and on close it does not get null value , but isPopUp value becomes false.
  • Till window is not closed , isPopUp value remains true
  • So next time before opening the treatmentPlan window by PopUpManager, if you check the value treatmentPlan.isPopUp, it comes false
  • if(treatPlanPopup !=null && treatPlanPopup.isPopUp)
    {return}//do not open the popup window
  • *********************************************************
  • Create an undraggable TitleWindow container by setting the isPpUp property to false on the TitleWindow instance.
  • Example on

1 Comment

Customize drag Image while drag&drop in Flex

– check out the site to know how to customize the dragImage while drag & drop in Flex by using css.

Leave a comment

Remove drop indicator black line from list

 –  use (ListControl Id).hideDropFeedback(event as instance of drag event)

Leave a comment

International Registry for Flex Coders

– If you are the flex developer then there is good resource to present your identity as Flex Developer at international level. Just  add your name in flexcoders international registry for Flex developers. You can also search for your friends in Flex Technology here.
You can fine me also in list.

Leave a comment

Memory profile of MXML vs AS3 for ItemRenderers

 – check out the post “Memory profile of MXML vs AS3 for ItemRenderers .
-In this post they have comapred use of ItemRenderer for both case of MXML and AS3.

Leave a comment

Convert Wordpress into an Adobe Flex 3 Application

 – check out the post “Convert WordPress into an Adobe Flex 3 Application .

Leave a comment