I needed a few different size play buttons to show up over an image and using transparent GIF images resulted in uglyness. So to throw another component in my tool box I wrote "PlayButton". If you need a play button to show up on a mouse over this could be a a nice clean component to throw in there. Configurbility includes background color & alpha, play button color & alpha as well as fadein/fadeout effect settings. The "background" and play button are configured seperatly so you can have a small play button in the center of a very large masked area if you desire.
private function getPlayButton(target:DisplayObject, buttonWidth:int):PlayButton {
var btn:PlayButton = new PlayButton(true, 0xFFFFFF, 0.45, 0xFF0000, 0.85);
btn.width = target.width;
btn.height = target.height;
btn.playButtonWidth = buttonWidth;
return btn;
}
In my example above I only set the playButtonWidth and not the height because the button by default will scale upon the setting of either width or height. You can turn this off with a simple "btn.scaleButtonOnResize = false".
Download the latest version of PlayButton (source code & example)
Read the full post to see the example app on screen