Search Flex Components Free

Custom Search

December 25, 2007

Flex Simple Effect Source Code

Flex Custom Effects Defined Programmatically Sample Source Code:
Create a file:


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

<mx:Application xmlns:mx="" backgroundAlpha="0">


import mx.effects.*;

private function moveImage(xTo:int, yTo:int):void
var m:Move = new Move(img);
m.xTo = xTo;
m.yTo = yTo;;


<mx:Panel title="moveEffect Demo [Programmatic Approach]" width="100%" height="100%"

<mx:Label text="Click anywhere on the canvas to move the phone to that position"/>

<mx:Canvas id="canvas" width="100%" height="100%" mouseDown="moveImage(mouseX - 40, mouseY - 80)">

<mx:Image id="img" source="@Embed('../assets/products/Nokia_6630.png')"/>




Related Flex Tutorials