嘉年虹
unread,Sep 9, 2009, 11:54:07 AM9/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.