Hi coders.
I have an issue I cant seem to find a solution to.
I have an image gallery with invisble next and previous buttons. When the
mouse is over the left side of the image, the left button becomes visible
and follows the mouse. So far so good. :-) The problem is that when the
button is under the mouse the button only moves when the mouse has moved
away from the button, which creates a very jagged movement. Furthermore,
this can be solved if I set prevImg.mouseEnabled = false, but then I disable
the button.
So the cursor needs to know when its over the image, even when the button is
between the mouse and the image.
Heres code I use:
private function navigationMove(event:Event):void{
var target = event.target;
var location:Point = new Point(target.mouseX, target.mouseY);
location = target.localToGlobal(location);
if(event.target.mouseX < 278) {
prevImg.visible = true;
nextImg.visible = false;
prevImg.x = location.x;
prevImg.y = location.y;
}else{
prevImg.visible = false;
nextImg.visible = true;
nextImg.x = location.x;
nextImg.y = location.y;
}
}
I hope someone can help me on this one.
Thanks
Vayu
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders