fm.flash
fm.flash.getVersion()
This function returns the installed version of Flash. The returned value is an array with the major version, minor version and revision.
Example
document.write('You have flashplayer: ' + fm.flash.getVersion().join('.'));
The function will return [0,0,0] if no flash player was installed, or if we could not detect the version information.
fm.flash.Object(options)
Use this class to create a flash embed code. All it's options can be specified through the options parameter, or later on by editing it's properties.
Example
var mySwf = new fm.flash.Object({
src : 'myswf.swf',
width : '500',
height : '500',
flashVars : { myProperty : 'myvalue', myOtherProperty : 'foobar' }
});
mySwf.write();
The following options are supported:
- allowFullScreen - Whether or not to allow flash to go to full-screen mode. The default value for this is true, and this should be set as a boolean.
- allowScriptAccess - Whether or not to allow flash to interact with javascript. The default value for this is 'always'. Check the TechNote for more information.
- backgroundColor - The background color for the swf. If this is ommitted the default from the swf will be used.
- height - The height of the flash file. This should be for example '100' for 100 pixels, or '100%'.
- id - The contents of the id="" attribute of the <object> tag.
- flashVars - This is a list of arguments that should be sent to the actual flash file. This must be specified as an object (see example).
- src - The url to the flash file. This is the only required option.
- width - The width of the flash file. This should be for example '100' for 100 pixels, or '100%'.
- wmode - Set this to make the flash file transparent. Valid options are an empty string for no transparency, 'transparent' or 'opaque'. Check the TechNote for more information.
Additionally, the following functions are available:
.embed(element)
This function will replace the innerHTML of the supplied element with the embed code. If element is a string, we'll assume it's the element id and call document.getElementById().
.generateHTML()
This will generate the embed code, and return it as a string.
.write()
This will generate the html and call document.write.
developer documentation r21358