is there a way to detect when the mouse leaves the swf stage area in a browser?
as an example, if i were to mouse outside of the display window up to the URL
bar or just mouse off of the browser in it's entirety.
webforumsuser@macromedia.com - 24 Nov 2004 10:53 GMT
Well here's what I did... The Stage object is funky and doesn't work properly
so I made an empty movie clip the width and height of the stage and gave it an
instance name of myMC. I put a dynamic text box on the stage so that when the
mouse went out of bounds, text would be written to the text box... I gave the
dynamic text box a variable name of box. Here's the code with the Stage object
commented out since I couldn't get it to work properly. onMouseMove =
function() { //stageBegX = Stage.width - Stage.width ; //stageEndX =
Stage.width; //stageBegY = Stage.height - Stage.height; //stageEndY =
Stage.height; stageBegX = myMC._width - myMC._width; stageEndX = myMC._width;
stageBegY = myMC._height - myMC._height; stageEndY = myMC._height;
if(_xmouse<=stageBegX) { box = 'out of bounds left'; }
if(_xmouse>=stageEndX) { box = 'out of bounds right'; }
if(_ymouse<=stageBegY) { box = 'out of bounds top'; }
if(_ymouse>=stageEndY) { box = 'out of bounds bottom'; } } I noticed that
this worked best with the following publish settings on the HTML tab...
Dimensions: Percent HTML Alignement: Default Scale: No Scale Flash Alignment:
Center, Center Hope this helps!!! Brenda