hi all very good morning,
i want to run this coding in Flex..but it show file not found wound able run
is example..please give me solution for that
// This is the script in the main.mxml
import flash.display.Sprite;
import com.rotator.SimpleRotator;

public function init():void {

// You could made this more easy by using an array
myRotator = new SimpleRotator(50, 60, 60);
myRotator2 = new SimpleRotator(90, 60, 50);
myRotator3 = new SimpleRotator(130, 60, 40);
myRotator4 = new SimpleRotator(170, 60, 30);
myRotator5 = new SimpleRotator(210, 60, 20);
myRotator6 = new SimpleRotator(250, 60, 10);

myUIComponent.addChild(myRotator);
myUIComponent.addChild(myRotator2);
myUIComponent.addChild(myRotator3);
myUIComponent.addChild(myRotator4);
myUIComponent.addChild(myRotator5);
myUIComponent.addChild(myRotator6);

}
The class of the SimpleRotator looks like this:

// This indicated the location of the file as well
package com.rotator {

import flash.display.Sprite;
import flash.display.Shape;
import flash.utils.*;

public class SimpleRotator extends Sprite {

public function SimpleRotator(x:int, y:int, time:Number):void {
this.x = x;
this.y = y;

this.graphics.beginFill(0x00FF00);
this.graphics.drawRect( -13, -13, 26, 26);
this.graphics.endFill();

this.graphics.beginFill(0x00FF00);
this.graphics.drawCircle(0, 0, 15);
this.graphics.endFill();

this.setTime(time);
}

public function setTime(time:Number):void {
var intervalId:uint = setInterval(step, time);
}

public function step():void {
this.rotation += 3;
}
}
}
Regards
Ganesh kumar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to