Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Particle Effects



Does anyone know how processor intensive 2d particle effects are in flash. If I had 20 particle generators going at once would that bring a computer to its knees or would it be fine.

Thanks for any help.

Tim



FlashKit > Flash Help > Flash ActionScript
Posted on: 05-06-2003, 01:25 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

[MX] Particle Effects?
Hi,

What would be the fastest methods to create and control particles in Flash? I know theres lots of code lying around, but i'm interested from a programming point of view whats going to be most flash player efficient?

thanks for any help
boombanguk

[MX] Particle Effects
Hi, I have actionscript 1.0 and 2.0 and I want to create free particle effects. I would really like to have fireworks shoot up and form into an image. I've seen it done before with AS 3.0. Any help would greatly be appreciated...

Particle Effects Help...
I need to make a particle effect like this one,
http://img111.imageshack.us/my.php?image=helpgs8.swf

I made it with out Actionscript. I want to make something like this with Actionscript. Also, I would like it to have many more particles and I need it to stop producing particles at a certian point.

The particles would have to have random starting locations in a specified area, and move to the center at random speeds.

I know...think, I should say, that this is a big favor to ask, but I would REALLY appreciate it if someone could help. I understand if not. XD

I have a VERY basic understanding of Actionscript. Here's a screen of the stage if it helps. Thanks in advance for any amount of help,
http://img111.imageshack.us/my.php?image=halpdq1.png

I'm using Flash 8 Pro.

Particle Effects/ AS
I have an AS which produces a particle effect. The code works fine with a single mc, but I'd like to add another mc. So, I duplicated the symbol, renamed it and added another code. The first one still works fine, but the second doesn't produce any results. Any ideas? Codes below:









Attach Code

Code 1
i = 0;
this.onEnterFrame = function() {
i++;
circle.duplicateMovieClip(_root.circle+i, i, {_alpha:100, _rotation:random(360)});

};




Code 2
j = 0;
this.onEnterFrame = function() {
j++;
circleb.duplicateMovieClip(_root.circleb+j,j,{_alpha:100, _rotation:random(360)});

};

Particle Effects?
How do you create a particle effect? Like if a guy was stabbed a blood particle effect would come out of the place where he was stabbed.

Particle Effects
some really cool particle effects.

Does anyone know where to find tutorials or flashcs3 examples of something like these:


http://lab.andre-michelle.com/bitmap-particles

http://lab.andre-michelle.com/bitmap-particles-2

thanks,
Aubrey

Emitter - Particle Effects API
.

Hey guys, I just finished this particle effects API.

It includes four basic types of emitters:
PointEmitter, LineEmitter, RectEmitter, and CircleEmitter.

and two types of gravity fields:
LineGravity and PointGravity.




Here's the complete development log of Emitter.
http://cjcat.blogspot.com/search/label/Emitter

You can also find the link to the API souce in the latest post.
Tutorials and documentations are still work in progress.
But you might as well take a look at the example source, it's easy.

Please tell me if you find any bug or have any suggestions, thanks.

Hope you like it~

.

Particle Effects On Symbols?
I saw a tutorial on YouTube on how to create a snazzy particle effect attached to the cursor:

http://www.youtube.com/watch?v=07LeoC1B3BY

Now I want to use a variation of this effect to create smoke coming out of a moving flame. So how do I attach the particle effect to a graphic symbol or movie clip so that it appears, say, every two or three frames wherever the flame is placed on screen?

