Let’s say I have the following code:
var initObj = new Object();
initObj.mood = “happy”;
mc = attachMovie(“mcBox”,“instBox”,100,initObj);
mc.onPress = boxPress;
function boxPress() {
trace("Box mood: " + this.mood);
}
Now, let’s say there are times that I want to call boxPress() other than when the onPress event happens. Is there a way I can set up an object, give it a “mood” property, and then run boxPress() so that it uses my non-movieclip object instead of a movie clip?