Link to home
Start Free TrialLog in
Avatar of Brian Lin
Brian LinFlag 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

ASKER CERTIFIED SOLUTION
Avatar of quizengine
quizengine
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Brian Lin

ASKER

Just what I looking for, Thanks!!
There was a commented line (line 3) that you can remove (I forgot!)
Yes, I saw that, Thanks!