(I've also PM'ed the author of the tutorial, but he hasn't gotten back to me.)

Problems With Particle Effects
Hi guys, im making a small application, within which, ive got a fire....

ive made the fire using the code below, and it looks pretty cool, but the only problem is, it slows down my application like mad....

i think its because im creating too many movieclips and although u cant see them once they get alpha'd away, they are still there?????

any help, as always, greatly appreciated!!

Rob

Code:

var xRange:Number = this.width;
var yRange:Number = this.height;
var particletimer:Timer = new Timer(0.2);
var alphaRate:Number = 0.05;
var scaleRate:Number = 0.03;
this.scaleX = 1;
this.scaleY = 1;


particletimer.addEventListener(TimerEvent.TIMER, createparticles);





function createparticles(event:TimerEvent):void
{
   
   var particle:fire_mc = new fire_mc();
   var particle5:fire2_mc = new fire2_mc();
   var particle6:fire3_mc = new fire3_mc();
   var particle2:yellowfire_mc = new yellowfire_mc();
   var particle3:redfire_mc = new redfire_mc();
   var particle4:fire_red_long = new fire_red_long();
   
   particle.x = Math.random()* xRange;
   particle.y = Math.random()* yRange;
   particle2.x = Math.random()* xRange;
   particle2.y = Math.random()* yRange;
   particle3.x = Math.random()* xRange;
   particle3.y = Math.random()* yRange;
   particle4.x = Math.random()* xRange;
   particle4.y = Math.random()* yRange;
   particle5.x = Math.random()* xRange;
   particle5.y = Math.random()* yRange;
   particle6.x = Math.random()* xRange;
   particle6.y = Math.random()* yRange;
   
   addChild (particle);
   addChild (particle2);
   addChild (particle3);
   addChild (particle4);
   addChild (particle5);
   addChild (particle6);
   particle.addEventListener(Event.ENTER_FRAME, animateparticle);
   particle2.addEventListener(Event.ENTER_FRAME, animateparticle);
   particle3.addEventListener(Event.ENTER_FRAME, animateparticle);
   particle4.addEventListener(Event.ENTER_FRAME, animateparticle);
   particle5.addEventListener(Event.ENTER_FRAME, animateparticle);
   particle6.addEventListener(Event.ENTER_FRAME, animateparticle);
}

function animateparticle (event:Event):void
{
   event.target.y -=9;
   event.target.alpha -= alphaRate;
   event.target.scaleX -= scaleRate;
   event.target.scaleY = event.target.scaleX;
   
   }
   particletimer.start();

Particle Effects : Physics & Maths
I want to know how to animate & give the realistic effects for the following :
1. Movement of raising smoke in air less region.
2.Ripples on a lake or a tub & in moving water.
3.Clouds deforming in shape while moving.
4.Rain drops and its change in angle of falling according to the wind movement.
5.Smoke in air.
6.Cotton or fether or leaves both in air and falling (wobbling) in a static air.
7.Change in a candle flame due to movement in air.
8.Relative movement of grass blades & tree leaves due to breeze.
9.Float on water & air.
10.Drop of a solid or liquid on a static or moving water surface.
11.changes in wrinkles in dresses of humans.
12.Effects like Glow, Shine, Glitter, twinkle, reflection,fire, flame, ect.

Please let me know the link or a book or an online book where I can find these all with their Physics & Mathematics.

Please do help me. I want to learn & do all these in Flash MX.
Thanx

Simple Particle/lightbeam Effects
I've searched all over for a tutorial on this sort of thing - I don't know their 'official' name so that's a bit of a problem. A lot of Flash menus and headers have small, translucent tech lines or waves that move across the image. Not very easy to explain so there's an example here.

I'm guessing that they're done with motion tweens, alpha translucency and masking but as a bit of beginner to Flash, I'm lost. Does anyone know how to create this kind of effect, as surely it'd be pretty simple?

Bitmap Data Particle Effects
Hi, I was looking at Keith Peters' blog and found a really neat little thing...

http://www.bit-101.com/blog/?p=1152 (there is a link below the picture to see the swf)

Anyways, I set out to try and make a similar effect on my own. It was all working very nicely until I brought my test value of 30 particles up to 500.
His has 1000 and is not at all lagging behind whichever framerate he used. Mine was severly bogged down with 500.

Upon closer inspection of the particles, I found that they were still being drawn as vectors, rather than single pixels. I have set cacheAsBitmap = true for each, and still it doesnt work.

Can anyone point me in the right direction?

Any help would be greatly appreciated,
Mavrisa

The Flash Anthology: Cool Effects & Practical ActionScript - Chapter 3: Animation Effects
This is an article discussion thread for discussing the SitePoint article, "The Flash Anthology: Cool Effects & Practical ActionScript - Chapter 3: Animation Effects"

The Flash Anthology: Cool Effects & Practical ActionScript - Chapter 5: Sound Effects
This is an article discussion thread for discussing the SitePoint article, "The Flash Anthology: Cool Effects & Practical ActionScript - Chapter 5: Sound Effects"

The Flash Anthology: Cool Effects & Practical ActionScript - Chapter 5: Sound Effects
This is an article discussion thread for discussing the SitePoint article, "The Flash Anthology: Cool Effects & Practical ActionScript - Chapter 5: Sound Effects"

Particle Help...
Hi,

Im new to Actionscript 3.0 and I dont know how to make the effect that the following website has. www.fullyillustrated.com this website has tiny lights which bombard the mouse cursor. If anyone know how to make both effects or has a tutorial about it please help me..

Particle Help
I'm trying to uses this tutorial
http://flashmymind.com/Tutorials/Act.../fireworks.php

I put the fireworks in frame 1, but i only want to use it in one frame. so when the swf goes to frame 2 and beyond the fireworks are still showing up. Now i tried to do a removeChild(firework) but I can't get it to work. Any suggestions?

Particle Accumulation
I have found various ways of producing a "snow-like" effect, but am stumped on figuring out a way to generate an effect of snow accumulating on objects. Thoughts anyone?

Particle System
Making... particle... system... hard...
i'm trying to make a sprinkler kind of PS, and compact it all in a neat function, but so far i'm having some major (and not so major problems):

1. in order to move the particles I need to use a -=,+= in an enterframe, right, well i tried mc.onEnterFrame and some more stuff, but nothing seems to work, and open sources I found mostly on gotoAndPlay, which does go with the whole compact function idea, how am I supposed to do this?
2. I want a new spray each time all the particles get removed, which means a need to count the amount of them, but instead of removing 1 from the count, when the first mc gets removed it gets keeps counting down, plus it doesn't spray again.
3. write now the movement is straight and sharp, I guess that to curve it the y should equel x*x, so I tried _y=this.x*this._x, and _y-=this.x*this._x
but everything I tried failed, so how should this be done?

please help... thankz in advance
(I use FMX2004 btw)

Particle System
Hello,
I'm trying to simulate some moths being attracted to a light, was wondering if any one has run across or knows of where to get info on such a thing. I know something like this might need to be scripted.
Thanks

Particle Effect - Possible?
Hi All,

Hoping that someone may be able to tell me if this effect is possible in flash?

If you download the attached file you will see a particle effect on the text as it moves to a keyline.

Is there any way of replicating this effect in flash or any third party softwarte that is compatible with flash?

I think it looks fantastic, does anyone have any ideas on how it can be done please?

D

Particle Effect?
Hi All,

Does anyone know how I can create a particle effect on type without having monstrous file sizes and processor times?

So the type looks as if it is breaking up and swarming away to create more text elsewhere? does that make sense?

I've the exact effect on http://www.renascent.nl/motion.htm in the movie titled progressive/retrograde the way the type breaks and becomes more text/shape.

Be grateful for any suggestions

D

Particle Affect
I need to know how to make a particle affect which looks like water or blood splash facing right.

Particle Movement... Down To Up?
Hey all...
I downloaded an example file here from flashkit in which snow falls. I was wondering how I might modify the below code to make the snow "rise" instead of "fall"? thanks!

onClipEvent (load) {
count = 0;
mystart = Math.round(Math.random()*100);
radius = Math.round(Math.random()*20);
thecenter = Math.round(Math.random()*20);
center = this._x-thecenter;
degrees = 0;
fall = 3+Math.round(Math.random()*3);
}
onClipEvent (enterFrame) {
if (count != mystart) {
count = count+1;
}
if (count == mystart) {
_root.snow._alpha = 100;
angle = degrees*(Math.PI/180);
degrees = degrees+fall;
xposition = radius*Math.cos(angle);
zposition = radius*Math.sin(angle);
this._x = xposition+center;
_y = _y+fall;
if (_y>=Stage.height) {
_y = -10;
}
if (_x>=Stage.width) {
_y = -10;
x = Math.round(Math.random()*Stage.width);
}
if (_x<=0) {
_y = -10;
x = Math.round(Math.random()*Stage.width);
}
}
}

Particle Trail
Hi,

I'm making an animation where I need to have a sparkly trail following an object. At first I was animating it, but I realised it would probably look and run better using actionscripted sparkles...

I've looked for various tutorials and found this one (attached) which looks pretty much the way I want my sparkles to look, but it trails the mouse.
Is it possible to change this script to make the sparkles follow a movie clip intance instead of the mouse position and still keep the nice trail effects?

Thanks in advance for any help you can offer!

Particle Troubles
Hi intelligent people, wonder if u can help with a few questions that i have, im using flash cs3:-

1) If i insert a new symbol into my library and call it symbol1 and link to it via actionscript with the following code:-

