PDA

Click to See Complete Forum and Search --> : Embedding Flash help


emmerse
07-11-2008, 04:34 PM
We've just purchased a new domain on a separate server to house our larger web media such as video and flash. The goal is to reduce bandwidth usage on our main server by linking to larger files externally.

So, I have xyzcompany.com with a page that reads a swf located on externalmedia.com

Using Dreamweaver CS3, when you drop an swf on the page, it gives you:

(html comment tags added)
<!--<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','240','heigh t','220','src','somefile.swf','quality','high','pl uginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','somefile.swf' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="240" height="220">
<param name="movie" value="somefile.swf" />
<param name="quality" value="high" />
<embed src="somefile.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="240" height="220"></embed>
</object></noscript> -->
You would think that a person can just change all the src values to the full URL and you'd be all set, but for some reason, this simply doesn't work. I was able to get the swf to load correctly by only using the <object> tag, but then you lose the ability to have the user prompted to install the flash player if needed.

So again, what does a person need to do to bring in an swf located on an external server from the page it's displayed on? Seems like it would be a very simple thing to do, but I can't find anything on google.

Any thoughts?

DesignVHL
07-11-2008, 08:02 PM
the EASY way my friend is to simply code it by hand. Never trust the drag and drop of dreamweaver....always good to know the code involved so you can actually understand and read something - mistakes happen even during a drag and drop.

Anyways, for flash, I suggest using swfobject instead the way you are doing it.

http://blog.deconcept.com/swfobject/

reuber1
07-11-2008, 08:54 PM
Definitely go SWFobject. Headaches will be avoided.

emmerse
07-14-2008, 05:39 PM
SWFobject didn't work either...

turns out it had nothing to do either of the methods, but where the SWF was located. I put the swf, flv and player skin on the external server and absolute linked everything thinking that would work. However, according to Adobe's website, the swf and skin must be local, while the flv can be remote. I entered the full path to the flv in the fla, exported and placed the swf on the local html, and sure enough, works like a charm.

thanks for the suggestion on SWFobject though. Might play around with that some more. The code generator works slick too.

jibble
07-16-2008, 03:44 AM
swfobject is not something to play around with! tisk tisk :D

...more like a necessity in my book. Definitely look into that! It does wonders with "the google" and flash...