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




Can Ne1 Tell Me How To Make A Particle System



for some reason i just wanted to make a particle system for some blood so i hav no clue where to start can any1 help me?



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 07-18-2005, 07:38 PM


View Complete Forum Thread with Replies

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

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

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.

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.

Duplicating Mc's In Particle System
I've got some code here that creates a simple "particle system" using a small movie clip. i've been trying unsuccessfully to duplicate the movie clip and the actions on it so that i can create a full sprinkler effect (multiple cascading mc's to look like a fire sprinkler)...

i'm not sure if I can even have two clips with slightly different code like this. take a look at my .fla if you have time.

Any suggestions? I guess i thought i could just duplicate the mc and make it a new symbol with the same AS and give it a different starting point to fill in my effect...

@#$#@)%@#@ - thanks for any help!

[9:AS3] Simple Particle System
I've been playing with AS3 a little in Flash 9. Previously, I had learnt some AS3 in Flex 2 and wondered what differences I might find coding AS3 in Flash over AS2 in Flash.

To start, I decided that I did want to use the Document class to build my experiment on (a good choice, I feel.)

What I wanted to achieve was a simple particle system that will render a certian number (30, I think) "particles" in a circle (uniformly - they don't all crowd around the centre) and draw lines between them representative of their distance (the usual stuff.)

View Here
Click your mouse to redraw. The circle is drawn to fit within the movie's dimensions - if you resize your browser, the particles will be drawn closer together within the circle on the same scale and you can see the difference in their connecting lines.

The FLA is an empty document other than the fact that it has it's document class set to `ParticleSystem`. In the same directory as this FLA are two class files: `ParticleSystem.as` and `Particle.as`. The code for each follows:

ParticleSystem.as

ActionScript Code:
package {    import Particle;    import flash.events.Event;    import flash.events.MouseEvent;    import flash.display.Sprite;    import flash.display.MovieClip;    import flash.display.Stage;    import flash.display.StageAlign;    import flash.display.StageScaleMode;    public class ParticleSpace extends MovieClip {                // Configuration Variables        var num_particles:Number = 30;  // The number of particles to create on each draw        var distance:Number = 100;    // The maximum distance for connected particles                // Variables        var particles:Array = [];        var radius:Number;        var center_x:Number;        var center_y:Number;                /**         * Constructor         * Initialises the drawing and sets a listener to redraw on every mouse click         */        public function ParticleSpace() {            stage.align = StageAlign.TOP_LEFT;            stage.scaleMode = StageScaleMode.NO_SCALE;            stage.addEventListener(MouseEvent.CLICK, this.click);                        this.draw();        }                /**         * Redraw on clicks         * @param   event  <MouseEvent> The event         */        function click(event:MouseEvent):void {            this.draw();        }                /**         * Calculates the dimensions for drawing and calls the worker functions         */        function draw():void {            // Prepare the stage (empty it)            this.clear();            // Calculate the dimensions            radius = Math.min(stage.stageHeight, stage.stageWidth) / 2;            center_x = stage.stageWidth / 2;            center_y = stage.stageHeight / 2;            // Representation of limitations            this.graphics.lineStyle(2, 0xFF0000, 1);            this.graphics.drawCircle(center_x, center_y, radius);            // Worker functions            this.drawParticles(num_particles, radius, center_x, center_y);            this.drawConnections(distance);        }                /**         * Creates the particles on the stage         * @param   n      <Number> The number of particles to create         * @param   radius  <Number> The radius of the circle within which to distribute the particles         * @param   center_x   <Number> The centre of the circle on the horizontal axis         * @param   center_y   <Number> The centre of the circle of the vertical axis         */        function drawParticles(n:Number, radius:Number, center_x:Number, center_y:Number):void {            var i:Number;            // Create n particles            for (i = 0; i < n; i++) {                var particle:Particle = new Particle(this);                particles.push(particle);                // Disribute uniformly throughout the circle                var r:Number = Math.sqrt(Math.random()) * radius;                var a:Number = (Math.random() * 2 - 1) * Math.PI;                particle.x = Math.sin(a) * r + center_x;                particle.y = Math.cos(a) * r + center_y;            }        }                /**         * Draws connecting lines between close-enough particles         * @param   dist   <Number> The maximum distance between particles for them to be connected         */        function drawConnections(dist:Number):void {            var i:Number;            var j:Number;            // This method requires less recursion through less use of the Math.sqrt function            var distance_sq:Number = distance * distance;            // Loop through each PAIR of particles            for (i = 0; i < particles.length - 1; i++) {                var particle_a:Particle = particles[i];                for (j = i + 1; j < particles.length; j++) {                    var particle_b:Particle = particles[j];                    // Calculate the square of their distance apart                    var dx:Number = particle_a.x - particle_b.x;                    var dy:Number = particle_a.y - particle_b.y;                    var d:Number = dx * dx + dy * dy;                    if (d < distance_sq) {                        // Draw a line if they're close enough                        var alpha:Number = (distance - Math.sqrt(d)) / distance;                        this.graphics.lineStyle(1, 0, alpha);                        this.graphics.moveTo(particle_a.x, particle_a.y);                        this.graphics.lineTo(particle_b.x, particle_b.y);                    }                }            }        }                /**         * Empties the stage of all particles and graphics         */        function clear():void {            for (var i:Number = 0; i < particles.length; i++) {                particles[i].parent.removeChild(particles[i]);            }            particles = [];            this.graphics.clear();        }            }}


Particle.as

ActionScript Code:
package {    import flash.display.Sprite;    class Particle extends Sprite {                public function Particle(parent:Sprite) {            // Draw the particle            this.graphics.beginFill(0x0000FF);            this.graphics.drawCircle(0, 0, 3);            this.graphics.endFill();            // Add the particle to the particle space            parent.addChild(this);        }       }}


Q: Does anybody know if simple files like this perform better when published from flex as an actionscript project than from flash?

Thanks

Particle System - Fireworks
Hi - I'm trying to create a fireworks background using as3. I had found one tutorial that looks great, but uses as2 and i'm having trouble converting it to as3. i've done all of the lynda.com tutorials on particle systems, but still can't quite figure out how to get the firework working correctly.

here's the as2 fireworks that i like: http://www.wipeout44.com/tutorials/flash_fireworks.asp

The as2 code used is:

var numOfParticles:unit = 25;
var particles_ary:Array = [];

function updateStage(event:Event):void
{
if(particles_ary.length < numOfParticles)
{
var bluebit:Bluebit = new Bluebit();
addChild(bluebit);
bluebit.rotation = Math.random() * 360;
bluebit.alpha = Math.random(30) + 80;
bluebit.scaleX = 50 + Math.random(60);
bluebit.scaleY = 50 + Math.random(60);
gotoAndPlay(random(5));
}
}

Can anyone direct me to a tutorial that would help me figure out how to update this as2 to as3?

Thanks!

Particle System Blues
Hi,
I read somewhere that there was a method to extend the amount of processor power the flash plugin has access to. I can't remember where I saw this, but I really need to get an extra boost for a game I'm developing. It uses a few particle systems which are processor intensive an make game play a bit jerky. Either I try to port it to shockwave (aargh Lingo) or try to squeeze a bit extra out of flash...
Alternatively if there's a cunning particle system method to reduce processor load I'd be interested to hear about it.

cheers.

*solved* Particle System
got it figured out. sorry.

Nexus: A Simple Particle System
I love experimenting with particle systems! Thought I would share this one, anyone else into this type of stuff?

Its called "nexus", the green circle in the center is known in my script as nexus0. Forty more "nexi" are spawned by some _root level actionscript. Each nexus is attracted directly toward the nexus that was spawned before. The first nexus spawned is attracted to the main nexus (the larger green one). Play around with dragging the green nexus around its like cosmic strings (or something).

Also download the flash file, you can crank up the frame rate, increase the number of nexi, alter the speed that they travel at, etc etc

p.s. is nexi a word LOL

http://www.rdgrp.com/nexus.html

http://www.rdgrp.com/nexus.fla

Flocks Of Birds (particle System)
i was reading Craig Reynold's information on flocks of birds as well as some other peoples comments on this issue and decided that i wanted to design a particle system that mimics the flight of birds.

has anyone done this before and would like to help me get started or offer some advice? if so, please reply to this or email me at danricciotti@comcast.net

thanks

Test My Particle System Smoke
HI. I just created a particle based smoke in Flash. I had always theorized it was possible to get the same quality real-time smoke as you do in 3D video games... All it takes is the right texture and proper tweaks on the particle speed, dispersal, etc.

So here's what I whipped up (note I'm not one of those whiz-bang Actionscript gods, so this isn't optimized at all):

http://www.sporeproductions.com/wip/smoke_02.html

I'd like to know what kind of frame-rates you're getting and what your computer speed is.

The movie is set to 30 fps, but I get a consistent 25 fps. My computer is a 2 ghz AMD 2400+, and I'm running IE 6, Flash Player 6.

You?

*UPDATED Sept 9* The movie's been optimized somewhat and the Frame Rate set to 60 fps...

Class Actionscript For A Particle System?
Hi,

I need to create a simple sort of comet effect with star shapes falling off the back of a larger star shape. I'd like to use this as an opportunity to get my head around OOP programming rather than procedural solutions...

I'd REALLY love for someone to point me in the direction of a tutorial to step through this process of setting up a class file and defining parameters of an object and also how to access the class via the fla.

Ideally this would be able to be used for future particle requirements...

Any pointers / info would be great!

Thanks,

ss

How To Create A Simple Particle System
Hi,

I am having a hard time understanding particle systems.

Does anybody know about a tutorial where I can see how to create a small and simple particle system?

I would like to see something pretty simple.

Thanks,
fs_tigre

Dupin A Particle System Mc - Yoinks
i've got this really simple particle system... what i can't figure out is how to duplicate it and still have it work. if you take a look at my .fla, you'll see that I have attempted to dupe the mc and particle system by duping the mc and having the same AS on it. I also duped the original code on the 2nd frame which multiplies the mc's to create more particles...

maybe somebody can tell me what's going wrong here. i'm trying to achieve a sprinkler head effect so i need to dupe this effect to fill in what a real fire sprinkler would do...

any help is greatly appreciated... i'm still kind of new at controlling mc's in this fashion!

[9:AS3] Particle System W/ Movement & Rebounding
This is an expansion on the particle system I posted a few hours ago. I wanted to add movement to the particles within the circle and have them reflect off of the boundary as you would expect them to (see the bad-*** `while` loop in the `move` method.)

Check it out
If you resize your browser and refresh, the circular boundary will redraw to a slightly different size - makes for a different effect.

As before the FLA contains no source-code - simply the document class definition. The other 2 files are the ParticleSystem.as and Particle.as files.

ParticleSystem.as

ActionScript Code:
package {    import Particle;    import flash.events.Event;    import flash.events.MouseEvent;    import flash.display.Sprite;    import flash.display.MovieClip;    import flash.display.Stage;    import flash.display.StageAlign;    import flash.display.StageScaleMode;    public class ParticleSpace extends MovieClip {                // Configuration Variables        var num_particles:Number = 20;  // The number of particles to create on each draw        var distance:Number = 100;    // The maximum distance for connected particles                var vx_max:Number = 3;      // The maximum horizontal velocity        var vx_min:Number = -3;  // The minimum horizontal velocity        var vy_max:Number = 3;      // The maximum veritcal velocity        var vy_min:Number = -3;  // The minimum vertical velocity                // Variables        var particles:Array = [];        var radius:Number;        var connections:Sprite;        var circle:Sprite;                /**         * Constructor         * Initialises the drawing and sets a listener to redraw on every mouse click         */        public function ParticleSpace() {            // Prepare            stage.align = StageAlign.TOP_LEFT;            stage.scaleMode = StageScaleMode.NO_SCALE;            // Begin            this.draw();        }                /**         * Event handler         * @param   event  <Event> The event         */        function enter_frame(event:Event):void {            this.move();            this.drawConnections(distance);        }                /**         * Move the balls around with their constraints         */        function move():void {            var i:Number = 0;            var radius_sq:Number = radius * radius;                        for (i = 0; i < particles.length; i++) {                var particle:Particle = particles[i];                                // Target destination                var tx:Number = particle.x + particle.vx;                var ty:Number = particle.y + particle.vy;                                // Watch for those borders ...                while (tx * tx + ty * ty >= radius_sq) {                    // Reference: <a href="http://mathworld.wolfram.com/Circle-LineIntersection.html" target="_blank">http://mathworld.wolfram.com/Circle-...ersection.html</a>                    // Point 1: (ox, oy)                    // Point 2: (tx, ty)                                        var ox:Number = particle.x;                    var oy:Number = particle.y;                    var dx:Number = tx - ox;                    var dy:Number = ty - oy;                    var d:Number = dx * dx + dy * dy;                    var D:Number = ox * ty - tx * oy;                    var disc:Number = radius_sq * d - D * D;                                        if (disc >= 0) {                        disc = Math.sqrt(disc);                                                // Work out which intersection point to use (still works when there's only 1)                        var ix:Number = (D * dy + sign(dy) * dx * disc) / d;                        var iy:Number;                        if (sign(ix - ox) != sign(tx - ox)) {                            ix = (D * dy - sign(dy) * dx * disc) / d;                            iy = ( -D * dx - Math.abs(dy) * disc) / d;                        } else {                            iy = ( -D * dx + Math.abs(dy) * disc) / d;                        }                                                // Calculate the angle to bounce away from the intersection at                        var a:Number = 2 * Math.atan2( -iy, -ix) - Math.atan2( -dy, -dx);                        var ca:Number = Math.cos(a);                        var sa:Number = Math.sin(a);                                                dx = tx - ix;                        dy = ty - iy;                        d = Math.sqrt(dx * dx + dy * dy);                        tx = ix + d * ca;                        ty = iy + d * sa;                                                var v:Number = particle.v;                        particle.vx = v * ca;                        particle.vy = v * sa;                    }                }                // Reposition the particle to the newly calculated position                particle.x = tx;                particle.y = ty;            }        }                /**         * Returns the sign of n         * @param   n         */        function sign(n:Number) {            if (n < 0) return -1;            return 1;        }                /**         * Calculates the dimensions for drawing and calls the worker functions         * Begins the cycles         */        function draw():void {            // Calculate the dimensions            radius = Math.min(stage.stageHeight, stage.stageWidth) / 2;            this.x = stage.stageWidth / 2;            this.y = stage.stageHeight / 2;            // Representation of limitations            this.addChild(this.circle = new Sprite());            this.circle.graphics.lineStyle(5, 0x333333, 1);            this.circle.graphics.drawCircle(0, 0, radius);            // Prepare            this.addChild(this.connections = new Sprite());            this.drawParticles(num_particles, radius);            // Continue            this.addEventListener(Event.ENTER_FRAME, this.enter_frame);        }                /**         * Creates the particles on the stage         * @param   n      <Number> The number of particles to create         * @param   radius  <Number> The radius of the circle within which to distribute the particles         * @param   center_x   <Number> The centre of the circle on the horizontal axis         * @param   center_y   <Number> The centre of the circle of the vertical axis         */        function drawParticles(n:Number, radius:Number):void {            var i:Number;            // Create n particles            for (i = 0; i < n; i++) {                var particle:Particle = new Particle(this);                particles.push(particle);                // Disribute uniformly throughout the circle                var r:Number = Math.sqrt(Math.random()) * radius;                var a:Number = (Math.random() * 2 - 1) * Math.PI;                particle.x = Math.sin(a) * r;                particle.y = Math.cos(a) * r;                // Define a random velocity                particle.vx = Math.random() * (vx_max - vx_min) + vx_min;                particle.vy = Math.random() * (vy_max - vy_min) + vy_min;            }        }                /**         * Draws connecting lines between close-enough particles         * @param   dist   <Number> The maximum distance between particles for them to be connected         */        function drawConnections(dist:Number):void {            var i:Number;            var j:Number;            // This method requires less recursion through less use of the Math.sqrt function            this.connections.graphics.clear();            var distance_sq:Number = distance * distance;            // Loop through each PAIR of particles            for (i = 0; i < particles.length - 1; i++) {                var particle_a:Particle = particles[i];                for (j = i + 1; j < particles.length; j++) {                    var particle_b:Particle = particles[j];                    // Calculate the square of their distance apart                    var dx:Number = particle_a.x - particle_b.x;                    var dy:Number = particle_a.y - particle_b.y;                    var d:Number = dx * dx + dy * dy;                    if (d < distance_sq) {                        // Draw a line if they're close enough                        var alpha:Number = (distance - Math.sqrt(d)) / distance;                        this.connections.graphics.lineStyle(1, 0xFFFFFF, alpha);                        this.connections.graphics.moveTo(particle_a.x, particle_a.y);                        this.connections.graphics.lineTo(particle_b.x, particle_b.y);                    }                }            }        }                /**         * Empties the stage of all particles and graphics         * Pretty much redundant         */        function clear():void {            for (var i:Number = 0; i < particles.length; i++) {                particles[i].parent.removeChild(particles[i]);            }            this.particles = [];            this.connections.graphics.clear();        }            }}


Particle.as

ActionScript Code:
package {    import flash.display.Sprite;    class Particle extends Sprite {        // Variables        var v:Number;        var _vx:Number;        var _vy:Number;                public function Particle(parent:Sprite) {            // Draw the particle            this.graphics.beginFill(0xFFFFFF);            this.graphics.drawCircle(0, 0, 3);            this.graphics.endFill();            // Add the particle to the particle space            parent.addChild(this);        }                public function get vx():Number {            return this._vx;        }                public function set vx(n:Number):void {            this._vx = n;            this.v = Math.sqrt(this.vx * this.vx + this.vy * this.vy);        }                public function get vy():Number {            return this._vy;        }                public function set vy(n:Number):void {            this._vy = n;            this.v = Math.sqrt(this.vx * this.vx + this.vy * this.vy);        }    }}


Critiques of course welcome.
Thanks

Dupin A Particle System Mc - Yoinks
i've got this really simple particle system... what i can't figure out is how to duplicate it and still have it work. if you take a look at my .fla, you'll see that I have attempted to dupe the mc and particle system by duping the mc and having the same AS on it. I also duped the original code on the 2nd frame which multiplies the mc's to create more particles...

maybe somebody can tell me what's going wrong here. i'm trying to achieve a sprinkler head effect so i need to dupe this effect to fill in what a real fire sprinkler would do...

any help is greatly appreciated... i'm still kind of new at controlling mc's in this fashion!

How To Move A Particle System With Arrow Keys?
I have a little "ice fountain" particle effect and I want to be able to move it like an object. How do I use actionscript to effect a group particle system? (or have collision detection features for that matter)


Code:
--------------------------------------------------------------------------
this.createEmptyMovieClip("holder2_mc", this.getNextHighestDepth());
for(i=0;i<50;i++) {
var k:MovieClip = holder2_mc.attachMovie("ice","ice"+i ,holder2_mc.getNextHighestDepth());
k._y = 350;
k._xscale = Math.random()* 55 + 35;
k._yscale = Math.random()* 55 + 35;
k._x = Stage.width/2 -150;
k._rotation += Math.random()* 90 -45;
k.gotoAndPlay(Math.ceil(Math.random()*16));

}

[Flint] Particle System Spectrum Analysis
Has anyone had any experience with Flint particle system? I'm basically trying to get it to output each particle in a certain point (x,y coord) and then getting it to move a certain way.

Another possible way is to use lineTo to draw a line, take a bitmap of that and then draw particles based on that...but that might be really slow.

Anyone have any suggestions?

How Can I Make A Navigation System Like This
I like the look of this spinning almost 3d like navigation system but I'm not sure where to start building it. Does anyone know of any tutorials out there that could help me please. I've had a look but I'm not really sure what to be looking for!!!

http://www.pepsi.com/home.php

Is It Possible To Make A 4-direction System?
I know how to make a 8-direction,but is it possible to make 4-direction?(up,down,left,right),is so how?

I Want To Make A Morphing Star System, Need Some Help/advice.
Good day.


START

Im a flash n00b, but I know my way arround C++.

I want to make a dynamic star system, that can morph from their original random position (or a transition/morphed state), into chars, forming words.
Can I do this with ActionScript?

To do this I would need,
1. To show / hide star objects on a per frame basis.
2. To move star objects (x, y) on a per frame basis.
3. Have a class with a star array.


QUESTIONS

a) Can you make functions with ActionScript?
b) Can you make classes with ActionScript?
c) Can you make structs with ActionScript?
d) Can you make arrays with ActionScript?
e) Can you copy a object into a array with ActionScript?
f) Can you move a object (x, y) with ActionScript?


IMPLEMENTATION

This is aproximently how I want it to work:

#DEFINE MAX_STARS 500 // Max stars available

struct My_stars {
int id; //auto increment's the stars id number
int mypos_originalX, mypos_originalY;
int mypos_currentX, mypos_currentY;
int mypos_goingFromX, mypos_goingFromY;
int mypos_goingToX, mypos_goingToY;
int current_frame;
};

class StarScript {
public:
void random(int, int, int, int);
void text(string, int, int, int, int, int);
void update(void);
void original(int);

private:
void show(int, int, int); // id, x, y
void hide(int);
My_stars mystars[MAX_STARS]; // star array
string star_text; // holder for the morphed text
};

StarScript stars;

// Creates 50 stars within a x1, y2 .. x2, y2 box
stars.random(50, 3, 3, 40, 40); // number of stars, x1, y1, x2, y2

// Morphes the original stars to chars within a given number of frames
stars.text("f00", 15, 3, 3, 20, 20); // Text to be displayed, number of frames the morphing will take, x1, y1, x2, y2

// Returns the stars to their original position
stars.original(15); // Number of frames the morphing will take

---

(ex: 1 char = 20 stars.)
Let's say I want to write the word "hello" and I only have 50 stars visible.
StarScript::update would then spawn 50 more stars from the StarScript::mystars array.
(5 chars * 20 = 100, 100 - 50(<--MAX_STARS) = 50)

END

Any answers to my questions, tips or ideas? :-)

Thanks,
Nicolai Linde
Norway

I Need To Make Mailing System & Guest Book In My Website Please Help Me
Hello!!! I want to make mailing system & guest book in my website. Please tell me how can I make it. Let me explain to you what I need. When visitor will click on contact button in my website it will give him or her a window where they will write their Name in a text box , where they will write their e-mail address in a text box , where they will write their message in a text box. Finally when they will click on send button it will send their message to my e-mail address. Then I want to make a guest book where users will write their comment & when they will click on submit button it will be saved in a page. Anybody there to explain to me about with source code please? Please please please help me please.

Simple Scoring System & How To Make A Scene Into A Movie And Autoplay
Hi
Probably simple, but;
1) how do I make a simple scoring system to count the score from each frame or to add the final score to a text file?
2) Make a scene into an autoplay movie, so that each frame you step through plays its own movie?

kiss (keep it simple simon)

Thanks

Flash.system.System.totalMemory Different Than Windows Mem Display
Anyone know why flash.system.System.totalMemory is much different than what I see FlashPlayer taking up in the Windows Task Manager?

I would expect to see some overhead, but the differences I'm seeing are quite large (i.e. 80MB vs 150MB).

Thanks

What Does System.capabilities.language Return On Your System?
I am working on a multi-lingual web site that automatically detects the user's OS or browser language by using System.capabilities.language .

Since I am running a german OS/browser, this returns 'de' in my case, but I wonder what it returns on other systems (english, french, spanish etc.)

To find this out, please copy and paste this code into a Flash doc and see what it says:

trace( System.capabilities.language );

Thx!

Mike

System.pause(); And System.resume();
I've been looking for a simple way to pause everything inside the flash player when a user clicks on a pause button. I found what I thought to be a solution by running System.pause() method. This sounds funny but the problem is that this method does exactly what it's supposed to do, meaning it pauses EVERYTHING.

There is another System method call resume(). But with the entire player pause, how is one supposed to call this method when the pause button is clicked a second time?

This is what I thought about using:


ActionScript Code:
public function pauseSystem(evt:MouseEvent):void {
            if(!sytemPaused){
                sytemPaused = true;
                System.pause();
            } else {
                sytemPaused = false;
                System.resume();
            }
        }

But once the pause() method runs, nothing is clickable. I've got tons of event listeners and things happen all at once, so I'd rather not have to go through removing and adding event listeners every time the user clicks a pause button. Any ideas? Thanks.

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 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

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!

[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

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

[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 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 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 Efffects?
Does anyone know how to create a nice particle effect or a fire effect?

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