ActionScript 3.0 :: Create A Particle System For A Game?
Apr 12, 2010
i am trying to create a particle system for a game i am creating in class, though it seems that the particles are not being added to the stage. my instructor and i have checked all the obvious things and now were stumped?
particle class:
Code:
package {
import flash.display.MovieClip;
public class Particle extends MovieClip {
var xspeed:Number;
[code]....
the particle movie clip is simply a 5x5 rectangle, with the class name redParticle and the base class is Particle. [URL]
View 1 Replies
Similar Posts:
Dec 29, 2010
Is it possible to make this a mask? The system contains one movieclip of a circle called ball, also a class called ball and a class called particle. I want the particle system movieclips to display an image...I'm sure this is possible...just have not been able to find a way. A little backround, I'm a completely selftaught n00b when it comes to AS3, but I'm grasping it fairly well... the tutorial is on this website, called A Simple Particle System Using Actionscript 3.
View 0 Replies
Jan 12, 2010
I have a particle generator class and I want to create a hitTestObject function on another object to check for any collisions with the particles produced.I bascially have a character already on the stage called character_mc and I want to be able to collect the particles, that means when the character touches a particle, the particle disappears.
View 1 Replies
Aug 20, 2009
I am new to actionscript but I am fairly confident in messing around with it. I have been trying to make a particle engine for two days now and I'm at my wits end.
What's funny is, the particle engine works fine. i have piggy backed off of somebody elses particle engine and modified things to how i need them (And stripped it of a few unnessicary things..) what my problem consists of, is I am trying to make the particles go behind another movie clip. this movie clip is a frame (to make it blend in with the webpage it is displayed on) and it must always stay on top depth no matter what to give that affect.
[Code]...
View 4 Replies
Apr 17, 2009
I've got a bunch of modules called "c4" labled red1,red2,red3, etc. And a laser made from particles, with angle controlledby bckspace and enter keys:
onEnterFrame = function(){
for (m=1;m<4;m++){c4 = this["red"+m];
if(robot_mc.laser_mc.lasereye_mc.hitTest(c4.cap)){c4.gotoAndPlay("fram e2"); }
[code]....
The problem I run into is having the collision work with the beam, as opposed to the bounding box that begins with thelasereye_mc. Is there a way to get the c4 to react with the beam, instead of the bounding box around the beam? Or a way to get the photons to interact individually? Also, is there a way to load a particle system through an onEnterFrame without it overloading/oversaturting ?
View 6 Replies
May 5, 2009
I've written a game with a particle system, as the particles go off the stage, they are removed. At the end of the game I want to remove all the particles which are still on the stage. How can I do this?
My first thought is to put all the particles in a container and then remove the container at the end of the game. However, if I put the particles in a container, I can't reference them anymore with event.target
View 2 Replies
Oct 4, 2004
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 moreparticles...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.
View 8 Replies
Dec 30, 2010
I'm a self proclaimed n00b when it comes to as3, but I'm learning rapidly.I followed this guide and created a great particle system: url...What I'd LIKE to do, if possible, is make those particles that are generated be the only part of an image that shows(mask). The tutorial contains a fla with a movieclip of a circle, two classes...particle and ball which call the movieclip and generate it on the stage.
View 1 Replies
Mar 8, 2011
I got the AS code for a really cool particle fountain and modded it to use it for the animation of a popcorn machine. It turned out really great. The only thing I didn't care for was that the particles were balls. It worked fine on a small graphic but now i want to make a larger scale version and wanted to make the sprites actual pieces of popcorn.Here's the code I'm using so far:
Define the gravity.
This determines how fast the balls are pulled down.
*/
var gravity:Number = 0.2;[code].....
View 2 Replies
Oct 4, 2004
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...
[Code]...
View 8 Replies
Jan 26, 2011
I've made a particle system snow globe and right now I have snow blowing across the stage, but I want to have the snow blow around only within the snow globe which is placed in the middle of the stage. I made a movie clip (area_mc) that I want to use as the boundary for where the particles can float.
View 0 Replies
Feb 16, 2009
I have these particle system files, it actually does what I want. It makes circles come from a center point and have them expand out of the screen. However I have a couple of questions regarding those files, I wanted to add and change a couple of things:
- I would like that the circles come out in different colors, red, green and blue in randomized order.
- I would like to add a "fade out" option. Instead of having them grow out of the screen, have the option to have a defined circle size and when the circle reaches that size it fades out. Or something easier that works just the same, basically have it fade out.
- Have the circles blurred a bit. Possibly have the chance to control that too.
Then I would like to add some interactivity to the system. Basically have the circles move away from the mouse when the mouse rolls over or near that/those circle(s). Is that easy?
View 1 Replies
Aug 20, 2009
im trying to create a particlesystem where each particle moves by himself depending on which behavior has been assigned to him. But.. its slower than my grandma at the moment One thing I would like to keep though is the ability to change the behavior of the particle later on. Just have 2 classes (Particle & FlyAroundStage) at the moment and one that creates the swf.
[Code].....
Its just flying down to the right. I want to make this way more sophisticated later on but first in need to get the structure right because right now, even though its just flying in a straight path, its way too slow.
View 0 Replies
Aug 20, 2009
im trying to create a particlesystem where each particle moves by himself depending on which behavior has been assigned to him.But.. its slower than my grandma at the moment so I could really use some advice on how to make this structure a lot more faster!One thing I would like to keep though is the ability to change the behavior of the particle later on.Just have 2 classes (Particle & FlyAroundStage) at the moment and one that creates the swf.
Code:
package
{
import controlpanel.FPSCounter;
import flash.display.Sprite;
[code]....
Its just flying down to the right. I want to make this way more sophisticated later on but first in need to get the structure right because right now, even though its just flying in a straight path, its way too slow.
View 3 Replies
Apr 5, 2012
I am making my very first AS3 game, and though it's quite simple I'm having trouble setting up a scoring system. The concept of the game is simple. Objects appear on the screen, clicking the objects adds points. For this project I am working with 3 AS files, a Document class and two movieclip class files. I would also like to track how many objects have been added to the stage in addition to the score which should track how many objects have been clicked. Here is my Doc Class
[Code]...
View 14 Replies
Mar 28, 2012
im trying to create a tamagotchi game type game. For some reason i can not add any items to the stage.Currently i have imported 2 png images to the stage and coverted them to movie clips. One is called TamagotchiCharacter and the other is called Beer. I have also created a new 2 AS3.0 script class called TamagotchiGame and DraggableItem. The following is TamagotchiGame:
Code:
package {
import flash.display.MovieClip;
public class TamagotchiGame extends MovieClip {
[code]....
I have assigned the above code as the BaseClass of the Beer symbol, this has allowed the beer to become draggable and droppable etc.when i run the program nothing happens, i just get a blank white screen.
View 2 Replies
Jul 7, 2011
i am making a shooting game for ict and i dont know how to make a scoring system or where to put the code this is my code:
stop();
var numEnemy = 3;
var fire = false;
[code].....
View 7 Replies
Jan 14, 2012
I was wondering if it could be possible to create a databinding system in pure actionscript without using mx.binding.utils At least I would like to know what is the overhead of the databinding code and how exactly the ChangeWatcher knows when a property has been changed.
View 2 Replies
Apr 11, 2006
how to create a slot system such a way that which ever slot an object was added on clicking it it performs a function.
View 2 Replies
Aug 13, 2009
iam tryin to create a login system i want the username to b only "mayuresh" & password to b "nagpure" blow is my code
go_btn.addEventListener(MouseEvent.CLICK,perform)
function perform(event:MouseEvent):void
{
[code]....
mp prob is eventhough if username is mayuresh and password is nagpure it traces ("Incorrect Username")
View 6 Replies
Nov 21, 2009
I need to create a rather detailed menu system that will load thumbnails of movie clips that I can then double-click on and it will load them into the display list of another movie clip.
I think I can code the loading part but I've never dealt with creating flash menus before and don't have any help in the 5 as3 books I own.
Is there a way I can make the menu generate the thumbs from an external file that I can just update when I need to instead of editing the flash file?
View 3 Replies
Jan 25, 2011
I am creating this website using good old AS2... although i am planning to move to AS3 quite soon...i JUST CANT come to an idea on how to Logoff or Logout the user from the site if he or she closes the browser or is inactive for 15 min.
View 0 Replies
Aug 4, 2011
I'm building a Facebook multiplayer game where the client side is in FLEX and the server side is in Java and I wanted to know if there is a guide on how to build the server clients managing system. When I say server clients managing system, I mean a server which many clients will connect to and will be able to choose between tables to join and play or to create their own table, same way as in texas holdem poker.
View 1 Replies
Oct 15, 2011
What I need to create a touchscreen restaurant ordering system?
I've got the touch UI understood and implemented 100%.
What I can't figure out is how to implement the "Send order to kitchen" and "Call waiter" functions.
Each table will have a "client" computer running an air app. Calling the "Send order to kitchen" and "Call waiter" functions from the "client" computer should make the "client" communicate with a different "kitchen" computer over wifi.
View 2 Replies
Mar 3, 2011
I need to create an image gallery that the clients can log in and click on photos to add them to favorites. I was wondering how to create this favorite system or if there are any galleries with it?
View 0 Replies
Aug 30, 2009
I'd like to know if someone of you guys has any experience in using Flash (and AS 3.0) to create user interface for Crestron system. I'm experiencing few problems with the management of feedback join
View 2 Replies
Apr 6, 2011
I am trying to create a standard production of visual basic system, on Flash CS5. It's an interactive system made in Flash, but the house style is as of Visual Basic. I have almost completed the project however I am finding it difficult to:-
a) If the user types into textboxes in one stage on flash, it should appear down on another screen on another textbox, simultaneously.
b) How to validate textboxes in flash so that the user can only type in certain characters, for example the user would fill in the textboxes when asked about coding in visual basic. At the end of the screen by clicking next it would check the textboxes and if the characters are incorrect it would display an error message, and if correct proceed to the next screen.
This coding is the closes't i got to solving my problem about validation, I have also read a number of ActionScript books but no luck there. I have also searched the net but could not find what i am looking for, all i got was validating using passwords from parameters.
[Code]...
View 1 Replies
Jun 30, 2011
I'm trying to load an AS2 swf into an AS3 and pass it a flashVar, here is my code:
ActionScript Code:
var myLoader:Loader = new Loader()
var _request:URLRequest = new URLRequest("loader.swf");
var context:LoaderContext = new LoaderContext();
[Code].....
But I get the error which is the title of the thread. I found two different pages from adobe on the LoaderContext class, one lists paramaters as a public property and one does not, I can't for the life of me tho figure out what's the difference or how I can use the class which allows me to use paramaters.
[URL]
View 4 Replies
Aug 22, 2006
I'm attempting to create a dynamic perspective shadow system in Flash 9 (AS 3) that would have the following constructor:
ActionScript Code:
public function PShadow(mcClipToShadow:MovieClip, nAngle:Number = 45, nDistance:Number = 20, nAlpha:Number = 90, nBlur:Number = 10, nXOffset:Number = 0, nYOffset:Number = 0)
{
//do stuff
}
The function would duplicate the mcClipToShadow MovieClip to use as the base shadow, apply a 100% black tint, set the alpha to nAlpha, and apply a blur filter with Blur X = Blur Y = nBlur. Then a transformation Matrix would be applied that would skew the shadow sprite so that it was cast in the nAngle direction with length nDistance.
The only part that I'm having trouble with is solving the math for the Matrix. I've played a lot with the swf's in your tutorial to better understand how the matrix manipulates things, but I'm still having troubles doing the math properly. My goal is to simply plugin the variables from the constructor into the Matrix constructor and the proper shadow will result.
View 1 Replies
Jan 12, 2009
I'm in the process of learning OOP and have run into a small problem. I'm trying to create a basic menu system where you can rollover and rollout of all links. When you select a link, it stays highlighted until you click another link.I've given the 5 links instance names like (link0, link1, link2, link3, link4) and given them each an ID of (0,1,2,3,4) - respectively. I used to be able to do something like this:
Code:
this.onRollOver = function(){
if(this.ID != _root.selectedLink){
this.gotoAndPlay('in');
}
[code]....
View 1 Replies