Calling a flash function

I’ve never gotten the flash command “call function” to work reliably. However, set variable seems to work a lot better. So I create a variable in flash and set it to 0. Then I create an onEnterFrame to watch that variable and call a function if it changes. It looks something like this:

Code:

var callFunction = 0;this.onEnterFrame = function(){ if(callFunction == 1){ calledOne(); callFunction = 0; }}function calledOne(){//do something}

Then on the lectora buttons onClick I use set variable --> callFunction --> and I set it to 1. Hope that helps.

Discussions have been disabled for this post