var anything:Sprite=new symbol1();

Does this make it a sprite even though in the properties of symbol1/base class it says "flash.display.MovieClip" or would i need to change symbol1/base class to "flash.display.Sprite"

2) The following code gives an error saying "
ReferenceError: Error #1056: Cannot create property custom on flash.display.Shape." this also returns the same error if u change the code from shape to sprite but if you was to link a sprite from the library it will not complain that you have added custom properties.

Can someone please,please throw light on this subject thank you very much in advance.

// smoke
private function smoke(xp:Number,yp:Number):void {
var shape:Shape=new Shape();
shape.graphics.beginFill(0x999999,0.2);
shape.graphics.drawCircle(0,0,(Math.random()*1)+0. 5);
shape.graphics.endFill();
shape.x=xp;
shape.y=yp;
shape.custom=1; // <<<<<<<<
smokecontainer.addChild(shape);
smokearray.unshift(shape);
}

Particle Animation
hello,

i',m trying to use the code below to move multiple dots across the stage at different speeds. the problem is flash seems to prevent each dynamic clip from executing the animation. dot1, dot2, dot... dot 20.

the clip is duplicated 20 times but they all appear moving in the same spot on the screen. they seem to ignor the ._x += code in effort to move each individual clip across the scree.

also, all code on one frame NOT two.

