Hmmm...not as easy as expected. Anyone have any ideas (MXML or
Actionscript)?
<mx:Button id="myButton" x="10" y="10" label="Squirrels!"
styleName="customBtn">
<mx:transitions>
<mx:Transition fromState="*" toState="*">
<mx:Fade alphaFrom="0" alphaTo="100" duration="20000" />
</mx:Transition>
</mx:transitions>
</mx:Button>
Stylesheet:
.customBtn {
upSkin: Embed(source='../assets/defaultButton_up.png',
scaleGridTop='6', scaleGridBottom='10', scaleGridLeft='40',
scaleGridRight='80');
overSkin: Embed(source='../assets/defaultButton_over.png',
scaleGridTop='6', scaleGridBottom='10', scaleGridLeft='40',
scaleGridRight='80');
downSkin: Embed(source='../assets/defaultButton_down.png',
scaleGridTop='6', scaleGridBottom='10', scaleGridLeft='40',
scaleGridRight='80');
}
Thanks!
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> In theory you can do this in Moxie, but in 2.x, all you are seeing is an
> inherited prop that Button does not use.
>
>
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of restlessdesign
> Sent: Monday, September 17, 2007 11:10 AM
> To: [email protected]
> Subject: [flexcoders] Re: Buttons in Flex !
>
>
>
> I too have this issue and did some quick research. Would it be
> possible to use the transitions property of the Button class and pass
> in effects that way using its pre-defined states (upState, overState,
> downState, etc.)?
>