Publishing System Settings Logout Login Register
Mystic Particles - Worm tutorial alternative
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Rating
Add to Favorites
Posted on December 5th, 2006
8260 views
Adobe Flash
Mystic Particles - Worm tutorial alternative
Ben Fleming

Another thing you can do with the worm tutorial. If you havent read that tutorial, do so here.

In this tutorial, we will be making this. If you have taken the Create a Worm that "Follows" the Mouse tutorial, this will be easy.

First, open up Flash. Start a new document, and put your framerate (FPS) at about 20-30. This is so it will be smooth. Then, go Insert > New Symbol, or Ctrl+F8. Use the following settings:


Inside the Particle symbol, draw a 25x25 circle of the colour of your choice. Then, right-click on the first frame, and select Create Motion Tween. On about the 40th frame, add a keyframe, and set the circle's width and height to 1. Then move the circle up about 50-100 pixels, so it gives the effect of shooting out.

Return to the main stage, and in the first frame, add this code:

[code=Java]var depth:Number = 0;
onEnterFrame = function() {
newPart = "particle"+depth;
_root.attachMovie("particle", newPart, depth);
_root[newPart]._x = _root._xmouse;
_root[newPart]._y = _root._ymouse;
_root[newPart]._rotation = random(360);
_root[newPart].onEnterFrame = function() {
if(this._currentframe == 40) {
this.removeMovieClip();
}
}
depth++;
}[/code]

I'll run you through it breifly..

We've created the depth variable, then an onEnterFrame loop. Inside there we've created a new variable newPart, which will contain the name of the newly attached clip. Then we've actually attached the Particle clip, with the linkage of particle, and given its new name, and then set its dimension, or depth. Then we've set its x and y positions to the mouse, and randomised its rotation (so it appears mystic). Then we create another onEnterFrame loop, but just for the object, and it constantly asks if the current frame is 40, and when it is, it removes the clip. Then we've closed the loop and the if statement, increased depth, and closed the main loop.

There we go, test your movie.
Dig this tutorial?
Thank the author by sending him a few P2L credits!

Send
Ben

This author is too busy writing tutorials instead of writing a personal profile!
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top