在ActionScript 3,我讓使用爲Javascript調用:ExternalInterface調用崩潰的瀏覽器
ExternalInterface.call('javascriptFunction');
如果在Javascript中,有一個錯誤或阻塞調用,整個瀏覽器將凍結。我無法在Firefox中使用Firebug進行調試,因爲通過回調進行的操作也會使瀏覽器崩潰。我如何去調試呢?
function javascriptFunction() {
alert('called from AS3');
// OR
nonExistent.madeUp();
}
在ActionScript 3,我做出的Javascript調用使用:
ExternalInterface.call('javascriptFunction');
如果在Javascript中,有一個錯誤或阻塞調用,整個瀏覽器將凍結。我無法在Firefox中使用Firebug進行調試,因爲通過回調進行的操作也會使瀏覽器崩潰。我如何去調試呢?
function javascriptFunction() {
alert('called from AS3');
// OR
nonExistent.madeUp();
}
您好!希望這個增加的信息將有助於保持這個問題活着:)。我正在使用Flash多媒體專業版8的Actionscript 2,並且我也遇到了Firefox的這個崩潰錯誤。我進口的flash.external.ExternalInterface,並且這兩個功能我用的都是
//confirmation dialog
function confirmationDialog(mesg:String) {
return ExternalInterface.call("confirm", mesg);
}
//alert dialog
function alertDialog(mesg) {
return ExternalInterface.call("alert", mesg);
}
我的代碼調用每個函數總是看起來是這樣的..
//if i need an alert to continue on the page
if (abc == ''){
alertDialog("Message Here");
return;
}
//if the user has the option of continuing or returning
if (abc2 == 'hello') {
var response = confirmationDialog("New Message Here");
if (colorChoise == false){
return;
}else{
//do nothing and continue forward
}
}
我與惠普的桌面上Windows 7,Firefox 5.0,IE9和Chrome 12.0.742.122。任何一次警報呼叫都會隨機導致Firefox凍結......實際上它通常會發生在一堆,它會連續凍結幾次(顯然每次都重新啓動Firefox),然後停止幾個小時並保持正常。它還沒有崩潰的IE9或Chrome,但我還沒有測試過它與Chrome廣泛。使用Firefox控制檯並沒有幫助,因爲Firefox只是一起崩潰。如果有人能夠說明這一點,那會很棒!