PDA

View Full Version : Absolute Relative URL



ViRiPuFF
April 5th, 2007, 06:42 PM
Hi

I'm new to Flash and ActionScript this is my first post.

I've created an animation that contains a command button this I have published in a Web page. This page is called Index.html and lives in a Folder called Animation that lives in a folder called Site.

I have a second page called Frameset.html that lives in a folder called Pages that lives in the same folder as Animation i.e. Site. I need to open Frameset.html by clicking the button on the animation in Index.html.

I can do this by using the absolute URL on the Button's Action to refer to the page I want opened when a user clicks the command button. This works fine Frameset.html loads when the button is clicked.

The problem is that I need to copy the site onto CD and then onto a server and thus the absolute URL I have from my development machine will not work.

Is there any way I could tell Flash to move up and down the hierarchy of nested files, folders which are all contained within the Folder Site and using the Flash getURL instruction use a relative URL to the file ie just call the Folder names and the file name. e.g. getURL(Site/Pages/Frameset.html) in this case.
Thanks
ViRiPuff NoImage = NoSigImageNoImage = NoImageRes

Esoltas
April 5th, 2007, 07:21 PM
with such a complicated post/setup you have, I assume that your link is wrong. Are you referencing it correctly?

rabidGadfly
April 5th, 2007, 09:31 PM
../ Brings you to the parent folder of the folder you're currently in. So, if I'm reading your post correctly getURL("../Pages/Frameset.html"); should work.

ViRiPuFF
April 6th, 2007, 07:19 AM
../ Brings you to the parent folder of the folder you're currently in. So, if I'm reading your post correctly getURL("../Pages/Frameset.html"); should work.


Hi

Thanks for your help

I've tried getURL("../Pages/Frameset.html")

I get Cannot find file ///C:/Documents%and%Settings/Tap/Desktop/Site/Pages/Frameset/Frameset.html error.

I think it is still wanting to find the file with the full path

Site is the Main Folder of my site

puppy
April 6th, 2007, 08:01 AM
getURL("../Frameset.html"); ?

ViRiPuFF
April 6th, 2007, 10:59 AM
I've tried getURL("../Pages/Frameset.html"); again and it works when I checked I had ...

The problem now is I have a series of Flash buttons that call pages that display on a file called mainFrame on the Frameset. On the getURL parameters I set it to Window: mainFrame. The weird thing is it works fine on IE5, IE6 but on the new IE it ignores the target window set and opens the correct page but on a separate window outside the Frameset