• 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 : 36591
Version : 8 Rating : 
3.2/5 (53 votes)
  • Currently 3.15/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

Free Flash Tutorials, Actionscript, Mouse Follower with Text Rotation

We will put the text inside a graphic because we need to tween it later and flash doesn't let us directly tween text.

So create a new graphic symbol; it's the same thing as creating a Movie Clip, but select "Graphic" instead of "Movie Clip":
Free Flash Tutorials, Actionscript, Mouse Follower with Text Rotation

Inside draw a static textbox and write whatever you want.

Now create a new Movie Clip called "textAnimation".

Drag an instance of the text graphic on the first frame, copy this frame and paste it on the frame 2 and 30.

Set the identifier to "Text" for this Movie Clip.

On the first frame of the main timeline paste this code:
//angle for the textAnimation Movie Clip var newAngle = 0; //used just to create new Movie Clips var count = 0; //attach textAnimation Movie Clip attachMovie("Text", "Text" + count, 1000 + count); //set x(y)Pos to the first Text Movie Clip coordinates var xPos = Text0._x; //we will use this variables to move the Movie Clips var yPos = Text0._y;

Now on the text Movie Clip open the actions for the first frame and paste:
//if the mouse is to the right of this Movie Clip if(_root.xPos < (_root._xmouse - 10)) { //increase xPos by 10 _root.xPos += 10; } //if the mouse is to the left else if(_root.xPos > (_root._xmouse + 10)) { //decrease the xPos by 10 _root.xPos -= 10; } //if moved down if(_root.yPos < (_root._ymouse - 10)) { _root.yPos += 10; }

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.