Im sure how to even ask this one..LOL
but I want to be able to set a variable (parameter) that holds a function name..
example:
I have a parameter for user input (callBackFuntion)
I want the user to be able to enter in a function name that they created..(example: allDone() is a function the user created.) and when 'callBackFunction' is found in the code..it executes the 'allDone();' function they created and defined as the callBackFuntion variable/function.
so in this snippet of code:
I want the part in BOLD to really be var that passes in the user define function they want to execute in that place..Code:if (lb>=tb) { trace("alwaysOn3: "+alwaysOn); if (alwaysOn == true) { _visible = false; trace("visible2 (false):"+_visible); callBackFuntion; } else { trace("deleting onEnterFrame code"); trace("Back to frame 1"); gotoAndStop(1); callBackFuntion; } }
(makes sense?)
how would I go about doing that? make a function the calls that function? or something? LOL
thanks




Reply With Quote