I have skin a button with up, down, over, and disable states. I hope to know if there a code enable a button to keep press (down state) when the user press and hold a specific key link to that button. Something like down_button state.
0
votes
2 Answers
0
votes
0
votes
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function rotate():void
{
can.rotation +=5;
}
]]>
</mx:Script>
<mx:Button autoRepeat="true" buttonDown="rotate()" label="Rotate"/>
<mx:Canvas id="can" backgroundColor="#CA3859" width="200" height="200" horizontalCenter="0" verticalCenter="0"/>
</mx:Application>
set autoRepeat=true and use buttonDown event, insated of mouseDown. u'll get it
i hope this was ur need, k, use this example and i have flex3 ryt now, so it's in flex3
hav a gr8 time tc
Ankur sharma