I try to create a function to change border property of border container.
To do that I create a function for each border container on my MXML.
But I’d to code better and to do a generic function.
Today my function is:
protected function bcContact_mouseOverHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
bcContact.setStyle("borderVisible",true);
bcContact.setStyle("borderWeight",2);
bcContact.setStyle("borderColor",'#000099');
}
bcContact is one border container Id.
I try to replace bcContact by this but it doesn’t work.
Can you help me to solve this beginner mistake.
Thanks
You could extend the BorderContainer class (in Flash Builder, put in BorderContainer in the “Super class” text field)
Your class will look something like this:
This class will need to be in the file
src/com/extensions/containers/MyBorderContainer.asThen use this in your mxml as
where the namespace
containersis set to point tocom/extensions/containers