Skip to main content
Participating Frequently
May 11, 2006
Question

Looking for the syntax

  • May 11, 2006
  • 1 reply
  • 165 views
I have a menu that is populated by an XML file. One of the tasks of the menu is to call a function with in my movie. I would like to keep it open, so I can just put the name of the function in the xml, and it will call that function when an certain Item is pressed. but I can't come up with the right syntax for the job. I have an itentifier in the xml so it knows which buttons are to call a function. The functions are in the parent mc of the menu. I would also like to send properties to a function, but I will worry about that after.

so I have a function that is called in the menu movie when the internal identifier is caller

function internal(fn){
//code to call _parent function goeshere
//fn is the function name passed form the XML
}

I tryed using _parent[eval(fn)], but that didn't work.
Thanks
Russ
This topic has been closed for replies.

1 reply

Inspiring
May 11, 2006
this seems a bit sloppy, but it works....

function myFunc(a){
trace(a)
}
var func:String = "myFunc"
var arg:String = "This is my argument"
this.call(this,[func](arg))