# getURL problem!

**URL:** https://forum.kirupa.com/t/geturl-problem/22799
**Category:** Uncategorized
**Created:** [June 9, 2003, 12:48am UTC](https://forum.kirupa.com/t/geturl-problem/22799 "2003-06-09T00:48:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![adham\_a](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@adham\_a](https://forum.kirupa.com/u/adham_a)
#### Post date: [June 9, 2003, 12:48am UTC](https://forum.kirupa.com/t/geturl-problem/22799/1 "2003-06-09T00:48:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 9, 2003, 12:58am UTC](https://forum.kirupa.com/t/geturl-problem/22799/2 "2003-06-09T00:58:48Z")

</div>

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:

```auto

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…

```auto

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

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 9, 2003, 1:02am UTC](https://forum.kirupa.com/t/geturl-problem/22799/3 "2003-06-09T01:02:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 9, 2003, 3:29am UTC](https://forum.kirupa.com/t/geturl-problem/22799/4 "2003-06-09T03:29:53Z")

</div>

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
