Posts Tagged ‘flex3’

Xml in flex

November 11, 2009 Leave a comment

We can call any XML data from flex.

Click here to read the full post………


dynamic photo gallery in flex

September 4, 2009 Leave a comment

Click here to read the full post………

g map in flex

August 29, 2009 Leave a comment

we can bring gmap in flex by adding their library files to your flex project and calling the suitable function you need.

Click here to read the full post………

Custom Components

August 24, 2009 Leave a comment

One of the main uses of MXML components is to extend the functionality of an existing Flex component.

Custom Components are one of the best features of can create custom components in flex  by creating a new component file

<?xml version="1.0" encoding="utf-8"?>
<mx:ComboBox xmlns:mx="">

        <mx:String>United States</mx:String>
        <mx:String>United Kingdom</mx:String>
        <!-- Add all other countries. -->

a custom component may look like this.
you can notice that its not an application file and it is just a
combo box,because it can be written only as an component and can be called
in any part of the main

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

    width="220" height="115"


the main purpose of using a custom components are its reusablity features.

flex video display

August 2, 2009 Leave a comment

In flex, the video display control lets you play an flv file in to a flex application.

Click here to read the full post………

Flex Icon Button

August 1, 2009 Leave a comment

Setting an Icon in a button, in mxml is pretty easy.

Click here to read the full post………

creating flex components in Actionscript

August 1, 2009 Leave a comment

You can create a component in flex in two ways one with MXML we all know that and the other with Actionscript.The latter is a bit difficult but much more effective when it comes to understanding the code.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”; layout=”absolute” creationComplete=”initApp()”>
import mx.controls.Button;
private function initApp():void
var mybutton:Button=new Button();

The above example shows how to write an entire button component in AS.The function initApp() is called in the main application as creation complete event.All the you have in your mxml application can be called in your script section.

first you need to declare a variable for the button (var mybutton:Button)  then you need to call the constructor for the component (new Button();)

Note: The properties of the component should can be called using a .(dot) parameter(eg: mybutton.label=”hi”;)with the same name.

were as the style property of the component can be called using setStyle( )

(this.addChild(mybutton);)  in this line we are adding the our component to the container  AddChild();,so that our component is added to the main application.