【发布时间】:2011-03-22 15:40:19
【问题描述】:
我正在使用 Flash CS4 制作视频播放器。我正在尝试构建播放器,以便当用户将鼠标移到 flash 对象上时,播放控件会出现,而当用户将鼠标移出 flash 对象时,控件会消失。
我设法将一些代码放在一起,可以在除一个浏览器之外的所有浏览器中运行:Internet Explorer。好吧,它“有效”,但前提是您将鼠标缓慢移出 Flash 对象的左侧。
我在 Google 上搜索了很多答案,但似乎找不到有类似问题的人。
代码如下:
动作脚本代码:
_root.onLoad = function(){
_root.clip.skinAutoHide=true;
_root.clip.skinFadeTime=0;
}
_root.onRollOver = function () {
_root.clip.skinAutoHide=false;
}
_root.onRollOut = function () {
_root.clip.skinAutoHide=true;
_root.clip.skinFadeTime=0;
}
网站代码(插入 flash 应该去的地方):
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=8,0,24,0',
'width', '280',
'height', '280',
'src', '01clip1',
'quality', 'best',
'pluginspage', 'http://www.adobe.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'noscale',
'wmode', 'transparent',
'devicefont', 'false',
'id', '01clip1',
'bgcolor', '#ffffff',
'name', '01clip1',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', '01clip1',
'salign', ''
); //end AC code
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here.'
+ 'This content requires the Adobe Flash Player.'
+ '@987654321@';
document.write(alternateContent); // insert non-flash content
}
任何见解将不胜感激。
【问题讨论】:
-
嗨!可能完全不相关,但你真的需要你的 wmode 是透明的吗?尝试 opaque 或 window 以获得更好的性能,也许可以解决您的问题...
-
我尝试了您的建议只是想看看它是否导致了问题,但它并没有解决问题。不幸的是,让我们这样做的客户希望它是透明的,因此视频(那个人走着说话,透明背景)看起来就像那个人走进了网页。
标签: flash actionscript internet-explorer-8 actionscript-2 flvplayback