• Home
  • Free Tutorials
  • Free Video Tutorials

Adobe Photoshop
Autodesk 3ds Max
CSS
Flash
Help Center Live
iPhone
Joomla
Make Money Online!
Mambo
mIRC
Outlook Express
SEO / SEM
Simple Machine Forum
Target Explorer

Mouse Follower with Text Rotation

Category : Flash Views : 34915
Version : 8 Rating : 
3.2/5 (49 votes)
  • Currently 3.24/5
  • 1
  • 2
  • 3
  • 4
  • 5
Type : Text Source File: mouse-follower-with-text-rotation.zip
Result: See the result


Previous | 1 | 2 | 3 | Next

var xPos = Text0._x; var yPos = Text0._y;
Variable used to control the attached Movie Clip's positions.
The Movie Clips also have a fixed position; the effect of movement is created by attaching new Movie Clips in new positions every frame. To do that we just need to change these two variables.

if(_root.xPos < (_root._xmouse - 10)) { _root.xPos += 10; }
If the mouse if to the right of this Movie Clip increase the xPos variable by 10 so that the next Movie Clip attached is positioned 10px to the right.

else if(_root.xPos > (_root._xmouse + 10)) { _root.xPos -= 10; }
Decrease variable to move the next Movie Clip to the left.

if(_root.yPos < (_root._ymouse - 10)) { _root.yPos += 10; }
Increase yPos to go down.

else if(_root.yPos > (_root._ymouse + 10)) { _root.yPos -= 10; }
Decrease to go up.

this._x = _root.xPos; this._y = _root.yPos;
Set this Movie Clip's position using the variable xPos and yPos.

_root.newAngle += 10;
Increase the global angle variable. The next Movie Clip will also use this variable always adding 10コ and creating a rotation effect.

this._rotation = _root.newAngle;
Set the Movie Clip's rotation.

_root.count++;
Increase this variable to create Movie Clips.

_root.attachMovie("Text", "Text"+_root.count, 1000+_root.count);
Attach a new Movie Clip.

this.removeMovieClip();
Remove Movie Clip after it got to the last frame.


More cool tech articles from other blogs.

Place your ad here
Loading...


Previous | 1 | 2 | 3 | Next
How to Video Tutorials on software by Helpvids.com

Sponsors





Studio | Advertisement | About Webzo | Contact Webzo | Terms of Use | Free Video Tutorials by Helpivds

Copyright © 2007 NR Concepts Ltd. All rights reserved.