getURL problem!

Hello all,

I want to open an HTML file from flash i placed the following code in the action menu of my button:

[AS]

on (release) {
trace(“SDF”);
link = “C:\ est\Flash Files\Anim\NICOLEanimatingRand.html”;
getURL(link, “_blank”);
}

[/AS]

when i am trying my code by ctrl + enter nothing happens i just get the trace message.

any idea what is wrong

thanks

actually, the way you’re doing it is incorrect. it’s really odd how flash gets local paths. it doesn’t follow the traditional windows way of using backslashes (), but like this:
file:///c|/txtfileontheCdrive.txt

it’s really complex like that. to show you what i’m talking about, make a new window and in frame one add this actionscript:


trace(_url);

that’ll output the path of the swf that was made. it’s quite sketchy if you ask me. so to fix your code…


on (release) {
        trace("SDF");
        //link = "C:	est\Flash Files\Anim\NICOLEanimatingRand.html";
link = "file:///c|/test/Flash%20Files/Anim/NICOLEanimatingRand.html";
        getURL(link, "_blank");
}

thanks for your reply but i also tried the relative addressing thing and i used :

link = “…\Flash Files\Anim\blabla.html”;

my flash file is in Flash Files directory (obvious)

but it didn’t work again. The problem is that i am not getting even an error which is in fact making me angry :pirate: because that means the the command is not reacting or something like that

just do this

ActionScript:--------------------------------------------------------------------------------
on (release) {

    getURL("NICOLEanimatingRand.html", "_blank"); 

}


if its in the same dir as the swf file maybe the trace condition or the cat that your using a variable for the link causing the problem