Brooks Computing Systems Flash Builder Blog Headline Animator

Sunday, January 2, 2011

Test MulitpleMXML Components

To create a mxml component to test mulitple mxml components create a new mxml component. Create a horizontal group and place as many buttons on the group as you have components to test.

Make unique id's for each button. Create event handlers for all buttons. Don't worry about actions of the events we will take care of that later. For each button create a new corresponding state. I typically label states “sta”+button.text.

Click on a state giving it focus the drag the appropriate component from the components panel onto the state. I typically center the component on the canvas. Now lets return to each event handler and in set the currentState to the associated state. When you click on each button that component should become active.

Make sure to access the newly created component as the default for the mxml application. Typically you drag the newly created component onto the xmxl application in the design view.

This approach will allow you to test multiple components.

I can produce a video of the is same tutorial if enough people express and interest in seeing a video of this nature.

Saturday, January 1, 2011

Function to handle URLs

To invoke a URL in Flash Builder is unlike any other web scenario. I use the following function to launch web sites and applications.

protected function LaunchOne($cmd:String):void


var urlReq:URLRequest = new URLRequest($cmd);

navigateToURL(urlReq, "_blank");


To use the function use the following calling sequence.


The above calling sequence will pass the URL to the function and the function does the remainder of the heavy lifting.