enterFrame = fmultidot();
function fmultidot(){
count=1;
while (count<20){
vpath = eval(this._target);
trace(vpath);
vpath.dot.duplicateMovieClip("dot"+count,count);
vpath["dot"+count]._rotation, _rotation +(Math.random())*20;

vpath["dot"+count]._x = Math.random()*500;

vpath["dot"+count]._y = Math.random()*100;
vpath["dot"+count]._xscale = Math.random()*100;
vpath["dot"+count]._yscale = Math.random()*100;
vpath["dot"+count]._alpha = Math.random()*100;
count+=1;
}
}

[CS3] AS3 Floating Particle Help
Ive searched and searched google and whoever and I need help,
I want to be able to create a floating particle effect that fades in and out using AS3. Having a simple in and out birth rate making it look cool.

If there is anybody out there can help with a script or link then please help.

It will bring kudos

thanks

Particle Wall
Good evening all!

I recently got a book from the local library entitled "Programming Macromedia Flash MX" by Robert Penner, and have been trying to replicate an example that he gave regarding a 3d vector "particle" wall. As I'm trying to learn AS 2.0, I did my best to convert his given script into working .as files. I've gotten most of it to work, however, as I move my cursor along the y-axis on the screen, the object shrinks in size. I've sat here for hours, trying to figure out what stupid lil' thing I've overlooked, but with no success. Could one of you fine fine souls :-) aid me in my education? It appears as though there's some error in the calculation of my "z" variable, or perhaps object scaling? Here's a link to the guilty swf:

