# Asfunction trouble

**URL:** <https://forum.kirupa.com/t/asfunction-trouble/243356>\
**Category:** Uncategorized\
**Created:** [November 6, 2007, 3:11am UTC](https://forum.kirupa.com/t/asfunction-trouble/243356 "2007-11-06T03:11:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayrich86](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@jayrich86](https://forum.kirupa.com/u/jayrich86)\
**Post date:** [November 6, 2007, 3:11am UTC](https://forum.kirupa.com/t/asfunction-trouble/243356/1 "2007-11-06T03:11:56Z")

</div>

I’ve used asfunction before to call functions from the html, but in my current project it is not working. I am trying to use one frame for my entire project for the first time and think this may have something to do with it. Here is whats happening:

I have a menu system, that when clicked goes to a frame on the content movieclip and runs a function for that frame. i.e. you click “about”, it goes to content\_mc.gotoAndStop(“About”) and runs a function called LoadAbout (from the main timeline). The LoadAbout loads an external textfile, and in the textfile there is the following \<a href=‘asfunction:ClickHere’\> Click Here \</a\>, the Click here is then clickable but the function is not working. Within LoadAbout, after the external text loader, there is a function ClickHere():Void {  
trace(“clicked”);

here is the actual code, on the first frame of the main timeline:

```auto
//About Page
function LoadAbout():Void {
    loadMovie("Images/About/Owner.jpg", "content_mc.ownPic_mc.picLoader_mc");
    loadMovie("Images/About/Techno.jpg", "content_mc.techPic_mc.picLoader_mc");

    ownerLoadVars = new LoadVars();
    ownerLoadVars.onLoad = function() {
        content_mc.owner_txt.htmlText = ownerLoadVars.ownerData;
    };
    ownerLoadVars.load("Data/About/owner.txt");

    technoLoadVars = new LoadVars();
    technoLoadVars.onLoad = function() {
        content_mc.techno_txt.htmlText = technoLoadVars.technoData;
    };
    technoLoadVars.load("Data/About/techno.txt");

    function ClickHere() {
        trace("Clicked");
    }

}

```

the asfunction tags are in the techno.txt file, again i’ve used this before but can’t determine why its not working.

Thanks
