R – Best way to make a flash “popup”

actionscript-3flash

On my website I want a small flash banner which the user can activate somehow and it grows a lot larger to display a lot more information.

I've seen advertising banners which annoyingly do this when you mouse over them although I'd want to ask the user to click a specific "more" button.

I can think of two ways
1) Make the flash movie the full size and put it in a transparent mode using the "wmode" parameter to flash and only draw the full thing when asked to.
2) Put the movie in a div on the html page and locate it using absolute positioning with css. When The user clicks, make a flash callback to javascript on the page to make the div bigger, overlaying part of the page

Both seem to have disadvantages and compatibility problems. Does anyone have any suggestions which to use, or a third way?

Best Answer

I'd use javascript to swap between a small swf for "normal" mode and a large overlay one (using wmode=transparent).

This is because a flash overlaying the page won't let clicks through also some setups simply don't support transparency for flash (specifically some linux configurations iirc) and that would make the entire site unusable.

Also, wmode=transparent is sloooow. So only use that when it's necessary.