http://tylerparkersounds.com/flash/wall.swf

In addition, here are the 3 .as files and the .fla:

http://tylerparkersounds.com/wall_files.rar

I warn you, however, the code form in these class definition files is god awful, and very minimal as, once again, I'm trying to learn the concepts and just threw up the bare bones to get the example working. :-)

For anyone kind enough to shed some light, I'd greatly appreciate your time and effort.

*bows humbly*

Particle Position
hi,i want to this flame in middle(not moving with Cursors).how can i change this script.is it possible?plz tell me how?

(see attached file)

Thank you.

AS3 Particle Emitter
Hey everyone,

I'm trying to create a particle/sprite emitter in AS3. I started out basic to make something to make 50 copies of a pre-defined movieclip (In this case FireParticle) but I'm not sure what is going wrong with my code.

Flash does not report back any errors at all when I run the code, however I also cannot see anything in the screen when I run it. Both the .fla and the .as have the filename EmitterTest. Please help!


ActionScript Code:
package {
    import flash.display.MovieClip;
   
    public class EmitterTest extends MovieClip {
        public function fire() {
            var firearray:Array = new Array();
            var Particle_Holder:MovieClip = new MovieClip;
            addChild(Particle_Holder);
            var i:int;
            for (i=0;i<50;i++); {
                firearray.push (new FireParticle());
                Particle_Holder.addChild(firearray[i]);
                Particle_Holder.y = 350;
                Particle_Holder.x = Math.floor(Math.random()*60+(stage.stageWidth/2-30));
            }
        }
    }
}

Thanks in advance,


BloodBowler

Particle Tornado
I read the tutorial for the Simple Particle Effect. Does anyone no how to create a particle tornado?

Particle Efffects?
Does anyone know how to create a nice particle effect or a fire effect?

Particle Systems
If anyone would please post everything they can about particles and particle systems, including tutorials, source files, links, movies, comments, help, and code, it would be greatly appreciated. I am trying to learn about particles and particle systems, but I can't fin anything that meets my needs. Please post whatever you can!

Particle Volcano
I was just messing around with physics and I came up with this...

If you make anything cool from it let me know!

Particle Experiment
Just my first attempt on doing something related to physics. Really learned a lot here with all you guys.

Hope you like it, or maybe even find it useful.

Thanks.

My Particle System
hey,
I have been working on a particle class to improve my skills at actionscript. I have alot in my mind on what it will do but so far i have kinda the basics and yesterday I got the colors to work also. And decided to try to make a fire effect with it. Using 2 particle objects here what i came up with.
http://img497.imageshack.us/my.php?i...cletest4gn.swf

I also made a snow effect with it which ill upload later and show yall.
And thanks everyone who helped me solve my actionscript problems such as color blending and stuff.

Other features i am working on is making deflector objects, making so u can set bounderies, make other objects attract it like force and gravity. And also so you can apply any filter effect you want to the particles which i am guessing is going to make it lag.

My Particle Experiments
Hey guys, ive been playing with particle effects lately, here what ive been able to come up with, what do you think?

None of them are fully finished yet, just play arounds, but yeh



EDIT:: the earlier posted train one was wrong, heres the right one
http://www.kirupa.com/forum/attachme...6&d=1136124317

Particle Trouble
I'm trying to create some simple particle effects here. When the animation in the particle has finished in each particle would like to remove it or replace with new ones. Maybe I need to add actionscript to the end of the timeline (of the particle)?

Not sure what script would be. something like _root.function particles(remove). I don't know , that was probably a bad guess and extremely sloppy syntax.

var i:Number = 1;
setInterval(particles, 120);

