Hi,
I have been asked if it is possible to reverse the action of the mouse wheel for zooming in the swfs also if it is possible to limit the speed the viewer can move at when panning with the mouse.
I can not think of a way of doing it, can it be done?
Thanks
D ick
Mouse wheel and mouse panning control.
To increase the speed of moving when pressing on arrows on keyboard I wrote this code:
To control mouse wheel you need to make listener and control interaction as you want.
Code: Select all
_root.createEmptyMovieClip('keycontrol',this.getNextHighestDepth());
var keyobj = new Object();
Key.addListener(keyobj);
keyobj.onKeyDown = function() {
keycontrol.onEnterFrame = function() {
//trace(Key.getCode());
if (Key.getCode() == 37) {
_root.pages.page1.all.cont.contpan.pano.setPan(_root.pages.page1.all.cont.contpan.pano.getPan()+8);
}
if (Key.getCode() == 39) {
_root.pages.page1.all.cont.contpan.pano.setPan(_root.pages.page1.all.cont.contpan.pano.getPan()-8);
}
if (Key.getCode() == 38) {
_root.pages.page1.all.cont.contpan.pano.setTilt(_root.pages.page1.all.cont.contpan.pano.getTilt()+5);
}
if (Key.getCode() == 40) {
_root.pages.page1.all.cont.contpan.pano.setTilt(_root.pages.page1.all.cont.contpan.pano.getTilt()-5);
}
};
};
keyobj.onKeyUp = function() {
delete keycontrol.onEnterFrame;
};