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

flash actionscript

group:

smooth halt



smooth halt alien4m_mars
3/2/2006 11:57:39 PM
flash actionscript: hi am using this

if (_xmouse>Stage.width-(Stage.width/4) & _root.mcContainer._x>=-602) {
_root.mcContainer._x -= 5;
}

but the movie clip stops in one go, i want it to slide slowly and stop any
idea??

thanks
Re: smooth halt alien4m_mars
3/3/2006 12:00:00 AM
hi this is my code

setInterval(fMovemcContainer, 20);
function fMovemcContainer() {
if (_xmouse>Stage.width-(Stage.width/4) && _root.mcContainer._x>=-602) {
_root.mcContainer._x -= 5;
}
}

now it movies when the if is true, but stops as sson as the if is false, i
want it to come to a stop slowly when false....any hep???

thanks
Re: smooth halt NSurveyor
3/3/2006 12:10:42 AM
The logical AND operator is '&&' or and.

if (_xmouse>Stage.width-(Stage.width/4) && _root.mcContainer._x>=-602) {
_root.mcContainer._x -= 5;
}

But even so, this code is strange... the mc will only move if the x position
of the mouse is greater than -602 and greater than three-fourths of the Stage's
width. Obviously, this will only be true when the x position of the mouse is
greater than three-fourths of the Stage's width. What exactly are you trying to
do?

And by the way, is this code being run several times? If not, it will only
move at most, one time. You might need something like:

onEnterFrame = function(){
//code to repeat
}
Re: smooth halt NSurveyor
3/3/2006 12:12:01 AM
Re: smooth halt forumnotifier
7/23/2006 4:04:30 PM
Thanks for your support
Re: smooth halt forumnotifier
7/23/2006 4:06:09 PM
Thanks for your support
AddThis Social Bookmark Button