Showing posts with label alert in flex. Show all posts
Showing posts with label alert in flex. Show all posts

Friday, June 25

Simple Alert in Flex


Sample code to understand Alert in Flex.

Step 1:
Create a New Flex Project in a Flex Builder with Application type “None”.

Step 2:
Then MXML file will be opened and ready to start.

Go to Design View

Step 3:
Drag a Button from the Flex Component.

Step 4:
Change the label of the Button and add click event to the button using the function name.

Sample code looks like




import mx.controls.Alert;
private function show():void
{
Alert.show("You have clicked the Button","Message Window");
}
]]>




Step 5:
Thats it all done.

Output looks