How to embed external SWF from file:// protocol

flashhta

I'm trying to embed an external .swf file from an HTA application that consists of HTML content, javascript and vbscript. I load the swf from javascript, using swfobject.

The remote server allows 'localhost' as the originating server, and I could embed it on an HTML page on my webserver, running on http://localhost, but I need to make it work from the locally-run HTA, which I suppose uses the file:// protocol, not http://. Right now, when trying this approach, embedded swf signals an error.

I checked crossdomain.xml on the remote site and it says:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy 
    SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="localhost" to-ports="*" />
...
</cross-domain-policy>

Is there a way to make it work from my HTA app without running a webserver?

Thanks.

Best Answer

i'm not sure about HTA files but i know you can directly embed external .swf files into your webpage via something like

<EMBED type="shockwave-flash" src="http://path/to/file.swf" height="swf_height" width="swf_height" (other tags neccesary> </EMBED>
Related Topic