Please help game borders

OK I wont submit you to my crappy code but ill show u my SWF so you get an idea of what my game is doing

basically i need to be able to detect better when the bullet hits a corner(it always miss places(I posted all my code and crap in a thread in the actionscript part …but then i had an idea…but i have no idea how to make it work math wise

as the ball spirals down toward your character when ever the lead ball goes accross the top of the screen i want to make it so thats the y bound for the shot(min y)

when the ball starts moving down set that as max X bound

when the ball starts moving left across the bottom set that as max y bounds

and when the ball starts moving up the screen set that as the min x bound

and have it keep repeating as it spirals in so it wont place the balls wrong when i shoot them into the corner…it seems like this should be an easy way to do it but i cant figure out how to set the bounds very easily without a bunch of if statements in my movement code

and im thinking theres got to be an easier way
[edit] bah i feel stupid i just needed to type it out…I think i know how i can do it easily without a bunch of iff’s