Actionscript 2 - Written by Artluvr on Tuesday, January 1, 2008 23:12 - 18 Comments

Image Panning on Mouse Move – Flash, Actionscript 2

Image Panning on Mouse Move Demo

You can pan an image by simply moving you mouse.

If you wish to change the speed and direction then go to  layer on line 39 and find the constrainedMove(image, 4, 1); code.
If you want to change the speed change the value 4 to something else. If you wish to change the direction change the number 1 to -1.

Price: € 2


Share and Enjoy:

18 Comments

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Artluvr.com
Jan 16, 2008 17:10

Source file is in FLASH CS3 format. If you wish it in a previous version then go ahead with the purchase and send me an email.

mike
Apr 25, 2008 1:05

are you able to load swf files rather than jpgs? and also create hotspots w/ xml?

Artluvr.com
Apr 25, 2008 6:02

mike, you can load what ever you want. The item that is moving is a movieclip, so inside it you can load whatever you like!

Markus
Apr 29, 2008 19:44

Is it easy to create hotspots on the image file so that when clicked upon move you to another page?

Artluvr
Apr 30, 2008 12:11

Markus, yes it is very easy. The image is inside a movieclip so, you can add whatever you wish inside that movieclip!

brad
Nov 5, 2008 22:26

Does anyone know how to do this in Actionscript 3? Also the direction seems to be inversed here – the closer you go the right, it moves to the left.

Artluvr
Nov 8, 2008 9:31

Brad, if you wish to change the direction of the image movement change the last parameter of the constrainedMove function to -1 or anything else

//if you wish to change the direction change the 1 value to something else
constrainedMove(image, 4, -1);

JRowe
Jan 15, 2009 6:09

I would like all directions inversed. move mouse left, scene pans right. Move mouse up, scene pans down, etc.

Artluvr
Jan 16, 2009 7:32

JRowe thank you for buying from Artluvr.com. Go to actions layer on line 39 and find the constrainedMove(image, 4, 1); code.
If you want to change the speed change the value 4 to something else. If you wish to change the direction change the number 1 to -1.

julio
Feb 4, 2009 14:36

hey, that’s works with a movie clip, like a entire site, making this effect?

julio
Feb 4, 2009 14:45

i saw you have answered my question before. :) so, lets to next: there are any tutorial for adapt that .FLA with my project? or, if i need any help, could i have it? thanks.

AD
Mar 6, 2009 9:04

This is awesome, exactly what I need. Thanks very much!

AD
Mar 6, 2009 15:33

Hi, gotta a question:

If I add an object INSIDE the \\"image\\" movieclip, but place it outside its width & height, it scrolls too far on the y and x-axis…(probably because I\\\’m redefining the \\"image\\" movieclip size)

Is there a way I can set the scrolling to specific values instead of using the width and height of the \\"image\\" movieclip??

Would appreciate advise on this. Thanks again.

Artluvr
Mar 11, 2009 8:30

AD, the component doesn’t support that kind of functionality. You will have to change the code and instead of reading the width and height of the image you will have to type the custom width and height

vinod
Mar 22, 2009 13:18

here is the similar thread but it works for my requirment
http://www.flashmove.com/forum/archive/index.php/t-23118.html

_——————————————_
earn money :http://clixncash.com/index.php?p=1&ref=dsrvm

jose
Aug 28, 2009 19:08

Thanks for offering this great solution for such a reasonable price!

Saved some time, its simple and easy to run with.

Is there an ActionScript 3.0 version available or in the works?

Kindest regards,
Jose
ZNBD

Sulaiman Al-Zuhair
Feb 10, 2010 13:14

hi Artluvr,

thanks for this. one quick question:

any idea how i could switch the initial image to a different picture?

i am thinking of purchasing this for an art gallery website i am working on, and i thought it would be cool to be able to switch through different paintings and “explore” them with this effect.

thanks again.

Artluvr
Feb 23, 2010 21:11

@Sulaiman, you can do it by removing every child inside the movieclip, and then adding the new image inside it.

Leave a Reply

Comment

Most Popular Content






Image Galleries


Menus & Buttons


Utilities


Freebies