# Asfunctions

**URL:** <https://forum.kirupa.com/t/asfunctions/221830>\
**Category:** Uncategorized\
**Created:** [April 8, 2007, 10:24am UTC](https://forum.kirupa.com/t/asfunctions/221830 "2007-04-08T10:24:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boogooloo1](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@boogooloo1](https://forum.kirupa.com/u/boogooloo1)\
**Post date:** [April 8, 2007, 10:24am UTC](https://forum.kirupa.com/t/asfunctions/221830/1 "2007-04-08T10:24:49Z")

</div>

G’day guys,

Let me try to explain what I’m attempting here:

- I’ve got a button in my swf, which when pressed, loads text into an existing text box thusly:

```auto
on (press){
    loadText = new LoadVars();
    loadText.load("text/whatever.txt");
    loadText.onLoad = function(success) {
        if (success) {
            // trace(success);
            _root.text_mc.textbox.html = true;
            _root.text_mc.textbox.htmlText = this.myNews;
        }
    }
;}

```

I want to use asfunction in the external text to have a link, which, when pressed, gets a URL AND stops all sounds in the swf. The reason for this is that the URLs have audio playing, and I don’t want the user to hear two songs at once. Could someone please run me through it?

Cheers ![](http://www.pixel2life.com/forums/style_emoticons/default/smile.gif)
