@File: /surebert/swf.js
@Description: A constructor used to embed macromedia flash swf, youtube videos, etc. Do not set the sb.swf object's id property to the same name as the object itself. e.g. if your swf object = var mySwf do not set it's id property to 'mySwf' as Internet Explorer will throw an error.
var mySwf = new sb.swf({
src : 'surebert.swf',
bgColor : '#000000',
wmode : 'transparent',
width : 400,
height : 300,
version : 8,
id : 'swify',
flashvars : {
name : 'paul',
age : 30
},
alt : '<div>You need at least flashplayer 8 to play the swf</div>'
});
@File: /surebert/swf.js
@Description: The properties of any sb.swf instance. All sb.swf.prototype examples below assume the following sb.swf example object was created
var mySwf = new sb.swf({
src : 'surebert.swf',
bgColor : '#000000',
wmode : 'transparent',
width : 400,
height : 300,
version : 8,
id : 'swify',
alt : '<div>You need at least flashplayer 8 to play the swf</div>'
});
@File: /surebert/swf.js
@Description: Converts the sb.swf into the appropriate swf code for the browser being used by the client and inserts that code into the element specified
mySwf.embed('#someElement');
@File: /surebert/swf.js
@Description: Converts the sb.swf into the appropriate swf code for the browser being used by the client
var string = mySwf.toHTML();
//on embed style browsers returns
<embed type="application/x-shockwave-flash" src="mySwf.swf" id="mySwf" wmode="transparent" allowScriptAccess="always" bgcolor="#000000" width="400" height="300" />
//on explorer returns
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" id="mySwf"><param name="movie" value="mySwf.swf" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /></object>