Hi there, I want to call a function but want to able to call it
dynamically so a string that is passed will determine which function
is called.
My reason for this is I have an interface with a number of buttons
that have different labels but that look the same and need to call
different functions. I was going to make one button and duplicate it
then name it so it will call a function depending on what it's name
is. My code would go something like this:
///////inside 'button' MC named 'pictures'
var label:String = this._name
this.onPress = function(){
//want to call function from here, dictated by the name of the MC,
not sure of this sytanx
this._parent.label()
}
////////////////main timeline
function pictures(){
//to be called from pictures button onPress event
}
///////////
Any suggestions much appreciated!
Ali
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com