t.swf, which can embed arbitrary Flash and other Media into pages.
tiny-swf.js [1644b] - tiny-swf-min.js.gz [782b]
The t.swf-method requires exclusively tiny.js. No other scripts are necessary.
The function t.swf({options}) returns a function with prototypic methods to embed Flash and other Media into pages. Its sole argument is an options object with the following Instances:
| url* | Link to media |
|---|---|
| type | MIME-Type of the media |
| id | ID for the object tag |
| width | Width of the object |
| height | Height of the object |
| wmode | Windowing mode of Flash (Default: "window") |
| flashvars | Variablen to be transferred to the flash |
| version | Minimal required Flash-Version (otherwise the fallback will be rendered) |
| fallback | Fallback-HTML-Code for the case in which a flash cannot be rendered |
| content | Content inside of the object tag (HTML) |
| style | CSS-Inline-Style for the object tag |
*: required, everything else is optional
The returned function contain the following prototypic Methods:
| .render() | Put object with document.write into the page |
|---|---|
| .node() | Returns rendered nodes as Selection |
| .html() | HTML-Code of the object tag |
| .opts | Options |
t.swf.ver contains the Flash-Version, t.swf.rev the Revision-Number, if available:
t.swf({
url: 'http://img.ui-portal.de/gmx/home/mod/promo/hdi_dsl_streichpreis_lp_cntdwn_gmx2.swf',
width: 100, height: 90, version: 8, style: 'background:#eeeeee;',
fallback: 'no Flash installed'
}).render();
© 2010 Alex Kloss