-
Photoscroller
i have a swf thats a photoscroller - Photoscroller.swf-
this Photoscroller.swf is targeted to a empty_mc on my main swif.
now, how can i prevent the scrolling feature when the mouse is not directly on the scroller.
when i move the mouse anywhere on the main swf the scroller responds, ...drives me crazy..
-
Senior Member
Yeh that's annoying..
try putting a check location script around the scroll code...
code:
if (_xmouse > leftbound && _xmouse < rightbound && _ymouse > topbound && _ymouse < bottombound){
//do your scroll
}
-
i couldn'tget it to work.
take a look at the code. where would i place it?
Code:
xmouse = _xmouse - (widthmovie/2);
speed = (xmouse) / scrollspeed;
if (speed < 0) {
speed = -(speed);
}
if (xmouse < 0) {
xphoto = xphoto + speed;
}
if (xmouse > 0) {
xphoto = xphoto - speed;
}
if (xphoto > 0) {
xphoto = 0;
}
if (xphoto < -(widthphoto - widthmovie)) {
xphoto = -(widthphoto - widthmovie);
}
setProperty("photo", _x, xphoto);
-
Senior Member
try...
code:
if (_xmouse > leftbound && _xmouse < rightbound){
if (_ymouse > topbound && _ymouse < bottombound){
xmouse = _xmouse - (widthmovie/2);
speed = (xmouse) / scrollspeed;
if (speed < 0) {
speed = -(speed);
}
if (xmouse < 0) {
xphoto = xphoto + speed;
}
if (xmouse > 0) {
xphoto = xphoto - speed;
}
if (xphoto > 0) {
xphoto = 0;
}
if (xphoto < -(widthphoto - widthmovie)) {
xphoto = -(widthphoto - widthmovie);
}
setProperty("photo", _x, xphoto);
}
}
replace "topbound", bottombound" etc. with your own values.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|