Relative URLs don't work consistently with Flash files played in a web browser.


If you are using relative URLs, then use the base attribute in the HTML <OBJECT> and <EMBED> tag to enforce the base location. This formatting prevents confusion about the location to which relative links are relative.

Base attribute in and tags

The base attribute specifies the base directory or URL used in resolving all relative path statements in the movie. This path can be absolute or relative where the default value is "." or the location of the SWF file.

Note: When you use the Active Content fix provided by Dreamweaver, you can add the base attribute to the generated code. Include base and desired path into the arguments passed to AC_FL_RunContent().

The following is a brief sample of code that uses a specific sample base:

<script type="text/javascript"> AC_FL_RunContent( 'codebase',',0,19,0', 'width','600','height','500','title','myMovie','src','myMovie','quality','high','pluginspage', '','movie','test_CoilGalleryApp','base', '' ); //end AC code</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=",0,19,0" ><param name="movie" value="myMovie.swf"><param name="quality" value="high"><param name="base" value=""><embed base="" href="myMovie.swf" quality="high" pluginspage="" type="application/x-shockwave-flash" ></embed></object></noscript>

Additional information

Relative URLs can be referenced incorrectly when the SWF file and the HTML file are in different locations.

Keywords: tn_04157

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy