# Asfunction and several variables

**URL:** <https://forum.kirupa.com/t/asfunction-and-several-variables/28583>\
**Category:** Uncategorized\
**Created:** [August 15, 2003, 9:28am UTC](https://forum.kirupa.com/t/asfunction-and-several-variables/28583 "2003-08-15T09:28:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thorseye](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thorseye/32/66_2.png) [@thorseye](https://forum.kirupa.com/u/thorseye)\
**Post date:** [August 15, 2003, 9:28am UTC](https://forum.kirupa.com/t/asfunction-and-several-variables/28583/1 "2003-08-15T09:28:22Z")

</div>

I’ve got a movie that loads a text-file with an asfunction href in it. I want to send two or three variables from the asfunction, but hw do I do this? My code looks like this:

```php
<a href="asfunction:_root.bytText,finnveden,3">Finnvedens Lastvagnar Öst AB</a>

```

and my function in flash looks like this:  
[AS]function bytText(kund,pos) {  
\_root.kund = kund;  
\_root.bildpos = pos \* \_root.startpos;  
//gets a text-file called “\_root.kund.txt”  
\_root.allt.innehall.kund.kundmc.gotoAndPlay(1);  
}[/AS]  
This code makes flash think that it should get a textfile called “finnveden,3.txt”, but I want to get the file called “finnveden.txt” and set \_root.bildpos to 3 \* \_root.startpos. Are you with me?

So what I want to is pretty simple. I need the correct syntax for sending several variables.  
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:** [August 15, 2003, 12:42pm UTC](https://forum.kirupa.com/t/asfunction-and-several-variables/28583/2 "2003-08-15T12:42:36Z")

</div>

I think this should work :-\

```auto
function txtVars(txt){
var myVars = txt.split("/");
_root.bildpos = _root.startpos*myVars[0];
loadVariablesNum(myVars[1]+".txt", 1);
}

```

```php
<a href='asfunction:txtVars,3/finnveden'>Finnvedens Lastvagnar Öst AB</a>

```

---

<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:** [August 15, 2003, 1:46pm UTC](https://forum.kirupa.com/t/asfunction-and-several-variables/28583/3 "2003-08-15T13:46:18Z")

</div>

Yes it did Claudio 🙂 I found it an hour after I posted here, at [this page](http://chattyfig.figleaf.com/flashcoders-wiki/index.php?asfunction) but thanks anyway 🙂 Really needed that one.

---

<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:** [August 15, 2003, 2:44pm UTC](https://forum.kirupa.com/t/asfunction-and-several-variables/28583/4 "2003-08-15T14:44:45Z")

</div>

Glad you got it working  
=)
