Posts Tagged ‘Flash’

Flash assets like an FLV­Play­back skin will typ­i­cally be located in your pub­lic folder. How­ever, accord­ing to http://kb2.adobe.com/cps/608/608abffd.html, “in a load­ing sce­nario, the skin SWF for the FLV­Play­back com­po­nent must be rel­a­tive to the load­ing HTML file con­tain­ing the par­ent SWF on the server, not to the loca­tion of the loaded SWF.” This is bad, since when you load a page, the URL will typ­i­cally be /:controller/:action, which means the FLV­Play­back skin URL will be /:controller/myskin.swf even if your par­ent SWF is in /public. You can ver­ify this in Fire­bug on the Net tab. The prob­lem will man­i­fest itself with a loaded Flash movie with no con­trols. You can fix this by cre­at­ing a rewrite rule in your .htac­cess file.

RewriteRule ^.*/myskin.swf$ /pathto/myskin.swf

Any request end­ing in myskin.swf will be redi­rected to /pathto/myskin.swf under the pub­lic folder.