
Embedding Flash into a website can be pain - especially if you need an alternative image when Flash is being blocked or non-existing. The OpenSource project swfObject offers a clean way for almost every browser to insert Flash objects - with an alternative in case Flash is not installed.
The swfObject plugin offers a simple syntax for DokuWiki:
<swfobject %SWF%[?%OPTIONS%]> %ALTERNATE_CONTENT% </swfobject>
| Variable | Content |
|---|---|
| %SWF% | your flash-media file, e.g. :wiki:my_flash.swf |
| %OPTIONS% | see below |
| %ALTERNATE_CONTENT% | any content renderable by DokuWiki |
The plugin can take a lot of options. On the one hand those are the ones from the original SWFObject, on the other there are your custom flash-specific options. The syntax is: option=value&options2=value2 …
| Option | Values | Default | Description |
|---|---|---|---|
| width | number | 150 | Important value which has to be set accordingly |
| height | number | 50 | Important value which has to be set accordingly |
| play | true/false | true | Autostart of the flash-movie |
| loop | true/false | false | Re-play at the end of the movie |
| menu | true/false | false | Show full or smaller context menu |
| quality | low, high, autolow, autohigh, best | autohigh | Display Options |
| scale | showall, noborder, exactfit | showall | What will happen when the movie does not fit into your defined areas |
| salign | l, t, r, b, tl, tr, bl, br | Alignment options | |
| wmode | window, opaque, transparent | transparent | Window modes |
| bgcolor | Hexadecimal RGB Mode: #RRGGBB | Background color for transparent areas | |
| base | URL | Base directory for dynamic content of the movie | |
| swliveconnect | true/false | false | |
| devicefont | true/false | true | |
| allowscriptaccess | true/false | false | |
| seamlesstabbing | true/false | false | |
| allowfullscreen | true/false | false | |
| allownetworking | true/false | false |
You can add your own options as well. They will then be added to the flashvars option and directly passed to your Flash movie.
If you activate compression for JavaScript and CSS in your DokuWiki Configuration, the SWF-Script Output inside the rendered Document will also be minified.
| Version | Requirement |
|---|---|
| 2010-03-18 | see previous |
| 2009-09-07 | see previous |
| 2009-06-24 | see previous |
| 2009-03-13 | see previous |
| 2009-01-21 | see previous |
| 2008-08-30 | Current DokuWiki Version |
Please make sure, you have the current version (early 2009) of DokuWiki. Older versions have problems with delivering the Flash-Content. This is due to behavioral changes in Flash regarding how it reads the files.
If you need help or have suggestions on how to improve this plugin, feel free to contact us.