Wednesday, March 17, 2010

Menu Overlap when Using Flash methods

When rewriting your embedded swf code to connect to Flash methods from a scripting environment such as javascript often introduces a new bug especially when you have a menu situated on top of the embedded object. Most often than not, the menu would be hidden underneath the swf.

Normally, the workaround to that is by adding a param "wmode" and setting it to either "opaque" or "transparent" but I have found out that while I have rewritten the code so that I can use the Flash methods within my js file, the wmode doesn't work as planned.

After scouring the net, I have come across this post from Drupal's forums.


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="urfront2" align="middle" height="180" width="550">
<param name="allowScriptAccess" value="sameDomain">
<param name="movie" value="urfront2.swf"><param name="menu" value="false"><param name="quality" value="high"><param name="wmode" value="transparent"><param name="bgcolor" value="#ffffff"><embed src="urfront2.swf" menu="false" quality="high" wmode="transparent" bgcolor="#ffffff" name="urfront2" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="180" width="550"></embed>
</object>

Ajax Loader

Customize your pre-loaders using the generator found in this site.

SWFObject Library

For the documentation, click here.

For the API, read more here.

Flash Object and Embed Attributes

For more info, click here.

Flash Methods: Scripting with Flash

A useful reference for interacting with Flash from a scripting environment ie.Javascript

http://www.adobe.com/support/flash/publishexport/scriptingwithflash/index.html