Posts Tagged ‘components in flex’

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.

usage of components

July 30, 2009 Comments off

Today i studied about components in flex. i was following video series for reference. it was really interesting to create a custom component and use it for later use.
lam now sure that i can create a custom component and use also introduced the concept of timer to me.

Categories: flex Tags: , ,