Open html file

how do i open up a html file that is stored on my harddrive? i am using the on release commans. ok , the thing is theres a button, when the user clicks on this button it will open up a html file via a new window. please help me… should i use the geturl command?

malcolm

[AS]on (release) {
getURL(“c: emp emp.htm”, “_blank”)
}[/AS]

put some code like that on your button with the right path to your document.

actually this is meant to be a CD-Rom thing so i cant use the C:\ i tried using this sentence getURL("…/temp/temp.htm") but its doesnt work on the cd
please help… anyone ??

use a relative path… :q:

im sorry, how do you mean by relative path, can you give me an example… thanks a lot i really appreciate it

if a file called ‘myFile.html’ is in the same folder as the swf, you can use

getURL("myFile.html", "_blank")

instead of going like

getURL("d:/myFile.html", "_blank")//or whatever its address would be

:slight_smile:

sorry, but what if its not gonna be in the same folder?cos theres gonna be link to many htmls in different folders

then you can say getURL(“folder1/folder2/myFile.html”, “_blank”), provided that ‘folder1’ and your swf file are in the same folder :slight_smile:

can it be another folder? its very confusing

i believe that this might work…
[AS]on (release) {
getURL(".html/myfile.html", “_blank”)
}
[/AS]
^where html is a folder and myfile.html is the webpage
in html, I THINK, on dot is relative and two dots is absolute, so try that, if no one else answered ur question

i will try that thanks a million

holy **** ! it works !!! thanks aot man, i have been trying with 2 dots, didnt even know u can do it with one dots also thanks man !!!

hmm, 2 dots and 1 are different things man, see my other post if you didnt catch it

glad it worked
hawk