# Call actionscript function from xml file

**URL:** <https://forum.kirupa.com/t/call-actionscript-function-from-xml-file/274754>\
**Category:** Uncategorized\
**Created:** [November 4, 2008, 8:43am UTC](https://forum.kirupa.com/t/call-actionscript-function-from-xml-file/274754 "2008-11-04T08:43:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitras](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nitras/32/1475_2.png) [@nitras](https://forum.kirupa.com/u/nitras)\
**Post date:** [November 4, 2008, 8:43am UTC](https://forum.kirupa.com/t/call-actionscript-function-from-xml-file/274754/1 "2008-11-04T08:43:18Z")

</div>

greetings all

my xml file is as such:

```auto
<menu txt="THIS ITEM FIRES A FUNCTION IN FLASH" txtcolor="0xFFFFFF" menuaction="myFUNCTION" />

```

myFUNCTION is a function inside of flash, how can i possibly trigger this?

i did some searches but i can’t find the sollution:

i read upon asfunction:myFUNCTION, but it simply doesn’t work

this is my relevant flash code

```auto

myFUNCTION = function()
{
trace ("am i called?");
}
BUTTON.ID = i
BUTTON.onRelease = function() 
{
trace("myFUNCTION : " + XMLARRAY[this.ID].attributes.menuaction);
XMLARRAY[this.ID].attributes.menuaction
};

```

thanks in advance
