movie clip else statement

I have 2 movie clip scripts below which on rollover another movie clip is affected.
In this case "buttonsupporters".

how do I combine these two scripts into the one rollover function?

on (rollOver) {
   if (_root.buttonsupporters._currentframe ==1) {
   _root.buttonsupporters.gotoAndPlay(2);
} else {
   _root.buttonsupporters.gotoAndStop;
}
}

on (rollOver) {
   if (_root.buttonwork._currentframe ==1) {
   _root.buttonwork.gotoAndPlay(2);
} else {
   _root.buttonwork.gotoAndStop;
}
}

Cheryl LanderAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
RobConnect With a Mentor Owner (Aidellio)Commented:
What happens when you try this
on (rollOver) {
	if (_root.buttonsupporters._currentframe ==1) {
		_root.buttonsupporters.gotoAndPlay(2);
	} else {
		_root.buttonsupporters.gotoAndStop;
	}
	if (_root.buttonwork._currentframe ==1) {
		_root.buttonwork.gotoAndPlay(2);
	} else {
		_root.buttonwork.gotoAndStop;
	}
}

Open in new window

0
 
Cheryl LanderAuthor Commented:
What happens?

it works perfectly.

Thanks.
0
 
RobOwner (Aidellio)Commented:
LOL good to hear :)
0
All Courses

From novice to tech pro — start learning today.