Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Movie clip onRollOver 1

Status
Not open for further replies.

mancroft

Programmer
Oct 26, 2002
267
GB
Movie clip onRollOver

The code below displays a number of horizontal bars with a green box in each.

When the mouse rolls over a bar, the myrollover function is activated.

How do i get it to activate that function ONLY when the mouse rolls over a green box?
Code:
this.display_mc.list_mc[name1].name2.onRollOver = myrollover;
won't work.

Thanks.

Code:
function buildList() {
	var spacing:Number = 30;

	for (var i = 0; i < list.length; ++i) {
		var name1:String = "infoBar" + i + "_mc";
		var name2:String = "greenbox" + i;

		var y1:Number = i * spacing;

		display_mc.list_mc.attachMovie("infoBar", name1, i);
        display_mc.list_mc[name1].attachMovie("greenbox", name2, this.getNextHighestDepth(), {_x:230});

		display_mc.list_mc[name1]._y = y1;
		display_mc.list_mc[name1].theTitle_txt.text = list[i];

		this.display_mc.list_mc[name1].onRollOver = myrollover;

		}
	}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top