Panning

does anyone have the code for a flash mx panning?? Or know of a site that could provide a tutorial for panning?

If you are talking about panning sound from left to right or viseversa, in the proporties panel when you have a sound object on your timeline highlighted will offer left to right or right to left.

For actual control on it using actionScript, it’s in here somewhere:
http://www.flashkit.com/tutorials/Audio/Flash_MX-Kenny_Be-824/index.php

http://www.kennybellew.com
[edit] haha freddy, same time i guess[/edit]

thank you for your reply…

sorry I wasn’t specific…

I need to pan from left to right or visa versa through 10 sequencial pictures.

any Idea?? I’ve surfed through most of the sites but didn’t see anything that looked like what i need.

Are you talking about moving a picture from right to left? Because that would be ‘panning’ from left to right. If so, you would use a motion tween.

http://www.kirupa.com/developer/mx/motiontween.htm

panning left to right with 10 sequencial graphics. And the mouse would move over the picture and it would start going in the direction the mouse points in.

I’m sorry if I’m not making myself very clear. ;(

very similar to a vidio but it is done with action scripting.

thanks again

Ohhhh, okay. Try this one out. You would have to change some of the actionScript around, but I think this is more of what you’re looking for:

http://www.kirupa.com/developer/mx/infinite.htm

You can use pictures instead of buttons on there and just have it move the same way.

this is so close to what I need…just one thing…I need it to only pan when the it’s moused over. I’ve actually used this code tutorial you sent recently for a site… I’m just not sure how to code it for a mouse over only…any suggestion on what to change in the code?

thank you again

That’s a little different. If you want a reaction when you mouse over, you’re going to have to tell it to go left or right if you have multiple images. Have you considered using arrow buttons for your thumbnails?

The prob with photo galleries is the ways you can do actually create them is manifold (I love that word!!). Can you describe exactly what you want? Then maybe we can point you in the right directions.

check out this website…this panning is exactly what I need. I would use arrows for it.

select a location on the map an when the page loads you’ll see on the left hand side “click here for more info” click on this and a page will load with a movie clip of panning just like what I need.

thanks

http://www.sarahmcfather.com/hoMMX/mm351/kiosk/kiosk.swf

Okay, now I got what you mean. You would make a long movieClip with your picture (or series of pictures in a row) and give it a name. You’ll have to put a mask on it to show only a part of it. Name the movieClip something like ‘foo’. Then put something like this on the movieClip:


onClipEvent(enterFrame){
on(KeyPress "<Left>"){
_x -= 5;
}
on(keyPress "<Right>"){
_x += 5;
}
}

This will move the picture left or right by 5 pixels everytime you hit the arrow buttons. To make it smoother, you can use some code found here:
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=33035&highlight=keyPress+hold+down
But I don’t know if there’s a number for the arrow keys…If Kode looks at this thread, he may know - he knows everything AS!!

The only other way I can think of doing it would be to use a function that applies speed to a formula on the movieClip, but then you would need a stop button.