Hi, I am running into a problem with functions. I three functions and they must run in order to work properly. Right now the run order is: function 1, function 3, function 2 even though in my actionscripting them in the correct order.
Here is my code:
Function1:
Grill_over.onRollOver = function() {
if ((overHamburgers == 0) && (overGrill == 0)) {
Grill_mc.gotoAndPlay(“startOpen”);
overGrill = 1
}}
Function2:
H1.onRollOver = function() {
overHamburgers = 1;
trace(overHamburgers);
captionFN(true, “Burgers.”, this);
this.onRollOut = function() {
overHamburgers = 0;
trace(overHamburgers);
captionFN(false);
};};
Function3:
Grill_over.onRollOut = function() {
if ((overHamburgers == 0) && (overGrill == 1)) {
Grill_mc.gotoAndPlay(“startClose”);
overGrill = 0
}}
Basically what I need is to make sure the second function if rolled over runs and sets the variable “overHamburgers” to 1 before function 3 runs and tries to roll out. If anyone could help me out I would appreciate it.
Thanks,
Brian