I’m trying to make a movie clip play when the mouse is in a certain position on the screen without using invisible buttons, coding this myself so far I’ve got
_root.top = 319
_root.bottom = 445
yval = _root._ymouse;
if (_root._ymouse > _root.top) {
_root.flowers.play();
} else {
_root.flowers.stop();
}
doesn’t seem to work right.
Any ideas?
Put the [font=courier new]if[/font] and [font=courier new]else[/font] statements within an [font=courier new]onMouseMove[/font] event handler?
var top = 319;
var bottom = 445;
flowers.onMouseMove = function() {
if (_ymouse>top && _ymouse<bottom) {
this.play();
} else {
this.stop();
}
};
I experimented after I’d posted and moved the code from the _root level and applied it to the movie clip itself and addressed it using .this and it works alot better, I’m new to functions so I’ll try your code.
Thanks again