Computer Science Canada

Help with location

Author:  eNc [ Sun Aug 15, 2004 1:20 pm ]
Post subject:  Help with location

I have a moving window for my website and when you move it so for it goes off screen so I am wondering how I could use and if statement to reset the x + y co - ordinates when its position is in a certain spot on the screen. Please Help thanks.

Author:  TheZsterBunny [ Sun Aug 15, 2004 8:24 pm ]
Post subject: 

what?

try the setProperty commands.

-Z

Author:  zylum [ Wed Aug 25, 2004 9:38 pm ]
Post subject: 

something like? :
code:
if ((window._x >= window.width || window._x >= Stage.Width) && (window._y <= window.height || window._y >= Stage.Height)) {
window._x = defaultX
window._y = defaultY
}


sorry if the syntax is a bit wrong. i haven't done flash in a while and dont have it on my computer.


: