On this page
- Why does my flash content appear when I first create a page, but then not appear on subsequent views?
- How do I play back an swf / flv / mp3 file using the [swf] filter?
- Why does 'Default player for single SWF files' say 'None'?
- Why doesn't my xml file load in to my gallery / media player / image rotator...?
- How do I set a custom alt text for an item of flash content
- Why does my audio/video playback work under IE, but not FF or Safari?
- How do I use the CCK FileField formatters?
- Why is --> appearing on my page?
- Why does FlowPlayer 3 say "Error 1009" when I try to play an mp3?
SWF Tools FAQs
There are some recurring themes on the issue queue, so I am going to open an FAQ page to start recording them!
Why does my flash content appear when I first create a page, but then not appear on subsequent views?
This is normally because you are using a JavaScript embedding method, the [swf] input filter, and don't have the JavaScript set to add to every page. The filter is cached, so the JavaScript isn't added to subsequent page views, and nothing appears. To check the option in SWF Tools 5 go to Administer > SWF Tools > Embedding settings > JavaScript embedding and check 'All pages'. In SWF Tools 6 go to Administer > Site configuration > SWF Tools > Embedding settings > Embedding methods and check 'Add JavaScript to all pages'. The default setting for SWF Tools 6 is to add JavaScript to all pages, but in SWF Tools 5 it was switched off.
How do I play back an swf / flv / mp3 file using the [swf] filter?
Activate the input filter for an input format of your choice, and then in the page simply write [swf file="myfile.swf"]. SWF Tools will display the content (in the case of an swf), or play your flv/mp3 in the currently configured media player.
Why does 'Default player for single SWF files' say 'None'?
This is the proper setting. An swf file is a self-contained animation that you write (or that a program like a gallery or slideshow producer creates). SWF files don't need a player. This option is here in the (unlikely) case that a "player" is written in the future, or you write a custom player, that is designed to play back SWF files within another container. But 'None' is fine until then!
Why doesn't my xml file load in to my gallery / media player / image rotator...?
If you have an swf file that needs to refer to an external xml file then you need to make sure the xml (and any other supporting files such as images, audio or video) are in the right place. SWF Tools tries to help you out by providing some 'defaults'. If your flash file (the swf) is written with 'unqualified' paths (e.g. somedata.xml) then the Flash player will look for that file in the directory pointed to by the base parameter. That normally defaults to your site files directory. If in doubt, check the mark up for the page and look for the string that follows the 'base' parameter. If your swf file contains a qualified path (e.g. http://someserver.com/somedata.xml) then put the file there. Next, check the xml itself. If it contains unqualified paths as well then those files will be assumed to be in the 'base' directory too. You might also find this page in the flash node documentation helpful as it also describes the use of xml.
How do I set a custom alt text for an item of flash content
Normally SWF Tools will use the default alternate HTML text that is set on the configuration page. However, you can over-ride this on a case-by-case basis by assigning a different string to the html_alt parameter.
For example, using PHP you could write:
print swf
(
'myMovie.swf',
array
(
'othervars' => array
(
'html_alt' => '<img src="/files/images/myImage.jpg" alt="Replacement image used when flash does not load" />',
),
)
);
This loads the replacement image 'myImage.jpg' from the path /files/images. It is also set up to load alternate text (the 'alt' in the image field) if the user has images turned off.
Why does my audio/video playback work under IE, but not FF or Safari?
This was reported in #401888: Playing audio MP3 file , and it might mean that you have hotlink protection enabled on your website. Although IE can work around this FireFox can't, and it's to do with the way that the actual Flash player (as in the code from Adobe) is written. Try disabling hotlink protection and see if that gets things working. If the hotlink protection is causing the issue then you need to find another solution to safeguard your content (which is beyond the scope of this documentation).
How do I use the CCK FileField formatters?
Please see the documentation page that describes this feature.
Why is --> appearing on my page?
This probably means you are using direct embedding and have the HTML corrector input filter running with the same weight, or a heavier weight, than the SWF Tools filter. The corrector is trying to "fix" the SWF Tools code, which actually breaks it. Refer to the input filter documentation for assistance.
Why does FlowPlayer 3 say "Error 1009" when I try to play an mp3?
To play back mp3 files FlowPlayer needs its audio plug-in. The plug-in file needs to be put in the same directory as the player itself. You can also check if this is the problem by looking at your site log (Administer > Reports > Recent log entries). The missing file will show up as a page not found error and can help pin point FlowPlayer 3 problems.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion