views:

106

answers:

2

I don't know which title I should use for this question.

I have a webpage (e.g. index.html) which contains flash content, url: http://www.abc.com/travel/sg/traffic/

After I finish the webpage and upload onto the staging server, the customers said that they may need to use different domain to go to the site, e.g. http://sg.travel.com/

The images or hyperlink do not work because of this. To handle this, I try to use the base tag as follows:

<base href="http://www.abc.com/travel/sg/traffic/" />

The images and hyperlink work. However, flash file cannot call javascript afterwards.

I would like to know how I can fix the problem.

Thanks.

A: 

Are you using relative links in the flash file? Try passing the url as a parameter and prepend the links in the flash file with them. You may also need to set up a proper crossdomain.xml to allow your flash to access other domains.

Kaivosukeltaja
A: 

if images are the same domain as the swf, you can use relative paths. try with "/images/foo.png" instead of "http://www.abc.com/travel/sg/traffic/images/foo.png"

kajyr