all groups > flash actionscript > july 2006 >
You're in the

flash actionscript

group:

scroll window, define active area


scroll window, define active area mr.nazarko
7/8/2006 9:06:16 PM
flash actionscript:
hey,

ive found this great scroller on www.flashkit.com
and started to mess around with it,

its posted here.
http://www.popmontreal.com/TEST/city_test2.swf

is it possible to activate only the area witnin the border,
so that scrolling will stop when your mouse leaves that area ?

thanks!,
anton

Re: scroll window, define active area mr.nazarko
7/9/2006 2:30:45 PM
any direction would be appreciated...

this is the AS that is used,

onClipEvent (enterFrame) {
if (_root.mainVar == 0) {
homeX = (-_root._xmouse)+600;
} else {
homeX = (-_root.mainVar)+600;
}
thisX = _x;
diffX = homeX-thisX;
if (_root.mainVar == 0) {
moveX = diffX/60;
} else {
moveX = diffX/40;
}
_x = thisX+moveX;
}


is it possible to use an onClipEvent (mouseMove) with _ymouse & _xmouse to
define an active area ?


thanks,
anton
Re: scroll window, define active area mr.nazarko
7/9/2006 5:39:16 PM
progress...

a much easier solution...
i just added the above AS to an on (rollOver)......

but how would i check to see if the mouse is still over the button.. if
true... loop the script ?

thanks again
anton
AddThis Social Bookmark Button