We help IT Professionals succeed at work.

Array is not working ( AS2 )

Brian Lin
Brian Lin asked
on
278 Views
Last Modified: 2014-05-22
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

Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Brian LinDesigner

Author

Commented:
Just what I looking for, Thanks!!
There was a commented line (line 3) that you can remove (I forgot!)
Brian LinDesigner

Author

Commented:
Yes, I saw that, Thanks!
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.