Hi,
leaving the is-this-really-the-design-that-u-want discussions out of the equation,
var _root.current is not going to work, it should be var current:Function;

I tried it, and it works that way.

Like I said though, you might want to rethink this design.

greetz
Hans

At 03:38 PM 11/26/2005, you wrote:
Hi,
I have many functions in my movie.

On press of different buttons, I would like to cal different functions.

BUT

I am not calling them directly.

Each button press goes through a couple of common functions and then
at the each of it, it needs to call a specif function based on the
button which was clicked.

So I tried creating a var like this:

var _root.current:Function;

Then on press of the button, I would update the value like this:

on(release){
_root.current = someNewName;
_root.callToSomeFunction();
}

//------------------------------

function callToSomeFunction(){
current();
}

function someNewName(){
trace("OK");
}

This does not work.

Does the value _root.current gets stored as a function?

Am i doing it right?
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to