SimpleButton problem in FLite

5 views
Skip to first unread message

嘉年虹

unread,
Sep 9, 2009, 11:54:07 AM9/9/09
to Flash Lite
Hi, one and all.
I'm new to working on a FlashLite3.0 project. I found the button which
is drawn on stage directly, could not recognize its inner instances
like dynamic text or the inner MovieClips. So I'm looking for another
way to resolve the problem of the button with a dynamic text label. I
made a custom class SimpleButtonFL extends MovieClip to listen the
mouse events to change the movieClip's display state. However, it
seems ignores the onMouseDown handler in the emulator of device
central; and, where I use the FlashPlayer10 to run it, as I click the
other blank place on stage(not on the button), the button is also
changed to the 'down' state. My class is writen like this:

class SimpleButtonFL extends MovieClip {
function SimpleButtonFL() {
stop();
onRollOver = onDragOver = onMouseUp = function() {
gotoOver();
};
onRollOut = onDragOut = onReleaseOutside = function() {
gotoNormal();
};
onMouseDown = function() {
gotoDown();
trace(this);
};
}

private function gotoOver():Void {
gotoAndStop('over');
}
private function gotoNormal():Void {
gotoAndStop('normal');
}
private function gotoDown():Void {
gotoAndStop('down');
}
}

So, could any body help me to fix this problem? Thanks to you all...
And, please forgive my poor writen Eng.
Reply all
Reply to author
Forward
0 new messages