How do I get a Flash movie to show up under a drop down menu (CSS or javascript)?| Author | | john
7/19/2010 12:26:43 PM | Answer: you need to set the wmode value to "transparent" when embedded the movie into the page.
For example, you could use a javascript function like this:
function writeFlash(fpath,w,h,alt) {
var alternateContent = alt ? alt : 'Some content on this page requires the latest' +
'Flash Player.';
var fpath = fpath.replace(/.swf/,'');
var fname = fpath.split('/').pop();
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
var hasRightVersion = DetectFlashVer(requiredMajorVersion,
requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable version
// embed the flash movie
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com' +
'/pub/shockwave/cabs/' + 'flash/swflash.cab#version=' +
requiredMajorVersion + ',0,0,0',
'width', w,
'height', h,
'src', fpath,
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'transparent',
'devicefont', 'false',
'id', fname,
'bgcolor', '#ffffff',
'name', fname,
'menu', 'true',
'allowScriptAccess','sameDomain',
'allowFullScreen','false',
'movie', fpath,
'salign', ''
); //end AC code
} else { // flash is too old or we can't detect the plugin
document.write(alternateContent); // insert non-flash content
}
}
}
| | |
| |
|
Update - The old code stopped working on FireFox 4.0+ The old menu.js file stopped working. Do two things to fix it:
1) add style="position:relative;....
more
|