This is a discussion on "Mouse scrollable gallery" within the Flash & Multimedia Forum section. This forum, and the thread "Mouse scrollable gallery are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Mouse scrollable gallery
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Mouse scrollable gallery
I am trying to make a cursor scrollable gallery of say 5 or 6 photos. the only thing i have found so far is a horizontal and vertical scrollable photo. the photo is one big photo. i was thinking of making a large photo out of my 6 smaller photos but i only want the scroller to be horizontal. any ideas?[code][//variable for the image instance path (symbol: reef_graphic, instance: img)
varimg = _root.img //variable for the background instance path (symbol: background, instance: bgd) varbgd = _root.bgd //speed of the mouse scroll (between 0 and 1) v=0.2 //mouse position mousex = varbgd._xmouse; mousey = varbgd._ymouse; //image position imgx = getProperty(varimg, _x); imgy = getProperty(varimg, _y); //distance fom the center to the left, right, top and bottom side left = getProperty(varimg,_width) / 2 right = (getProperty(varimg,_width) / (-2)) + (getProperty(varbgd,_width)) top = getProperty(varimg,_height) / 2 bottom = (getProperty(varimg,_height) / (-2)) + (getProperty(varbgd,_height)) //scrolling of the image setProperty (varimg, _x, (imgx+(mousex*v))); setProperty (varimg, _y, (imgy+(mousey*v))); //stop the image on the horizontal side //left if (getProperty(varimg, _x) >= left) { if (mousex > 0) { mousex = 0 setProperty(varimg, _x, left); } else if (mousex < 0) { mousex = varbgd._xmouse ; setProperty (varimg, _x, (imgx+(mousex*v))); } } //right if (getProperty(varimg, _x) <= right) { if (mousex < 0) { mousex = 0 setProperty(varimg, _x, right); } else if (mousex > 0) { mousex = varbgd._xmouse ; setProperty (varimg, _x, (imgx+(mousex*v))); } } //stop the image on the vertical side //top if (getProperty(varimg, _y) >= top) { if (mousey > 0) { mousey = 0 ; setProperty(varimg, _y, top); } else if (mousey < 0) { mousey = varbgd._ymouse; setProperty(varimg, _y, (imgy+(mousey*v)));} } //bottom if (getProperty(varimg, _y) <= bottom) { if (mousey < 0) { mousey = 0 ; setProperty (varimg, _y , bottom); } else if (mousey >0) { mousey = varbgd._ymouse; setProperty(varimg, _y,(imgy+(mousey*v)));} } //can be deleted, usefull for adjust your image set ("_level0 set ("_level0:mx" , mousex); set("_level0:y", imgy); set ("_level0:my", mousey);/CODE] |
|
|
![]() |
| Tags |
| flash, gallery |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Created Flash Photo Gallery in PhotoShop. How can I put this Gallery INSIDE a page?? | BlackReef | Flash & Multimedia Forum | 3 | Dec 13th, 2007 18:30 |
| Scrollable Table? | Prof | Web Page Design | 6 | Nov 7th, 2006 00:37 |
| Scrollable Text Box | mirracle4 | Web Page Design | 3 | Jul 12th, 2006 10:28 |
| Scrollable Div Help needed | hardybabe | Web Page Design | 7 | Jul 10th, 2006 14:50 |