2011-02-09 5 views
-1
<object id="player" name="player" width="671" height="442"> 
    <param name="movie" value="player.swf" /> 
    <param name="allowfullscreen" value="true" /> 
    <param name="allowscriptaccess" value="always" /> 
    <param name="flashvars" value="file=video/video.mp4&image=preview.jpg" /> 
    <embed 
     type="application/x-shockwave-flash" 
     id="player2" 
     name="player2" 
     src="player.swf" 
     width="671" 
     height="442" 
     allowscriptaccess="always" 
     allowfullscreen="true" 
     flashvars="file=video/video.mp4" -------FLASHVARS 
    /> 
</object> 
    <a href="video-test.mp4"><img></img></a>----------------- if i click this iwant the value of this href to be the in the FLASHVARS 

答えて

1

まずそれが

< ID =「lnktochange」のhref = "ビデオ・テストとなりますので、私はあなたのハイパーリンク要素に(あなたはまた、いくつかのCSSクラスを追加することができます)のIDを追加してい上の埋め込みを操作します.MP4 "> </A>

$(ドキュメント).ready(関数(){

$(" #のlnktochange」)。(関数(E){

VARさh = $をクリックしてください(this).attr( "href");

$( "#player2")。attr( "flashvars"、h);

e.preventDefault();

});

});