| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| My background image (945 px wide) is larger than my Flash window (620 px wide). When a user moves the cursor left or right, I want the background image to move in that direction but only as far as the edge of the image and when the cursor stops moving so should the image. I will also have hot spots in various places that will be clickable. I tried this code (see below), but it doesn't quite do what I need. For one thing it continues to scroll beyond the left and right edge of the background image. Another problem is that the image keeps moving even though the cursor stopped, which make it near impossible to click on my hotspots. function accelScroller(myTarget) { myMiddle = Stage.width/2; this.onEnterFrame = function() { moveDist = myMiddle-_root._xmouse; myTarget._x += moveDist/10; //border check if (myTarget._x>Stage.width) { myTarget._x = 0; } else if (myTarget._x<0) { myTarget._x = Stage.width; } } } accelScroller(mcInstanceName); |
|
#2
| |||
| |||
| Hey, I have thought of using this for the exact reason. I haven't got around to using the hotspots but check out this tutorial. I think this what you mean. http://www.kirupa.com/developer/flas..._image_pan.htm |
|
#3
| |||
| |||
| AWESOME! This looks like exactly what I was needing. Thanks! (can't wait to try it out.) |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.