Trobule with links.

admin

Administrator
Staff member
I have a flash movie with several links (e.g. Link1>menu/yeah.html Link2>menu/images/pics.html). These work well on my title page, but if its in a higher folder, they go wrong (e.g. If film is in menu/music/, then Link1>menu/music/yeah.html instead of /menu/yeah.html and Link2>menu/music/images/pics.html instead of menu/images/pics.html)<br />
I was wondering if there is a tag I can put on my flash movie which sort of has the same effect as 'Target or Base folder' in Windows Properties for Shortcuts?<!--content-->HTML doesn't know where your files are. You have to tell it to.<br />
use the full path in the link, or use <br />
<BASE TARGET="/menu"><br />
so all links will look into the menu folder for the file.<!--content-->Thanks a lot there. Will with work with SWF files? For me, would it work something like:<br />
<br />
<BASE TARGET="http://www.nettoon.co.uk/menu_smc/">THE SWF FILE</BASE><!--content-->Nope. This did'nt work :-( Can anyone else help me, or did I do it wrong :-S<!--content-->it sounds like you do not have the correct path to your *.swf files,<br />
<br />
what you can do is type the absolute path to that movie file in the browsers address bar and see if movie starts if doesn't then you know that you have wrong path else copy the path to your html ...<!--content-->Nope. The SWF is up and running, just the links dont work.<br />
<br />
(Example) The SWF has links index.html, and ob/menu.html.<br />
On index.html, the links will link to index.html and ob/menu.html,<br />
but on ob/menu.html, they will link to ob/index.html and ob/ob/menu.html<br />
Without absolute paths, is a target folder method possible for the SWF simular to windows shortcuts?<!--content-->Post some code<!--content-->What sort of code?<!--content-->After quite a bit of research, I found out how to do it :-) If anyone else wants it, here it is:<br />
<br />
The BASE attribute in <OBJECT> and <EMBED> tags<br />
The BASE attribute is helpful for calling up relative URLs. The BASE attribute specifies the base directory or URL used in resolving all relative path statements in the Flash Player movie. This attribute is particularly helpful when your Flash Player movies are kept in a different directory from your other files. <br />
<br />
Here are some sample values for the BASE attribute: BASE set to "http://www.domainname.com/software" - All the paths in the Flash Player movie file are relative to the software directory of <!-- w --><a class="postlink" href="http://www.domainname.com">www.domainname.com</a><!-- w -->. A relative path of page1.htm would be resolved to <!-- m --><a class="postlink" href="http://www.domainname.com/software/page1.htm">http://www.domainname.com/software/page1.htm</a><!-- m -->. A relative path of flash/page2.htm is resolved to <!-- m --><a class="postlink" href="http://www.domainname.com/software/flash/page2.htm">http://www.domainname.com/software/flash/page2.htm</a><!-- m -->. <br />
Note: If the BASE value is set to "http://www.domainname.com/levelone/leveltwo" then a relative path of page1.htm will resolve to <!-- m --><a class="postlink" href="http://www.domainname.com/levelone/page1.htm">http://www.domainname.com/levelone/page1.htm</a><!-- m -->. To avoid confusion, use the most common root as the BASE and specify the remaining path for your file. For example, use "http://www.domainname.com/levelone" as the BASE, and levelone/page1.htm as the relative path<!--content-->Oh woops, you were right 'brendandonhue'. Sorry sorry sorry :(<!--content-->
 
Back
Top