Accessibility
Adobe
Sign in My orders My Adobe

Title

Relative URLs not referenced correctly | FlashProducts affected

Issue

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

Solution

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 <OBJECT> and<EMBED> 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','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0', 'width','600','height','500','title','myMovie','src','myMovie','quality','high','pluginspage', 'http://www.macromedia.com/go/getflashplayer','movie','test_CoilGalleryApp','base', 'http://www.example.com/pages/' ); //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=7,0,19,0" ><param name="movie" value="myMovie.swf"><param name="quality" value="high"><param name="base" value="http://www.example.com/pages/"><embed base="http://www.example.com/pages/" href="myMovie.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" 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.


Doc ID
(tn_04157)

Last updated
2011-01-24

Products affected

Adobe Community Help

Tags

Contacting Adobe Support

Still need help?
Find out about all your support options.
Contact support