function particles() {
if (i < 50) {
var myClip:MovieClip = mytarget.attachMovie("anim", "anim"+ i, i);
myClip._x = random(mytarget._width - myClip._width);
myClip._y = random(mytarget._height - myClip._height);
i++;
//myClip.blendMode = invert;
setInterval(particles);
}
else if (i > 0) {
i--;
yourMessage.removeMovieClip();

}
};

3D Particle Links
http://www.gadgetflash.net/site.swf

Well... yeah I thought it was cool. My new navigation style for my website. FLA is attached.

Particle Effect In AS3 ?
Attached is the .fla for an old school AS1 particle effect.

It uses duplicateMovie and removeMovieClip to create the particle.

I am a complete newb and cannot figure out how to update this effect.

I know to use addChild and removeChild, but I could not figure out how to get an event listener to removeChild at the end of the guided tween, if that makes sense??

Please Help!

Thanx

Using Bit101 Particle
I'm using Bit 101 particle to simulate a woodpecker chipping away at stuff.

(here the link to the particle class - http://www.bit-101.com/Particles/)

Here is the flash file: http://www.jamesrhodes.co.uk/example.fla

If you hover over the menu the bird appears. There is a movieclip that is attached to the cursor on the main stage.

Basically the action of attaching the particles slows the animation of the bird pecking too much. If I disable the particles it speeds back up.

Is there a way to speed up the pecking and have the chips appearing at the same time.

Any help much appreciated. Thank you.

Particle Generator
hello,

i was wondering if someone could help my change this script http://www.levitated.net/daily/levPixieParticles.html for flash player 9.

i want to generate particles on mouse press if anyone has an alternate script it would be appreciated. i keep getting compile errors!

thanks,
euan

Particle Lifespan
This is driving me nuts:
(im new to actionscript btw)
I have created the particle emitter below, but the particles last forever.
How can I remove each particle after it has existed a certain amount of time? (eg. 3secs)


Code:
var particleArray:Array = new Array();
var maxParticles:Number = 10;

for (var i:int = 0;i < 20;i++) {
addParticle();
}

function addParticle() {
var dot:Particle = new Particle();
dot.x = hero.mc.x;
dot.y = hero.mc.y-15;
dot.alpha = Math.random() * .8 + .2;
dot.scaleX = dot.scaleY = Math.random() * .8 + .2;
var xMovement:Number = Math.random() * 8 - 4;
var yMovement:Number = Math.random() * 8 - 4;
particleArray.push(dot);
gamelevel.addChild(dot);

if (particleArray.length >= maxParticles) {
gamelevel.removeChild(particleArray.shift());
}

dot.addEventListener(Event.ENTER_FRAME,moveParticle);

function moveParticle()
{
dot.x += xMovement;
dot.y += yMovement;
}



}
Cheers

Particle Efffects?
Does anyone know how to create a nice particle effect or a fire effect?

Particle Systems
If anyone would please post everything they can about particles and particle systems, including tutorials, source files, links, movies, comments, help, and code, it would be greatly appreciated. I am trying to learn about particles and particle systems, but I can't fin anything that meets my needs. Please post whatever you can!

Particle Volcano
I was just messing around with physics and I came up with this...

If you make anything cool from it let me know!

Particle System
Hello,
I'm trying to simulate some moths being attracted to a light, was wondering if any one has run across or knows of where to get info on such a thing. I know something like this might need to be scripted.
Thanks

Particle System
Salutations US,

I've been seeking a potential particle system solution that works Flash 6/7. I've come across a few ideas (mostly in Flash 8) that don't quite work for me.

An example of what i'm looking to do can be found here (note the rocket engine's flames) http://www.klipmart.com/zathura.html

The potential solutions i've found so far, unfortunately require Flash 8 so i can't really use them, are here :
http://www.chrisbenjaminsen.com/view...8%20beta,1.swf
http://www.gotoandplay.it/_articles/...icleSystem.php

Any input or general direction is much appreciated.

Copyright © 2005-08 www.BigResource.com, All rights reserved