you'll need to mess with the css:
make two classes for the body, and be sure the html has no scroll bars:
Code:
//css code
html{overflow:hidden;margin:0;}
body.scrollable{overflow:auto;}
body.unscrollable{overflow:hidden;}
a javascript function that toggles the classes
Code:
//javascript
function toggleScrollable(){
var theBody = document.getElementsByTagName("body")[0];
(theBody.className == "scrollable") ? theBody.className = "unscrollable" : theBody.className = "scrollable";
//you can also use .setAttribute("class", "scrollable"); or unscrollable
//but i think className works cross browser
}
in the ActionScript:
ActionScript Code:
stage.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
stage.addEventListener(MouseEvent.MOUSE_LEAVE, mouseLeaveHandler);
private function mouseOverHandler(e:Event):void {
ExternalInterface.call("toggleScrollable");
}
private function mouseLeaveHandler(e:Event):void {
ExternalInterface.call("toggleScrollable");
}
note, that your not disabling scrolling in this case, but actually disabling the scrollbars.
so the page can still be scrolled with the middle mouse button.
your wrapper would also need to be built with all this in mind.
but something like that could work for what you want.