Visual Component in Flex4


 

Visual Component in Flex4

Flex 4 provide component based development model which is use to develop application and it is used to generate application user interface

Flex 4 provide component based development model which is use to develop application and it is used to generate application user interface

Visual Component in flex4:

Flex 4 provide component based development model which is use to develop application and it is used to generate application user interface. Visual component is flexible and provide the control over these component's appearance. The visual component have following characteristics that is Size, Events, Style,  Effects, Skins etc.

There are two types of components in Flex 4, one is Spark and other is MX. The Spark component are new added in Flex 4 and these component define in the spark.* package. And MX components old that uses in flex previous version and define in the mx.* package.

There are many visual component in Flex 4. You can see the button visual component in Flex 4 with the HBox and Panel.

 Example:

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

xmlns:s="library://ns.adobe.com/flex/spark"

xmlns:mx="library://ns.adobe.com/flex/mx" width="250" height="100">

<s:Panel width="240" height="100" horizontalCenter="2" title="Visual Component Button Example">

<mx:HBox>

<s:Button id="sbutton" label="Spark Button"/>

<mx:Button id="mxbutton" label="MX Button"/>

</mx:HBox>

</s:Panel>

</s:Application>

Output:

In this example you can see some component from MX and some is Spark. So we can say the Flex 4 is the combination of MX and Spark component.

Running Application:

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

Download this code

Ads