tiny-swf.js - Flash for tinyJS

tiny-swf.js creates a tiny-based function 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
typeMIME-Type of the media
idID for the object tag
widthWidth of the object
heightHeight of the object
wmodeWindowing mode of Flash (Default: "window")
flashvarsVariablen to be transferred to the flash
versionMinimal required Flash-Version (otherwise the fallback will be rendered)
fallbackFallback-HTML-Code for the case in which a flash cannot be rendered
contentContent inside of the object tag (HTML)
styleCSS-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


t.swf.ver contains the Flash-Version, t.swf.rev the Revision-Number, if available:

Version: t.swf.ver
Revision: t.swf.rev


    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'