Example 2 - Creating components

package  
{
	import com.fvf.FVFApp;
	import com.fvf.controls.FVFButton;

	import flash.events.MouseEvent;
	
	public class ExampleApplication extends FVFApp
	{
		public function MyApplication() {
		}
		
		override protected function run() {
			var myButton:FVFButton = new FVFButton();
			myButton.label = "dasdasdasdasd";
			myButton.toolTip = "Flex tooltip";
			myButton.addEventListener(MouseEvent.CLICK, onButtonClick);
			
			application.addChild(myButton.toDisplayObject());
		}
		
		private function onButtonClick(e:MouseEvent):void {
			trace("MyButton clicked");
		}
	}
}

exmpl2.jpg

Explanation
At first, FVF application will try to load FlexFramework

Last edited Aug 29, 2008 at 1:42 PM by PasalicZaharije, version 3

Comments

No comments yet.