# Asfunction text problem!

**URL:** <https://forum.kirupa.com/t/asfunction-text-problem/63839>\
**Category:** Uncategorized\
**Created:** [September 10, 2004, 1:43pm UTC](https://forum.kirupa.com/t/asfunction-text-problem/63839 "2004-09-10T13:43:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inflicted](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@Inflicted](https://forum.kirupa.com/u/Inflicted)\
**Post date:** [September 10, 2004, 1:43pm UTC](https://forum.kirupa.com/t/asfunction-text-problem/63839/1 "2004-09-10T13:43:44Z")

</div>

I’m loading a text file with:

```auto
<a href="asfunction:_global.direct,home"><font color="#FFFFFF">home 
</font></a>

```

It works, in this example the user gets directed to home.html,  
which is an url from the root directory(index.html).

But I want the user to go to a different url than that of the page’s  
root directory. From [mysite.com](http://mysite.com) to [yoursite.com](http://yoursite.com).  
Tried a couple of things, but they didn’t work.

thanks

This is the AS:

```auto
_global.direct = function(url) {
    getURL(url, "_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:** [September 10, 2004, 7:28pm UTC](https://forum.kirupa.com/t/asfunction-text-problem/63839/2 "2004-09-10T19:28:42Z")

</div>

Found the solution in this thread:  
[http://www.actionscript.org/forums/showthread.php3?s=&threadid=29259](http://www.actionscript.org/forums/showthread.php3?s=&threadid=29259)

thanks CyanBlue!

\*EDIT: AAAAARRRGGHHHH!!!  
THE ONLY MISTAKE IN MY CODE WERE THE DOUBLE  
QUOTATION MARKS IN THE TEXT FILE!!!  
THE SHOULD HAVE BEEN SINGLE ONES!!!

```auto
<a href='asfunction:_global.direct,http://www.inflicted.nl'><font color="#000000">inflicted</font></a>

```
