我有一個Flash Player,在單擊縮略圖時加載新電影或帶有類的項目的任何元素。在FF中可以正常工作,但不能在Chrome或IE中使用。需要幫助找出錯誤:「遺漏的類型錯誤:不能調用方法'的未定義」Uncaught TypeError:無法調用未定義的方法'loadItem'
這裏loadItem是頭腳本:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
var isFlashReady = false;
function flashReady(){isFlashReady = true;}
function showRegistration(){alert("showRegistration");}
function registrationCompleted(){thisMovie("player1").registrationCompleted();}
function loadItem(id){thisMovie("player1").loadItem(id);}
function thisMovie(movieName){if (navigator.appName.indexOf("Microsoft") != -1){return document.getElementById(movieName);}else{return document[movieName];}}
</script>
<script type="text/javascript">
jQuery(document).ready(
function() {jQuery(".item").click(function() { loadItem(this.id); });}
);
</script>
並從頁面中包括視頻播放器和一個列表的代碼圖片
<object data="player.swf" name="player1" id="player1" type="application/x-shockwave-flash" align="middle" width="853" height="480" >
<param value="player.swf" name="movie"> <!--was missing this var which IE 6,7,8 needed -->
<param value="high" name="quality">
<param value="#333333" name="bgcolor">
<param value="true" name="play">
<param value="true" name="loop">
<param value="window" name="wmode">
<param value="showall" name="scale">
<param value="true" name="menu">
<param value="true" name="devicefont">
<param value="" name="salign">
<param value="always" name="allowscriptaccess">
<param value="true" name="allowFullScreen">
<param value="xml=reach.xml&defaultId=1" name="flashvars">
Install Adobe Flash and revisit to watch video content. <!--This is alternate content, took it out and Chrome worked fine -->
</object>
<div style="float:left;">
<p><strong>Space Track</strong></p>
<ul>
<li><img src="images/spacetrack1a.jpg" class="item" id="1" title="Space Track Video #1" alt="Space Track Video #1" width="120" height="70" /></li>
<li><img src="images/spacetrack2.jpg" class="item" id="2" title="Space Track Video #2" alt="Space Track Video #2" width="120" height="70" /></li>
<li><img src="images/spacetrack3.jpg" class="item" id="3" title="Space Track Video #3" alt="Space Track Video #3" width="120" height="70" /></li>
<li><img src="images/spacetrack4.jpg" class="item" id="4" title="Space Track Video #4" alt="Space Track Video #4" width="120" height="70" /></li>
</ul>
</div>
的
死海龜!!!!! –
復活龜3,你已經死了粉碎機! – McPace
哇!好的問題是備用閃存內容句子。拿出來,它完美的作品。我認爲那是最愚蠢的事情。 – McPace