View Full Version : how to do this effect?
egoldy
01-18-2005, 07:38 AM
hi,everyone.
I like this mouse effect.
please check out under the link.
http://www.bbc.co.uk/drama/spooks/games/index.shtml
enter the site.I mean the graphic fellow with the mouse move,like 3d effect.
how to do this.
Thanks a lot!
valpez
01-18-2005, 04:18 PM
I believe you would make each part of the background that you want to move its on movieclip, then add something along these lines of code to each movieclip and alter the speed a touch so that each object is moving at a rate that is unique to the others.
onClipEvent(load) {
var speed = 10;
var right = 266;
//add the left variable if you need it
//and delete any of the variables that you do not need.
var bot = 143;
}
onClipEvent (enterFrame) {
if (_root._xmouse >= right && _x >= right) {
_x += (right - _x)/4;
}
else if (_root._ymouse >= bot && _y >= bot) {
_y += (bot - _y)/4;
}else{
_y = (_y+_ymouse/speed);
_x = (_x+_xmouse/speed);
}
}
I hope that helps
egoldy
01-19-2005, 03:10 AM
hi valpez
Thanks
but I want to make the graphic fellow with the mouse going reserve direction, like above links.
and how can I do more smooth move like above links.
valpez
01-19-2005, 06:29 AM
To make it follow in the reverse direction, just add a negative sign in front of the equal sign:
_y -= (_y+_ymouse/speed);
_x -= (_x+_xmouse/speed);
And to make it more 'smooth', increase the speed variable.
ZeroExcel
09-19-2005, 10:46 AM
I need help regarding this too, it's for my year 2 project. I can't seem to get thes codes right, please please please help me, I have to get it done by tomorrow night(it's 5.30pm now in singapore)
http://s17.yousendit.com/d.aspx?id=16AR8YC0MH0F40W0N5RDH5K5A5
I have sent my file to u send it, please help.. thanks alot everyone!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.