a:43:{s:9:"#provides";s:17:"dojox.embed.Flash";s:9:"#resource";s:14:"embed/Flash.js";s:6:"kwArgs";a:1:{s:7:"summary";s:0:"";}s:9:"kwArgs.id";a:1:{s:7:"summary";s:0:"";}s:8:"fVersion";a:1:{s:7:"summary";s:0:"";}s:6:"e.type";a:1:{s:7:"summary";s:0:"";}s:5:"e.src";a:1:{s:7:"summary";s:0:"";}s:23:"dojox.embed.__flashArgs";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:9:{s:4:"path";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:30:"The URL of the movie to embed.";}s:2:"id";a:3:{s:4:"type";s:6:"String";s:8:"optional";b:1;s:7:"summary";s:123:"A unique key that will be used as the id of the created markup. If you don't
provide this, a unique key will be generated.";}s:5:"width";a:3:{s:4:"type";s:6:"Number";s:8:"optional";b:1;s:7:"summary";s:60:"The width of the embedded movie; the default value is 320px.";}s:6:"height";a:3:{s:4:"type";s:6:"Number";s:8:"optional";b:1;s:7:"summary";s:60:"The height of the embedded movie; the default value is 240px";}s:5:"style";a:3:{s:4:"type";s:6:"String";s:8:"optional";b:1;s:7:"summary";s:113:"Any CSS style information (i.e. style="background-color:transparent") you want
to define on the markup.";}s:6:"params";a:3:{s:4:"type";s:6:"Object";s:8:"optional";b:1;s:7:"summary";s:73:"A set of key/value pairs that you want to define in the resultant markup.";}s:4:"vars";a:3:{s:4:"type";s:6:"Object";s:8:"optional";b:1;s:7:"summary";s:74:"A set of key/value pairs that the Flash movie will interpret as FlashVars.";}s:14:"expressInstall";a:3:{s:4:"type";s:7:"Boolean";s:8:"optional";b:1;s:7:"summary";s:76:"Whether or not to include any kind of expressInstall info. Default is false.";}s:8:"redirect";a:3:{s:4:"type";s:6:"String";s:8:"optional";b:1;s:7:"summary";s:79:"A url to redirect the browser to if the current Flash version is not supported.";}}s:6:"source";s:235:" this.id=id;
this.path=path;
this.width=width;
this.minimumVersion=minimumVersion;
this.height=height;
this.style=style;
this.params=params;
this.vars=vars;
this.expressInstall=expressInstall;
this.redirect=redirect;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:26:"dojox.embed.__flashArgs.id";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:7:"String?";s:7:"summary";s:123:"A unique key that will be used as the id of the created markup. If you don't
provide this, a unique key will be generated.";s:14:"private_parent";b:1;}s:28:"dojox.embed.__flashArgs.path";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:6:"String";s:7:"summary";s:30:"The URL of the movie to embed.";s:14:"private_parent";b:1;}s:29:"dojox.embed.__flashArgs.width";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:7:"Number?";s:7:"summary";s:60:"The width of the embedded movie; the default value is 320px.";s:14:"private_parent";b:1;}s:38:"dojox.embed.__flashArgs.minimumVersion";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:6:"Number";s:7:"summary";s:66:"?
The minimum targeted version of the Flash Player (defaults to 9)";s:14:"private_parent";b:1;}s:30:"dojox.embed.__flashArgs.height";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:7:"Number?";s:7:"summary";s:60:"The height of the embedded movie; the default value is 240px";s:14:"private_parent";b:1;}s:29:"dojox.embed.__flashArgs.style";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:7:"String?";s:7:"summary";s:113:"Any CSS style information (i.e. style="background-color:transparent") you want
to define on the markup.";s:14:"private_parent";b:1;}s:30:"dojox.embed.__flashArgs.params";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:7:"Object?";s:7:"summary";s:73:"A set of key/value pairs that you want to define in the resultant markup.";s:14:"private_parent";b:1;}s:28:"dojox.embed.__flashArgs.vars";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:7:"Object?";s:7:"summary";s:74:"A set of key/value pairs that the Flash movie will interpret as FlashVars.";s:14:"private_parent";b:1;}s:38:"dojox.embed.__flashArgs.expressInstall";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:8:"Boolean?";s:7:"summary";s:76:"Whether or not to include any kind of expressInstall info. Default is false.";s:14:"private_parent";b:1;}s:32:"dojox.embed.__flashArgs.redirect";a:4:{s:8:"instance";s:23:"dojox.embed.__flashArgs";s:4:"type";s:7:"String?";s:7:"summary";s:79:"A url to redirect the browser to if the current Flash version is not supported.";s:14:"private_parent";b:1;}s:17:"dojox.embed.Flash";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"kwArgs";a:2:{s:4:"type";s:23:"dojox.embed.__flashArgs";s:7:"summary";s:27:"See dojox.embed.__flashArgs";}s:4:"node";a:2:{s:4:"type";s:7:"DOMNode";s:7:"summary";s:67:"DomNode
The node where the embed object will be placed
properties:";}}s:6:"source";s:1008:" if(location.href.toLowerCase().indexOf("file://")>-1){
throw new Error("dojox.embed.Flash can't be run directly from a file. To instatiate the required SWF correctly it must be run from a server, like localHost.");
}
this.available = dojox.embed.Flash.available;
this.minimumVersion = kwArgs.minimumVersion || minimumVersion;
//console.log("AVAILABLE:", this);
this.id = null;
this.movie = null;
this.domNode = null;
if(node){
node = dojo.byId(node);
}
// setTimeout Fixes #8743 - creating double SWFs
// also allows time for code to attach to onError
setTimeout(dojo.hitch(this, function(){
if(this.available && this.available >= this.minimumVersion){
if(kwArgs && node){
this.init(kwArgs, node);
}// FIXME: else what?
}else{
if(!this.available){
this.onError("Flash is not installed.");
}else{
this.onError("Flash version detected: "+this.available+" is out of date. Minimum required: "+this.minimumVersion);
}
}
}), 100);";s:7:"summary";s:566:"Creates a wrapper object around a Flash movie. Wrapper object will
insert the movie reference in node; when the browser first starts
grabbing the movie, onReady will be fired; when the movie has finished
loading, it will fire onLoad.
If your movie uses ExternalInterface, you should use the onLoad event
to do any kind of proxy setup (see dojox.embed.Flash.proxy); this seems
to be the only consistent time calling EI methods are stable (since the
Flash movie will shoot several methods into the window object before
EI callbacks can be used properly).
arguments:";s:8:"examples";a:2:{i:0;s:216:"Embed a flash movie in a document using the new operator, and get a reference to it.
var movie = new dojox.embed.Flash({
path: "path/to/my/movie.swf",
width: 400,
height: 300
}, myWrapperNode, "testLoaded");";i:1;s:297:"Embed a flash movie in a document without using the new operator.
var movie = dojox.embed.Flash({
path: "path/to/my/movie.swf",
width: 400,
height: 300,
style: "position:absolute;top:0;left:0"
}, myWrapperNode, "testLoaded");
File can only be run from a server, due to SWF dependency.";}s:9:"classlike";b:1;}s:27:"dojox.embed.Flash.available";a:2:{s:8:"instance";s:17:"dojox.embed.Flash";s:7:"summary";s:0:"";}s:32:"dojox.embed.Flash.minimumVersion";a:2:{s:8:"instance";s:17:"dojox.embed.Flash";s:7:"summary";s:0:"";}s:20:"dojox.embed.Flash.id";a:3:{s:8:"instance";s:17:"dojox.embed.Flash";s:4:"type";s:6:"String";s:7:"summary";s:93:"The ID of the internal embed/object tag. Can be used to get a reference to
the movie itself.";}s:23:"dojox.embed.Flash.movie";a:3:{s:8:"instance";s:17:"dojox.embed.Flash";s:4:"type";s:10:"HTMLObject";s:7:"summary";s:38:"A reference to the Flash movie itself.";}s:25:"dojox.embed.Flash.domNode";a:2:{s:8:"instance";s:17:"dojox.embed.Flash";s:7:"summary";s:0:"";}s:25:"dojox.embed.Flash.onReady";a:5:{s:9:"prototype";s:17:"dojox.embed.Flash";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"movie";a:1:{s:4:"type";s:10:"HTMLObject";}}s:6:"source";s:123:" // summary:
// Stub function for you to attach to when the movie reference is first
// pushed into the document.";s:7:"summary";s:94:"Stub function for you to attach to when the movie reference is first
pushed into the document.";}s:24:"dojox.embed.Flash.onLoad";a:5:{s:9:"prototype";s:17:"dojox.embed.Flash";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"movie";a:1:{s:4:"type";s:10:"HTMLObject";}}s:6:"source";s:135:" // summary:
// Stub function for you to attach to when the movie has finished downloading
// and is ready to be manipulated.";s:7:"summary";s:106:"Stub function for you to attach to when the movie has finished downloading
and is ready to be manipulated.";}s:25:"dojox.embed.Flash.onError";a:5:{s:9:"prototype";s:17:"dojox.embed.Flash";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"msg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:0:"";s:7:"summary";s:0:"";}s:25:"dojox.embed.Flash._onload";a:5:{s:9:"prototype";s:17:"dojox.embed.Flash";s:4:"type";s:8:"Function";s:6:"source";s:135:" clearInterval(this._poller);
delete this._poller;
delete this._pollCount;
delete this._pollMax;
this.onLoad(this.movie);";s:7:"summary";s:42:"Internal. Cleans up before calling onLoad.";s:7:"private";b:1;}s:22:"dojox.embed.Flash.init";a:5:{s:9:"prototype";s:17:"dojox.embed.Flash";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"kwArgs";a:1:{s:4:"type";s:23:"dojox.embed.__flashArgs";}s:4:"node";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"DOMNode";}}s:6:"source";s:11132:"dojo.provide("dojox.embed.Flash");
(function(){
/*******************************************************
dojox.embed.Flash
Base functionality to insert a flash movie into
a document on the fly.
Usage:
var movie=new dojox.embed.Flash({ args }, containerNode);
******************************************************/
var fMarkup, fVersion;
var minimumVersion = 9; // anything below this will throw an error (may overwrite)
var keyBase = "dojox-embed-flash-", keyCount=0;
var _baseKwArgs = {
expressInstall: false,
width: 320,
height: 240,
swLiveConnect: "true",
allowScriptAccess: "sameDomain",
allowNetworking:"all",
style: null,
redirect: null
};
function prep(kwArgs){
// console.warn("KWARGS:", kwArgs)
kwArgs = dojo.delegate(_baseKwArgs, kwArgs);
if(!("path" in kwArgs)){
console.error("dojox.embed.Flash(ctor):: no path reference to a Flash movie was provided.");
return null;
}
if(!("id" in kwArgs)){
kwArgs.id = (keyBase + keyCount++);
}
return kwArgs;
}
if(dojo.isIE){
fMarkup = function(kwArgs){
kwArgs = prep(kwArgs);
if(!kwArgs){ return null; }
var p;
var path = kwArgs.path;
if(kwArgs.vars){
var a = [];
for(p in kwArgs.vars){
a.push(p + '=' + kwArgs.vars[p]);
}
path += ((path.indexOf("?") == -1) ? "?" : "&") + a.join("&");
}
// FIXME: really? +'s?
var s = '';
return { id: kwArgs.id, markup: s };
};
fVersion = (function(){
var testVersion = 10, testObj = null;
while(!testObj && testVersion > 7){
try {
testObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + testVersion--);
}catch(e){ }
}
if(testObj){
var v = testObj.GetVariable("$version").split(" ")[1].split(",");
return {
major: (v[0]!=null) ? parseInt(v[0]) : 0,
minor: (v[1]!=null) ? parseInt(v[1]) : 0,
rev: (v[2]!=null) ? parseInt(v[2]) : 0
};
}
return { major: 0, minor: 0, rev: 0 };
})();
// attach some cleanup for IE, thanks to deconcept :)
dojo.addOnUnload(function(){
var dummy = function(){};
var objs = dojo.query("object").
reverse().
style("display", "none").
forEach(function(i){
for(var p in i){
if((p != "FlashVars") && dojo.isFunction(i[p])){
try{
i[p] = dummy;
}catch(e){}
}
}
});
});
// TODO: ...and double check this fix; is IE really firing onbeforeunload with any kind of href="#" link?
/*
var beforeUnloadHandle = dojo.connect(dojo.global, "onbeforeunload", function(){
try{
if(__flash_unloadHandler){ __flash_unloadHandler=function(){ }; }
if(__flash_savedUnloadHandler){ __flash_savedUnloadHandler=function(){ }; }
} catch(e){ }
dojo.disconnect(beforeUnloadHandle);
});
*/
} else {
// *** Sane browsers branch ******************************************************************
fMarkup = function(kwArgs){
kwArgs = prep(kwArgs);
if(!kwArgs){ return null; }
var p;
var path = kwArgs.path;
if(kwArgs.vars){
var a = [];
for(p in kwArgs.vars){
a.push(p + '=' + kwArgs.vars[p]);
}
path += ((path.indexOf("?") == -1) ? "?" : "&") + a.join("&");
}
var s = '';
return { id: kwArgs.id, markup: s };
};
fVersion=(function(){
var plugin = navigator.plugins["Shockwave Flash"];
if(plugin && plugin.description){
var v = plugin.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".");
return {
major: (v[0]!=null) ? parseInt(v[0]) : 0,
minor: (v[1]!=null) ? parseInt(v[1]) : 0,
rev: (v[2]!=null) ? parseInt(v[2]) : 0
};
}
return { major: 0, minor: 0, rev: 0 };
})();
}
dojox.embed.__flashArgs = function(path, id, width, height, style, params, vars, expressInstall, redirect){
// path: String
// The URL of the movie to embed.
// id: String?
// A unique key that will be used as the id of the created markup. If you don't
// provide this, a unique key will be generated.
// width: Number?
// The width of the embedded movie; the default value is 320px.
// height: Number?
// The height of the embedded movie; the default value is 240px
// minimumVersion: Number ?
// The minimum targeted version of the Flash Player (defaults to 9)
// style: String?
// Any CSS style information (i.e. style="background-color:transparent") you want
// to define on the markup.
// params: Object?
// A set of key/value pairs that you want to define in the resultant markup.
// vars: Object?
// A set of key/value pairs that the Flash movie will interpret as FlashVars.
// expressInstall: Boolean?
// Whether or not to include any kind of expressInstall info. Default is false.
// redirect: String?
// A url to redirect the browser to if the current Flash version is not supported.
this.id=id;
this.path=path;
this.width=width;
this.minimumVersion=minimumVersion;
this.height=height;
this.style=style;
this.params=params;
this.vars=vars;
this.expressInstall=expressInstall;
this.redirect=redirect;
}
// the main entry point
dojox.embed.Flash = function(/*dojox.embed.__flashArgs*/ kwArgs, /*DOMNode*/ node){
// summary:
// Creates a wrapper object around a Flash movie. Wrapper object will
// insert the movie reference in node; when the browser first starts
// grabbing the movie, onReady will be fired; when the movie has finished
// loading, it will fire onLoad.
//
// If your movie uses ExternalInterface, you should use the onLoad event
// to do any kind of proxy setup (see dojox.embed.Flash.proxy); this seems
// to be the only consistent time calling EI methods are stable (since the
// Flash movie will shoot several methods into the window object before
// EI callbacks can be used properly).
//
// arguments:
// kwArgs: dojox.embed.__flashArgs
// See dojox.embed.__flashArgs
//
// node: DomNode
// The node where the embed object will be placed
//
// properties:
// id: String
// The ID of the internal embed/object tag. Can be used to get a reference to
// the movie itself.
// movie: HTMLObject
// A reference to the Flash movie itself.
//
// example:
// Embed a flash movie in a document using the new operator, and get a reference to it.
// | var movie = new dojox.embed.Flash({
// | path: "path/to/my/movie.swf",
// | width: 400,
// | height: 300
// | }, myWrapperNode, "testLoaded");
//
// example:
// Embed a flash movie in a document without using the new operator.
// | var movie = dojox.embed.Flash({
// | path: "path/to/my/movie.swf",
// | width: 400,
// | height: 300,
// | style: "position:absolute;top:0;left:0"
// | }, myWrapperNode, "testLoaded");
//
// File can only be run from a server, due to SWF dependency.
if(location.href.toLowerCase().indexOf("file://")>-1){
throw new Error("dojox.embed.Flash can't be run directly from a file. To instatiate the required SWF correctly it must be run from a server, like localHost.");
}
this.available = dojox.embed.Flash.available;
this.minimumVersion = kwArgs.minimumVersion || minimumVersion;
//console.log("AVAILABLE:", this);
this.id = null;
this.movie = null;
this.domNode = null;
if(node){
node = dojo.byId(node);
}
// setTimeout Fixes #8743 - creating double SWFs
// also allows time for code to attach to onError
setTimeout(dojo.hitch(this, function(){
if(this.available && this.available >= this.minimumVersion){
if(kwArgs && node){
this.init(kwArgs, node);
}// FIXME: else what?
}else{
if(!this.available){
this.onError("Flash is not installed.");
}else{
this.onError("Flash version detected: "+this.available+" is out of date. Minimum required: "+this.minimumVersion);
}
}
}), 100);
};
dojo.extend(dojox.embed.Flash, {
onReady: function(/*HTMLObject*/ movie){
// summary:
// Stub function for you to attach to when the movie reference is first
// pushed into the document.
},
onLoad: function(/*HTMLObject*/ movie){
// summary:
// Stub function for you to attach to when the movie has finished downloading
// and is ready to be manipulated.
},
onError: function(msg){
},
_onload: function(){
// summary:
// Internal. Cleans up before calling onLoad.
clearInterval(this._poller);
delete this._poller;
delete this._pollCount;
delete this._pollMax;
this.onLoad(this.movie);
},
init: function(/*dojox.embed.__flashArgs*/ kwArgs, /*DOMNode?*/ node){
// summary
// Initialize (i.e. place and load) the movie based on kwArgs.
this.destroy(); // ensure we are clean first.
node = dojo.byId(node || this.domNode);
if(!node){ throw new Error("dojox.embed.Flash: no domNode reference has been passed."); }
// vars to help determine load status
var p = 0, testLoaded=false;
this._poller = null; this._pollCount = 0; this._pollMax = 5; this.pollTime = 100;
if(dojox.embed.Flash.initialized){
this.id = dojox.embed.Flash.place(kwArgs, node);
this.domNode = node;
setTimeout(dojo.hitch(this, function(){
this.movie = this.byId(this.id, kwArgs.doc);
this.onReady(this.movie);
this._poller = setInterval(dojo.hitch(this, function(){
// catch errors if not quite ready.
try{
p = this.movie.PercentLoaded();
}catch(e){
/* squelch */
console.warn("this.movie.PercentLoaded() failed");
};
if(p == 100){
// if percent = 100, movie is fully loaded and we're communicating
this._onload();
}else if(p==0 && this._pollCount++ > this._pollMax){
// after several attempts, we're not past zero.
// FIXME: What if we get stuck on 33% or something?
clearInterval(this._poller);
throw new Error("Building SWF failed.");
}
}), this.pollTime);
}), 1);
}";s:7:"summary";s:0:"";}s:25:"dojox.embed.Flash._poller";a:3:{s:8:"instance";s:17:"dojox.embed.Flash";s:7:"private";b:1;s:7:"summary";s:0:"";}s:26:"dojox.embed.Flash._destroy";a:5:{s:9:"prototype";s:17:"dojox.embed.Flash";s:4:"type";s:8:"Function";s:6:"source";s:11354:"dojo.provide("dojox.embed.Flash");
(function(){
/*******************************************************
dojox.embed.Flash
Base functionality to insert a flash movie into
a document on the fly.
Usage:
var movie=new dojox.embed.Flash({ args }, containerNode);
******************************************************/
var fMarkup, fVersion;
var minimumVersion = 9; // anything below this will throw an error (may overwrite)
var keyBase = "dojox-embed-flash-", keyCount=0;
var _baseKwArgs = {
expressInstall: false,
width: 320,
height: 240,
swLiveConnect: "true",
allowScriptAccess: "sameDomain",
allowNetworking:"all",
style: null,
redirect: null
};
function prep(kwArgs){
// console.warn("KWARGS:", kwArgs)
kwArgs = dojo.delegate(_baseKwArgs, kwArgs);
if(!("path" in kwArgs)){
console.error("dojox.embed.Flash(ctor):: no path reference to a Flash movie was provided.");
return null;
}
if(!("id" in kwArgs)){
kwArgs.id = (keyBase + keyCount++);
}
return kwArgs;
}
if(dojo.isIE){
fMarkup = function(kwArgs){
kwArgs = prep(kwArgs);
if(!kwArgs){ return null; }
var p;
var path = kwArgs.path;
if(kwArgs.vars){
var a = [];
for(p in kwArgs.vars){
a.push(p + '=' + kwArgs.vars[p]);
}
path += ((path.indexOf("?") == -1) ? "?" : "&") + a.join("&");
}
// FIXME: really? +'s?
var s = '';
return { id: kwArgs.id, markup: s };
};
fVersion = (function(){
var testVersion = 10, testObj = null;
while(!testObj && testVersion > 7){
try {
testObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + testVersion--);
}catch(e){ }
}
if(testObj){
var v = testObj.GetVariable("$version").split(" ")[1].split(",");
return {
major: (v[0]!=null) ? parseInt(v[0]) : 0,
minor: (v[1]!=null) ? parseInt(v[1]) : 0,
rev: (v[2]!=null) ? parseInt(v[2]) : 0
};
}
return { major: 0, minor: 0, rev: 0 };
})();
// attach some cleanup for IE, thanks to deconcept :)
dojo.addOnUnload(function(){
var dummy = function(){};
var objs = dojo.query("object").
reverse().
style("display", "none").
forEach(function(i){
for(var p in i){
if((p != "FlashVars") && dojo.isFunction(i[p])){
try{
i[p] = dummy;
}catch(e){}
}
}
});
});
// TODO: ...and double check this fix; is IE really firing onbeforeunload with any kind of href="#" link?
/*
var beforeUnloadHandle = dojo.connect(dojo.global, "onbeforeunload", function(){
try{
if(__flash_unloadHandler){ __flash_unloadHandler=function(){ }; }
if(__flash_savedUnloadHandler){ __flash_savedUnloadHandler=function(){ }; }
} catch(e){ }
dojo.disconnect(beforeUnloadHandle);
});
*/
} else {
// *** Sane browsers branch ******************************************************************
fMarkup = function(kwArgs){
kwArgs = prep(kwArgs);
if(!kwArgs){ return null; }
var p;
var path = kwArgs.path;
if(kwArgs.vars){
var a = [];
for(p in kwArgs.vars){
a.push(p + '=' + kwArgs.vars[p]);
}
path += ((path.indexOf("?") == -1) ? "?" : "&") + a.join("&");
}
var s = '';
return { id: kwArgs.id, markup: s };
};
fVersion=(function(){
var plugin = navigator.plugins["Shockwave Flash"];
if(plugin && plugin.description){
var v = plugin.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".");
return {
major: (v[0]!=null) ? parseInt(v[0]) : 0,
minor: (v[1]!=null) ? parseInt(v[1]) : 0,
rev: (v[2]!=null) ? parseInt(v[2]) : 0
};
}
return { major: 0, minor: 0, rev: 0 };
})();
}
dojox.embed.__flashArgs = function(path, id, width, height, style, params, vars, expressInstall, redirect){
// path: String
// The URL of the movie to embed.
// id: String?
// A unique key that will be used as the id of the created markup. If you don't
// provide this, a unique key will be generated.
// width: Number?
// The width of the embedded movie; the default value is 320px.
// height: Number?
// The height of the embedded movie; the default value is 240px
// minimumVersion: Number ?
// The minimum targeted version of the Flash Player (defaults to 9)
// style: String?
// Any CSS style information (i.e. style="background-color:transparent") you want
// to define on the markup.
// params: Object?
// A set of key/value pairs that you want to define in the resultant markup.
// vars: Object?
// A set of key/value pairs that the Flash movie will interpret as FlashVars.
// expressInstall: Boolean?
// Whether or not to include any kind of expressInstall info. Default is false.
// redirect: String?
// A url to redirect the browser to if the current Flash version is not supported.
this.id=id;
this.path=path;
this.width=width;
this.minimumVersion=minimumVersion;
this.height=height;
this.style=style;
this.params=params;
this.vars=vars;
this.expressInstall=expressInstall;
this.redirect=redirect;
}
// the main entry point
dojox.embed.Flash = function(/*dojox.embed.__flashArgs*/ kwArgs, /*DOMNode*/ node){
// summary:
// Creates a wrapper object around a Flash movie. Wrapper object will
// insert the movie reference in node; when the browser first starts
// grabbing the movie, onReady will be fired; when the movie has finished
// loading, it will fire onLoad.
//
// If your movie uses ExternalInterface, you should use the onLoad event
// to do any kind of proxy setup (see dojox.embed.Flash.proxy); this seems
// to be the only consistent time calling EI methods are stable (since the
// Flash movie will shoot several methods into the window object before
// EI callbacks can be used properly).
//
// arguments:
// kwArgs: dojox.embed.__flashArgs
// See dojox.embed.__flashArgs
//
// node: DomNode
// The node where the embed object will be placed
//
// properties:
// id: String
// The ID of the internal embed/object tag. Can be used to get a reference to
// the movie itself.
// movie: HTMLObject
// A reference to the Flash movie itself.
//
// example:
// Embed a flash movie in a document using the new operator, and get a reference to it.
// | var movie = new dojox.embed.Flash({
// | path: "path/to/my/movie.swf",
// | width: 400,
// | height: 300
// | }, myWrapperNode, "testLoaded");
//
// example:
// Embed a flash movie in a document without using the new operator.
// | var movie = dojox.embed.Flash({
// | path: "path/to/my/movie.swf",
// | width: 400,
// | height: 300,
// | style: "position:absolute;top:0;left:0"
// | }, myWrapperNode, "testLoaded");
//
// File can only be run from a server, due to SWF dependency.
if(location.href.toLowerCase().indexOf("file://")>-1){
throw new Error("dojox.embed.Flash can't be run directly from a file. To instatiate the required SWF correctly it must be run from a server, like localHost.");
}
this.available = dojox.embed.Flash.available;
this.minimumVersion = kwArgs.minimumVersion || minimumVersion;
//console.log("AVAILABLE:", this);
this.id = null;
this.movie = null;
this.domNode = null;
if(node){
node = dojo.byId(node);
}
// setTimeout Fixes #8743 - creating double SWFs
// also allows time for code to attach to onError
setTimeout(dojo.hitch(this, function(){
if(this.available && this.available >= this.minimumVersion){
if(kwArgs && node){
this.init(kwArgs, node);
}// FIXME: else what?
}else{
if(!this.available){
this.onError("Flash is not installed.");
}else{
this.onError("Flash version detected: "+this.available+" is out of date. Minimum required: "+this.minimumVersion);
}
}
}), 100);
};
dojo.extend(dojox.embed.Flash, {
onReady: function(/*HTMLObject*/ movie){
// summary:
// Stub function for you to attach to when the movie reference is first
// pushed into the document.
},
onLoad: function(/*HTMLObject*/ movie){
// summary:
// Stub function for you to attach to when the movie has finished downloading
// and is ready to be manipulated.
},
onError: function(msg){
},
_onload: function(){
// summary:
// Internal. Cleans up before calling onLoad.
clearInterval(this._poller);
delete this._poller;
delete this._pollCount;
delete this._pollMax;
this.onLoad(this.movie);
},
init: function(/*dojox.embed.__flashArgs*/ kwArgs, /*DOMNode?*/ node){
// summary
// Initialize (i.e. place and load) the movie based on kwArgs.
this.destroy(); // ensure we are clean first.
node = dojo.byId(node || this.domNode);
if(!node){ throw new Error("dojox.embed.Flash: no domNode reference has been passed."); }
// vars to help determine load status
var p = 0, testLoaded=false;
this._poller = null; this._pollCount = 0; this._pollMax = 5; this.pollTime = 100;
if(dojox.embed.Flash.initialized){
this.id = dojox.embed.Flash.place(kwArgs, node);
this.domNode = node;
setTimeout(dojo.hitch(this, function(){
this.movie = this.byId(this.id, kwArgs.doc);
this.onReady(this.movie);
this._poller = setInterval(dojo.hitch(this, function(){
// catch errors if not quite ready.
try{
p = this.movie.PercentLoaded();
}catch(e){
/* squelch */
console.warn("this.movie.PercentLoaded() failed");
};
if(p == 100){
// if percent = 100, movie is fully loaded and we're communicating
this._onload();
}else if(p==0 && this._pollCount++ > this._pollMax){
// after several attempts, we're not past zero.
// FIXME: What if we get stuck on 33% or something?
clearInterval(this._poller);
throw new Error("Building SWF failed.");
}
}), this.pollTime);
}), 1);
}
},
_destroy: function(){
// summary
// Kill the movie and reset all the properties of this object.
try{
this.domNode.removeChild(this.movie);
}catch(e){}
this.id = this.movie = this.domNode = null;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:25:"dojox.embed.Flash.destroy";a:4:{s:9:"prototype";s:17:"dojox.embed.Flash";s:4:"type";s:8:"Function";s:6:"source";s:11950:"dojo.provide("dojox.embed.Flash");
(function(){
/*******************************************************
dojox.embed.Flash
Base functionality to insert a flash movie into
a document on the fly.
Usage:
var movie=new dojox.embed.Flash({ args }, containerNode);
******************************************************/
var fMarkup, fVersion;
var minimumVersion = 9; // anything below this will throw an error (may overwrite)
var keyBase = "dojox-embed-flash-", keyCount=0;
var _baseKwArgs = {
expressInstall: false,
width: 320,
height: 240,
swLiveConnect: "true",
allowScriptAccess: "sameDomain",
allowNetworking:"all",
style: null,
redirect: null
};
function prep(kwArgs){
// console.warn("KWARGS:", kwArgs)
kwArgs = dojo.delegate(_baseKwArgs, kwArgs);
if(!("path" in kwArgs)){
console.error("dojox.embed.Flash(ctor):: no path reference to a Flash movie was provided.");
return null;
}
if(!("id" in kwArgs)){
kwArgs.id = (keyBase + keyCount++);
}
return kwArgs;
}
if(dojo.isIE){
fMarkup = function(kwArgs){
kwArgs = prep(kwArgs);
if(!kwArgs){ return null; }
var p;
var path = kwArgs.path;
if(kwArgs.vars){
var a = [];
for(p in kwArgs.vars){
a.push(p + '=' + kwArgs.vars[p]);
}
path += ((path.indexOf("?") == -1) ? "?" : "&") + a.join("&");
}
// FIXME: really? +'s?
var s = '';
return { id: kwArgs.id, markup: s };
};
fVersion = (function(){
var testVersion = 10, testObj = null;
while(!testObj && testVersion > 7){
try {
testObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + testVersion--);
}catch(e){ }
}
if(testObj){
var v = testObj.GetVariable("$version").split(" ")[1].split(",");
return {
major: (v[0]!=null) ? parseInt(v[0]) : 0,
minor: (v[1]!=null) ? parseInt(v[1]) : 0,
rev: (v[2]!=null) ? parseInt(v[2]) : 0
};
}
return { major: 0, minor: 0, rev: 0 };
})();
// attach some cleanup for IE, thanks to deconcept :)
dojo.addOnUnload(function(){
var dummy = function(){};
var objs = dojo.query("object").
reverse().
style("display", "none").
forEach(function(i){
for(var p in i){
if((p != "FlashVars") && dojo.isFunction(i[p])){
try{
i[p] = dummy;
}catch(e){}
}
}
});
});
// TODO: ...and double check this fix; is IE really firing onbeforeunload with any kind of href="#" link?
/*
var beforeUnloadHandle = dojo.connect(dojo.global, "onbeforeunload", function(){
try{
if(__flash_unloadHandler){ __flash_unloadHandler=function(){ }; }
if(__flash_savedUnloadHandler){ __flash_savedUnloadHandler=function(){ }; }
} catch(e){ }
dojo.disconnect(beforeUnloadHandle);
});
*/
} else {
// *** Sane browsers branch ******************************************************************
fMarkup = function(kwArgs){
kwArgs = prep(kwArgs);
if(!kwArgs){ return null; }
var p;
var path = kwArgs.path;
if(kwArgs.vars){
var a = [];
for(p in kwArgs.vars){
a.push(p + '=' + kwArgs.vars[p]);
}
path += ((path.indexOf("?") == -1) ? "?" : "&") + a.join("&");
}
var s = '';
return { id: kwArgs.id, markup: s };
};
fVersion=(function(){
var plugin = navigator.plugins["Shockwave Flash"];
if(plugin && plugin.description){
var v = plugin.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".");
return {
major: (v[0]!=null) ? parseInt(v[0]) : 0,
minor: (v[1]!=null) ? parseInt(v[1]) : 0,
rev: (v[2]!=null) ? parseInt(v[2]) : 0
};
}
return { major: 0, minor: 0, rev: 0 };
})();
}
dojox.embed.__flashArgs = function(path, id, width, height, style, params, vars, expressInstall, redirect){
// path: String
// The URL of the movie to embed.
// id: String?
// A unique key that will be used as the id of the created markup. If you don't
// provide this, a unique key will be generated.
// width: Number?
// The width of the embedded movie; the default value is 320px.
// height: Number?
// The height of the embedded movie; the default value is 240px
// minimumVersion: Number ?
// The minimum targeted version of the Flash Player (defaults to 9)
// style: String?
// Any CSS style information (i.e. style="background-color:transparent") you want
// to define on the markup.
// params: Object?
// A set of key/value pairs that you want to define in the resultant markup.
// vars: Object?
// A set of key/value pairs that the Flash movie will interpret as FlashVars.
// expressInstall: Boolean?
// Whether or not to include any kind of expressInstall info. Default is false.
// redirect: String?
// A url to redirect the browser to if the current Flash version is not supported.
this.id=id;
this.path=path;
this.width=width;
this.minimumVersion=minimumVersion;
this.height=height;
this.style=style;
this.params=params;
this.vars=vars;
this.expressInstall=expressInstall;
this.redirect=redirect;
}
// the main entry point
dojox.embed.Flash = function(/*dojox.embed.__flashArgs*/ kwArgs, /*DOMNode*/ node){
// summary:
// Creates a wrapper object around a Flash movie. Wrapper object will
// insert the movie reference in node; when the browser first starts
// grabbing the movie, onReady will be fired; when the movie has finished
// loading, it will fire onLoad.
//
// If your movie uses ExternalInterface, you should use the onLoad event
// to do any kind of proxy setup (see dojox.embed.Flash.proxy); this seems
// to be the only consistent time calling EI methods are stable (since the
// Flash movie will shoot several methods into the window object before
// EI callbacks can be used properly).
//
// arguments:
// kwArgs: dojox.embed.__flashArgs
// See dojox.embed.__flashArgs
//
// node: DomNode
// The node where the embed object will be placed
//
// properties:
// id: String
// The ID of the internal embed/object tag. Can be used to get a reference to
// the movie itself.
// movie: HTMLObject
// A reference to the Flash movie itself.
//
// example:
// Embed a flash movie in a document using the new operator, and get a reference to it.
// | var movie = new dojox.embed.Flash({
// | path: "path/to/my/movie.swf",
// | width: 400,
// | height: 300
// | }, myWrapperNode, "testLoaded");
//
// example:
// Embed a flash movie in a document without using the new operator.
// | var movie = dojox.embed.Flash({
// | path: "path/to/my/movie.swf",
// | width: 400,
// | height: 300,
// | style: "position:absolute;top:0;left:0"
// | }, myWrapperNode, "testLoaded");
//
// File can only be run from a server, due to SWF dependency.
if(location.href.toLowerCase().indexOf("file://")>-1){
throw new Error("dojox.embed.Flash can't be run directly from a file. To instatiate the required SWF correctly it must be run from a server, like localHost.");
}
this.available = dojox.embed.Flash.available;
this.minimumVersion = kwArgs.minimumVersion || minimumVersion;
//console.log("AVAILABLE:", this);
this.id = null;
this.movie = null;
this.domNode = null;
if(node){
node = dojo.byId(node);
}
// setTimeout Fixes #8743 - creating double SWFs
// also allows time for code to attach to onError
setTimeout(dojo.hitch(this, function(){
if(this.available && this.available >= this.minimumVersion){
if(kwArgs && node){
this.init(kwArgs, node);
}// FIXME: else what?
}else{
if(!this.available){
this.onError("Flash is not installed.");
}else{
this.onError("Flash version detected: "+this.available+" is out of date. Minimum required: "+this.minimumVersion);
}
}
}), 100);
};
dojo.extend(dojox.embed.Flash, {
onReady: function(/*HTMLObject*/ movie){
// summary:
// Stub function for you to attach to when the movie reference is first
// pushed into the document.
},
onLoad: function(/*HTMLObject*/ movie){
// summary:
// Stub function for you to attach to when the movie has finished downloading
// and is ready to be manipulated.
},
onError: function(msg){
},
_onload: function(){
// summary:
// Internal. Cleans up before calling onLoad.
clearInterval(this._poller);
delete this._poller;
delete this._pollCount;
delete this._pollMax;
this.onLoad(this.movie);
},
init: function(/*dojox.embed.__flashArgs*/ kwArgs, /*DOMNode?*/ node){
// summary
// Initialize (i.e. place and load) the movie based on kwArgs.
this.destroy(); // ensure we are clean first.
node = dojo.byId(node || this.domNode);
if(!node){ throw new Error("dojox.embed.Flash: no domNode reference has been passed."); }
// vars to help determine load status
var p = 0, testLoaded=false;
this._poller = null; this._pollCount = 0; this._pollMax = 5; this.pollTime = 100;
if(dojox.embed.Flash.initialized){
this.id = dojox.embed.Flash.place(kwArgs, node);
this.domNode = node;
setTimeout(dojo.hitch(this, function(){
this.movie = this.byId(this.id, kwArgs.doc);
this.onReady(this.movie);
this._poller = setInterval(dojo.hitch(this, function(){
// catch errors if not quite ready.
try{
p = this.movie.PercentLoaded();
}catch(e){
/* squelch */
console.warn("this.movie.PercentLoaded() failed");
};
if(p == 100){
// if percent = 100, movie is fully loaded and we're communicating
this._onload();
}else if(p==0 && this._pollCount++ > this._pollMax){
// after several attempts, we're not past zero.
// FIXME: What if we get stuck on 33% or something?
clearInterval(this._poller);
throw new Error("Building SWF failed.");
}
}), this.pollTime);
}), 1);
}
},
_destroy: function(){
// summary
// Kill the movie and reset all the properties of this object.
try{
this.domNode.removeChild(this.movie);
}catch(e){}
this.id = this.movie = this.domNode = null;
},
destroy: function(){
// summary
// Public interface for destroying all the properties in this object.
// Will also clean all proxied methods.
if(!this.movie){ return; }
// remove any proxy functions
var test = dojo.delegate({
id: true,
movie: true,
domNode: true,
onReady: true,
onLoad: true
});
for(var p in this){
if(!test[p]){
delete this[p];
}
}
// pull the movie
if(this._poller){
// wait until onLoad to destroy
dojo.connect(this, "onLoad", this, "_destroy");
} else {
this._destroy();
}";s:7:"summary";s:0:"";}s:22:"dojox.embed.Flash.byId";a:7:{s:9:"prototype";s:17:"dojox.embed.Flash";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:9:"movieName";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:19:"The name of the SWF";}s:3:"doc";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:57:"The document, if not current window
(not fully supported)";}}s:6:"source";s:291:" doc = doc || document;
if(doc.embeds[movieName]){
return doc.embeds[movieName];
}
if(doc[movieName]){
return doc[movieName];
}
if(window[movieName]){
return window[movieName];
}
if(document[movieName]){
return document[movieName];
}
return null;";s:7:"summary";s:23:"Gets Flash movie by id.";s:11:"description";s:92:"Probably includes methods for outdated
browsers, but this should catch all cases.
arguments:";s:8:"examples";a:1:{i:0;s:46:"
var movie = dojox.embed.Flash.byId("myId");";}}s:30:"dojox.embed.Flash.minSupported";a:1:{s:7:"summary";s:0:"";}s:27:"dojox.embed.Flash.supported";a:1:{s:7:"summary";s:0:"";}s:33:"dojox.embed.Flash.minimumRequired";a:1:{s:7:"summary";s:0:"";}s:25:"dojox.embed.Flash.version";a:1:{s:7:"summary";s:0:"";}s:29:"dojox.embed.Flash.initialized";a:1:{s:7:"summary";s:0:"";}s:30:"dojox.embed.Flash.onInitialize";a:3:{s:4:"type";s:8:"Function";s:6:"source";s:40:" dojox.embed.Flash.initialized = true;";s:7:"summary";s:0:"";}s:31:"dojox.embed.Flash.__ie_markup__";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"kwArgs";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:26:" return fMarkup(kwArgs);";s:7:"private";b:1;s:7:"summary";s:0:"";}s:23:"dojox.embed.Flash.proxy";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:3:"obj";a:1:{s:4:"type";s:17:"dojox.embed.Flash";}s:7:"methods";a:1:{s:4:"type";s:12:"Array|String";}}s:6:"source";s:693:" dojo.forEach((dojo.isArray(methods) ? methods : [ methods ]), function(item){
this[item] = dojo.hitch(this, function(){
return (function(){
return eval(this.movie.CallFunction(
''
+ ''
+ dojo.map(arguments, function(item){
// FIXME:
// investigate if __flash__toXML will
// accept direct application via map()
// (e.g., does it ignore args past the
// first? or does it blow up?)
return __flash__toXML(item);
}).join("")
+ ''
+ ''
));
}).apply(this, arguments||[]);
});
}, obj);";s:7:"summary";s:264:"Create the set of passed methods on the dojox.embed.Flash object
so that you can call that object directly, as opposed to having to
delve into the internal movie to do this. Intended to make working
with Flash movies that use ExternalInterface much easier to use.";s:8:"examples";a:1:{i:0;s:329:"Create "setMessage" and "getMessage" methods on foo.
var foo = new dojox.embed.Flash(args, someNode);
dojo.connect(foo, "onLoad", dojo.hitch(foo, function(){
dojox.embed.Flash.proxy(this, [ "setMessage", "getMessage" ]);
this.setMessage("dojox.embed.Flash.proxy is pretty cool...");
console.log(this.getMessage());
}));";}}s:11:"dojox.embed";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}