简体   繁体   中英

Cannot load swf file runtime

I am adding a flvplayer runtime. When i am adding it on runtime it is not working but after reloading the page it is working fine.

Please take a look at my php and html code:-

function crete_template(record){
{
var tpl ='<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200">'+
                            '<param name="movie" class="movie" value="<?php echo JSPATH;?>player/player.swf" />'+
                            '<param name="allowfullscreen" value="true" />'+
                            '<param name="allowscriptaccess" value="always" />'+
                            '<param name="flashvars" value="file=<?php echo UPLOAD_PATH; ?>'+record.video_file+'" />'+
                            '<object type="application/x-shockwave-flash" data="<?php echo JSPATH;?>player/player.swf" width="400" eight="200">'+
                                '<param name="movie" class="movie" value="<?php echo JSPATH;?>player/player.swf" />'+
                                '<param name="allowfullscreen" value="true" />'+
                                '<param name="allowscriptaccess" value="always" />'+
                                '<param name="flashvars" value="file=<?php echo UPLOAD_PATH; ?>'+record.video_file+'" />'+
                                '<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>'+
                            '</object>'+
                        '</object>';
return $(tpl);
}

i am putting the whole html part into a div dynamically.

I am using this player

I think my "player/player.swf" file is not loaded in runtime. If question is not clear please ask me and help me.

function crete_template(record){
{
var tpl ='<object type="application/x-shockwave-flash" data="<?php echo JSPATH;?>player/player.swf" width="400" height="200">'+
                            '<param name="movie" class="movie" value="<?php echo JSPATH;?>player/player.swf" />'+
                            '<param name="allowfullscreen" value="true" />'+
                            '<param name="allowscriptaccess" value="always" />'+
                            '<param name="flashvars" value="file=<?php echo UPLOAD_PATH; ?>'+record.video_file+'" />'+
                            '<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>'+
                        '</object>';
return $(tpl);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM