uploadify"ID SWFUpload_0 is already in use..."誤った解決方法
1144 ワード
uploadifyを使用しているときに同時にロードされた複数のページにuploadifyコンポーネントが含まれている場合に「ID SWFopload_0 is already in use.The Flash Object could not be added」というエラーが発生します.
//を、乱数modify by志超2015.09に変更する.07
SWFUpload.prototype.initSWFUpload = function (settings) {
try {
this.customSettings = {}; // A container where developers can place their own settings associated with this instance.
this.settings = settings;
this.eventQueue = [];
//this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
// SWFUpload.movieCount++
//this.movieName = "SWFUpload_" + parseInt(100*Math.random());
//, modify by 2015.05.21
var mydate = new Date();
this.movieName = "SWFUpload_" + mydate.getTime().toString();
//を、乱数modify by志超2015.09に変更する.07
this.movieElement = null;
// Setup global control tracking
SWFUpload.instances[this.movieName] = this;
// Load the settings. Load the Flash movie.
this.initSettings();
this.loadFlash();
this.displayDebugInfo();
} catch (ex) {
delete SWFUpload.instances[this.movieName];
throw ex;
}
};