-
hi,
i need to call a function, whose name is a variable...
(exactly like the setClickHandler() function for the PushButton Component)
example:
Code:
function check(funcCall) {
if(whatEver) {
// i need to call function whose name is the funcCall parameter
}
}
hope you understand what i mean
thanx in advance..
-
if the funcCall is only a string, then you have to use something like:
Code:
movieClipThatHoldsTheFunction[funcCall]();
If the funcCall is the actually reference to the function then just do this:
Of course add any parameters you need in the ().
Hope that helps.
-
hi,
i got it..
you just have to use Function.call()..
regards,
-
like this:
myFunction(myVar){
gotoAndPlay(myVar);
}
then using this command:
myFunction(5);
would make the movie goto and play frame 5
-
hi,
that's not i wanted.. but i already got it.. i said it in the last reply
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|