Hi,
i have created a symbol called Display which contains a timer. The timer itself is made of a watch and hand symbol. I have exported it into FD and what i am trying to achieve is to rotat the hand every 1,000 miliseconds ever 6 degrees. The problem i am having is accessing the child object, hand, and adding the rotation. Can somebody tell me how i can access my child object so i can get it to rotate please. Although, my initial idea was to create a hand symbol, but after seeing the class by pressing F4, i only saw the watch var.
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.TimerEvent;
import flash.utils.Timer;
/**
* TimerEvent.as demonstrates the use of using Timer Events
* @author LuongVuong
* Created on: 06 July 09
* Last modified:
*/
public class TimeEvent extends Sprite
{
private var Display:SWCWorkFlow_Display;
private var Watch:MovieClip;
private var timer:Timer;
public function TimeEvent()
{
initialize();
construct();
}
public function initialize() :void
{
Display = new SWCWorkFlow_Display();
Watch = Display.watch;
timer = new Timer(1000); // 1,000 mili seconds or 1 second
}
public function construct() :void
{
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start;
addChild(Display);
}
// cant access hand and won't rotate even without???
public function onTimer(evt:TimerEvent) :void
{
Watch.rotation += 6;
}
}
}
App
[[COLOR=#800080]http://www.megaupload.com/?d=M0T2W83R[/COLOR]](http://www.megaupload.com/?d=M0T2W83R)
P.S i am using FlashDevelop to build my app
Thanks