2
* The Shadowbox SWF movie player class.
4
* This file is part of Shadowbox.
6
* Shadowbox is an online media viewer application that supports all of the
7
* web's most popular media publishing formats. Shadowbox is written entirely
8
* in JavaScript and CSS and is highly customizable. Using Shadowbox, website
9
* authors can showcase a wide assortment of media in all major browsers without
10
* navigating users away from the linking page.
12
* Shadowbox is released under version 3.0 of the Creative Commons Attribution-
13
* Noncommercial-Share Alike license. This means that it is absolutely free
14
* for personal, noncommercial use provided that you 1) make attribution to the
15
* author and 2) release any derivative work under the same or a similar
18
* If you wish to use Shadowbox for commercial purposes, licensing information
19
* can be found at http://mjijackson.com/shadowbox/.
21
* @author Michael J. I. Jackson <mjijackson@gmail.com>
22
* @copyright 2007-2008 Michael J. I. Jackson
23
* @license http://creativecommons.org/licenses/by-nc-sa/3.0/
24
* @version SVN: $Id: shadowbox-swf.js 99 2008-05-11 16:22:43Z mjijackson $
34
* Constructor. This class is used to display SWF movies.
36
* @param {String} id The id to use for this content
37
* @param {Object} obj The content object
40
Shadowbox.swf = function(id, obj){
44
// SWF's are resizable
45
this.resizable = true;
47
// height defaults to 300 pixels
48
this.height = this.obj.height ? parseInt(this.obj.height, 10) : 300;
50
// width defaults to 300 pixels
51
this.width = this.obj.width ? parseInt(this.obj.width, 10) : 300;
54
Shadowbox.swf.prototype = {
57
* Returns an object containing the markup for this content, suitable
58
* to pass to Shadowbox.lib.createHTML().
60
* @param {Object} dims The current Shadowbox dimensions
61
* @return {Object} The markup for this content item
64
markup: function(dims){
65
var bgcolor = SB.getOptions().flashBgColor;
70
type: 'application/x-shockwave-flash',
71
data: this.obj.content,
73
{ tag: 'param', name: 'movie', value: this.obj.content },
74
{ tag: 'param', name: 'bgcolor', value: bgcolor }
76
height: dims.resize_h, // use resized dimensions
82
* Removes this SWF from the document.
88
var el = SL.get(this.id);