Actionscript 内的代码:
var methodName4:String = "startupload";
var instance4:Object = null;
var method4:Function = startupload;
var wasSuccessful4:Boolean = ExternalInterface.addCallback(methodName4, instance4, method4);
function startupload(currently_uploading_id) {
/* If there is still more photos to upload, then proceed to next one */
if((max_photo_number - session_photos))
{
uploadthis(selected_photos,currently_uploading_id);
}
}
Html:
<div id="e_upload" class="hidden">
<div id="upload_container">
</div>
</div>
JavaScript:
当 dom 加载时:
var cached_flash = $('#e_upload').html();
$('#e_upload').html('');
When generating html via javascript:
$(cached_flash).appendTo(full_ad.find('#e_upload_wrapper')).show();
就是这样。当我尝试上传某些内容时,闪存内的启动加载功能不再起作用。
这样调用 Actionscript:
/* Sending back to Flash */
function thisMovie(movieName) {
if (window.document[movieName]) {
return window.document[movieName];
}
if (navigator.appName.indexOf("Microsoft Internet") == -1) {
if (document.embeds && document.embeds[movieName])
return document.embeds[movieName];
}
else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
{
return document.getElementById(movieName);
}
}
thisMovie('fileref').startupload(currently_uploading_array_slot);
Actionscript 从内部调用 javascript 函数就很好,但 javascript 却不行。
问题是什么?如何重新绑定startupload函数?
你也有同样的问题。
我可以在 DOM 中移动 Flash 对象而不重新加载它吗? https://stackoverflow.com/questions/3963283/can-i-move-a-flash-object-within-the-dom-without-it-reloading
当您移动 Flash 时,它的 CSS 框会被破坏并重新创建。由于各种原因(更多信息请参阅链接),插件状态存储在 CSS 框中而不是 DOM 对象中,因此插件被“重置”。这意味着您用于与插件通信的对象变量不再保留有效的引用,因为插件已重新加载。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)