Closed (duplicate)
Project:
SWF Tools
Version:
5.x-1.1
Component:
SWF Tools
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 May 2008 at 23:13 UTC
Updated:
20 Jun 2008 at 20:17 UTC
Hi
Im trying to embed flash into drupal for the first time. I am using SQF Tools and SWF Object (5.x-1.1).
When i embed the file into a block using php:
<?php
print swf("PCS.FLV", array("height"=>100, "width"=>400));
?>I get a blank div displayed. viewing source reveals this:
<div class="swftools-wrapper generic-flv "><div id="swfobject-id-12119299241" class="swftools swfobject" swftools='{ "wmode": "opaque", "bgcolor": "#FFFFFF", "menu": "false", "play": "false", "loop": "false", "quality": "autohigh", "align": "l", "salign": "tl", "scale": "showall", "swliveconnect": "default", "version": "7", "height": 100, "width": 400, "base": "files/pcs/flash/", "src_path": "sites/all/modules/swftools/shared/generic/generic_flv.swf", "src": "http://pcs.local/sites/all/modules/swftools/shared/generic/generic_flv.swf", "flashvars": "autostart=false\x26file_url=files/pcs/flash/%252FPCS.FLV\x26width=400\x26height=100" }' >
As you can see a "%" and a "/" are added to the url. (%25 and 2F)
I tried embedding using html (with swf filter enabled) but i get "Flash is not available" displayed in my block.
Any help here would be appreciated, embedding flash is turning out to be a real headache.
Comments
Comment #1
UnicornSong commentedjust something else to add (digging deeper)
i have in my settings.php:
if i change this value to
then my url becomes file_url=files/pcs/%252Fflash/PCS.FLV
which indicates to me that something is going wrong with this code in settings.php or how it is translated somewhere along the line.
Comment #2
ChrisBryant commentedWe had a similar problem and this comment should do the trick for you:
http://drupal.org/node/154364#comment-573474
Basically a small patch to the swftools.module (line 656) fixes the encoding: