Haven't tested this, but this might be a way to accomplish it:

var btn:Button = new Button();
btn.setStyle("mouseDownEffect", "glowImage");
btn.setStyle("mouseUpEffect", "unglowEffect");

Will try it in the morning. Didn't realize effects were set using styles.

- Alex

--- In flexcoders@yahoogroups.com, "oneworld95" <oneworl...@...> wrote:
>
> Is there a way to add mouseDown and mouseUp effects to a button that's
> being added dynamically via ActionScript?
> 
> For example, if the button were created via MXML, it would look like
this,
> 
> <mx:Button label="Help" 
> mouseDownEffect="{glowImage}" mouseUpEffect="{unglowImage}"
> click="showHelp()" />
> 
> - Alex
>


Reply via email to