Link to home
Start Free TrialLog in
Avatar of chitchcock
chitchcockFlag for Canada

asked on

I have developed a swf website and want to link to a html page in the same web folder

I have a swf website which is self contained in a folder.  Within the folder, I created a standalone html page to highlight pictures.  How do I put a link in the swf that opens a seperate html page?  Don't need to embed it, I just need it to open in a seperate windows.  Thx
Avatar of scrathcyboy
scrathcyboy
Flag of United States of America image

as long as it is in the same folder, this is the link you want --
<A href="file.html" target="_blank">file.html</A>
The target = _blank opens a new window, the file.html is the file name you want to open, and as long as it is in the same directory, you do not need any paths or slashes.  If however the file is in a directory under the current, then you use href="foldername/filemhtml" .  IF the file is in a folder on PAR with the current, then you would use href="../otherdir/file.html".

The presence of absence of the first slash, and the double dots are crucial to finding the right directory.
Avatar of chitchcock

ASKER

I will give it a shot.  Thx
No luck.  I created a script command in swish with a button and added it but no go.  The script attached to the text "Click for picture gallery" is:

on (press)  {
}
<A href="Gallery.htm" target="_blank">Gallery.htm</A>

ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<A href="Gallery.htm" target="_blank">Gallery.htm</A>

That link will work in NORMAL HTML.  Check your capitalization, on the server VS. the local system.  As a general rule, do NOT use capitals in file names, unless you can be certain the upload preserves them.

Also make sure the file is in the public_html directory on the server.  If the capitals, permissions and file locations are correct, the link WILL WORK, period.

As tagit said, your syntax for an event is wrong -- the function is ONCLICK -- onClick getURL (gallery.htm)  -- you should be using the onClick function if you are calling the URL with JS, but if it is a normal HTML click, then the link is fine as you wrote it, but with the correct capitalization.
Thanks guys.  I am using this in SWISH and tagit was correct, the code as he entered it worked perfectly in scripting mode of that particular application.  Much regards.