Another question about how variables work

Norie if you read this don’t yell at me . . . :smiley:

I have yet another question about how variables work.

I am using this code to communicate with an easing function:

onClipEvent (enterFrame) {_root.gek = false;
for (var i = 0; i<18; i++) {
if (_root.timeline[“copy”+i].hitTest(_root._xmouse, _root._ymouse)) { //set gek variable to true when mouse hits timeline
_root.gek = true;

if “gek” is true then the easing function works and my little “easebar” moves to the mouse.

Now, I want to be able to capture what i is when the mouse moves over it so that I can load an mc depending on where the easebar is.

I thought I could declare a global variable (_global.j = 0) at the root and then set i to j and use j somewhere else. But i doesn’t exist outside of the onClipEvent!

Obviously I am very confused. How can I capture the value of i? :h: