
Welcome Guest
|
|
|
#1
|
|||
|
|||
|
Onmousewheel help!!!
Im pretty much a beginner when i comes to actionscript... so i was wondering if anybody ould help me out with this. I have a movie clip that i want to be scrollable withe the mouse wheel. It works fine but i want to be able to add boundries ont he y axis where it has to stop and wont be able to scroll anymore.
right now i have this code applied to it on my actions layer: Actionscript:
// Creating the listener object
mouseListener = new Object();
// Create onMouseWheel function
mouseListener.onMouseWheel = function (delta) {
linksmov._y += delta;
}
// Registering the listener to the Mouse object
Mouse.addListener(mouseListener);
/*
|
|
#2
|
|||
|
|||
|
Simply add a condition construct:
Actionscript:
mouseListener.onMouseWheel = function (delta) {
if (((linksmov._y>0) and (delta<0)) or ((linksmov._y<400) and (delta>0))) {
linksmov._y += delta;
}
}
__________________
... take me to your coder. |
|
#3
|
|||
|
|||
|
Thank you much im gonna try this right ow
|
|
#4
|
|||
|
|||
|
Works but w/ a problem!
ok so it works fine but with one problem i have multiple movies on different frames that need to be scrollable thing is when i apply the code to a different frame it negates all scrolling.
i switched around the instance names and everyhting but that didnt work any ideas prisma since your the only one that helped me! |
|
#5
|
|||
|
|||
|
Nevermind!
i fixed it thanx for the code though!
|
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|

Programming Languages


