Avatar of Brian Lin
Brian Lin
Flag for United States of America asked on

Array is not working ( AS2 )

I have 4 buttons and I am trying to rollover individually. I try to use the following method but it is not really working. Any advises is appreciate.

var totalObjects = 4;
for (i = 1; i < totalObjects; i++) {
	obj[i].onRollOver = function () {
		this.gotoAndStop ("safe_drag");
	};
	obj[i].onRollOut = function () {
		this.gotoAndStop ("original_state");
	};
}

Open in new window

Adobe Flash

Avatar of undefined
Last Comment
Brian Lin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
quizengine

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Brian Lin

ASKER
Just what I looking for, Thanks!!
quizengine

There was a commented line (line 3) that you can remove (I forgot!)
Brian Lin

ASKER
Yes, I saw that, Thanks!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck