Mousedown

Is there a way to activate this using a button or a mousedown which works when clicking within the instance the actionscript is attached to?

The instance the actionscript is attached to is called no1. It is a movie. Instance no2 is also a movie.

onClipEvent (load) {
_x = 0;
speed = 2;
}
onClipEvent (enterFrame) {
endx = 20;
if (_root.no2._x<400) {
_root.no2._x += (endx-_x)/speed;
}
}

At the moment if you change enterFrame to mousedown it allows you to click anywhere within the _root movie and it activates the actionscript. I cannot have this as I plan to use this actionscript to move the items left and reight depending on the item selected.

Thanks

Why not just make the no1 MC into a button and use the onRelease event handler (note this is new to MX, but earlier versions can use on(release) )? That way the script would only execute if the user clicks on no1.

Hope that’s what you were looking for.

-Al

EDIT
Actually, if you want no1 to move, then you will have to put no1’s contents into a button, then put that button into a MC and call that MC “no1”. Hope I haven’t confused you. :slight_smile: