PDA

View Full Version : scrolling or panning. one of the two


stewart wright
04-23-2002, 01:25 AM
right, i think its a simple problem.

i have an image that’s about, say 1600 x 600 in a movie that’s 800 x 600. and i want to scroll or pan the image left to right when the cursor is at the respective side.

i think i should make some invisible buttons or something along those lines but im not sure how to go about it.’

i’ve searched under scrolling and panning but cant seem to find something that covers what I’m trying to achieve. basically i want to pan the image as you would if you used the hand tool in flash but only in the one axis.

if you can understand that and help me out it would be much appreciated,

stewart :D

Billy T
04-23-2002, 07:39 AM
attached

stewart wright
04-23-2002, 08:08 PM
cheers, that works great.

can anyone tell me how to make a 'safe zone' in the middle where the mouse wont scroll, and only have the image scroll when the mouse is at the edges of the screen?

also if someone could explain whats doing what in the actionscript,that would be great too.

thanks, stewart

stewart wright
04-23-2002, 11:39 PM
right, i used the code from the previous reply but it didnt do all that i was wanting.

i wanted to have it scroll when the mouse was in a certain area, after much head scratching and many many attempts, i finally sussed it. if anyone is trying for a similar thing then you might be interested to know that i did it by adding this code:

if ((_ymouse > 578) && (_ymouse < 600))

i put this under the onClipEvent(enterFrame) script and it worked.
a point to note is that the co-ordinates are relevant to the object which you have put the script on.