How to limit an AS3 3D rotation - please read


I’ve followed the little tutorial on Kirupa explain the rotation on X/Y/Z
and I used these codes to play around

globalContainer.addEventListener(MouseEvent.MOUSE_MOVE, moveMouse);
globalContainer.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheel);

private function moveMouse(e:MouseEvent) {
 globalContainer.rotationX= globalContainer.mouseY
globalContainer.rotationY= globalContainer.mouseX }

private function mouseWheel(e:MouseEvent) {

This code makes my globalContainer moves all around without any limit,
my question : howcan I improve this to somehow limit the rotation of my object allowing it to rotation on the X axe from -100 to + 100, and so on ??

I’m stuck…

Thak you !!