ActionScript 3.0 :: Cascading Particles/stars Etc?
Feb 10, 2009
I need to get something similar to this done in a short period of time, so I don't have much time to play around.
Does anyone have a similar code/tutorial or anything that resembles this?
View 3 Replies
Similar Posts:
Nov 19, 2010
We all know there's CSS support in AS3. But actually it's not CSS, but just SS. Is there a way to implement cascading? For example I have
Compare <em>regular italic</em> and
<strong>bold text or event <em>bold italic.
</em></strong>
How can I define special fonts for regular italic and strong italic? How is it named? Basically "How to make styles for child selectors work?"
View 1 Replies
Mar 1, 2005
I am building a site, and for each page I am using a draggable window. Each window is in a seperate swf file, so the need to be loaded.I am going to have the windows cascading so you have to close them to get rid of them.However i thought it would be nice so when you clicked the tab of a window, which is hidden beneath any other windows that are open, it pops up to the front, just like microsoft windows really.I was just wondering how i would do this, i thought about loading the swf's into levels, and thought maybe there was a script which could swap levels or something.
View 4 Replies
Apr 21, 2006
I want to create a dynamically star burst that follows an animated mc. I found this mouse trailer that do the things I want, except it's following the mouse and not a mc.How can I modify the code to make it follow a mc and not the mouse?
View 3 Replies
Jan 10, 2012
I'm interested in dynamically creating (duplicating) a movie clip of a star and placing it randomly on the stage. It should then grow in size and change it's x & y location so it moves off the stage. (I've attached a file to hopefully show what I'm interested in.)I can hack this out in AS 2.0 but it has to be in AS3 and my old high school programming education just isn't hacking it.
View 1 Replies
Mar 4, 2005
Looking for a zoom through space & starfield effect. I've seen horizontal ones but I am looking for stars coming at you head on. Similar to the snow tutorial. Random generated stars zooming at you....
View 3 Replies
Mar 4, 2005
Looking for a zoom through space & starfield effect. I've seen horizontal ones but I am looking for stars coming at you head on. Similar to the snow tutorial.
View 3 Replies
May 31, 2005
I'm using the following code to spin a couple stars on the stage when the mouse rolls over them. Can't figure out how to make the stars slowly decrease in speed after the user rolls off though.
[Code]...
View 8 Replies
Apr 27, 2009
So. I have this relatively simple code
[Code]...
when I run it, there's this wierd random star just in the middle of the screen. I tried tracing all stars with _x values of 0, 200, undefined; _xscale values of 0, 100, undefined. There was nothing. I don't know why it's there. I don't even know if it has code in it. =/ Does anyone know what it is? Btw, I know it looks like crap ... sorta more like a glue gun than stars ... I have a better looking version, I just used this to try to disect the problem.
View 7 Replies
Jan 13, 2012
i want to finish it in the end! i have this code which generated 20 stars and an ai player collects all of them (going for the one which is closest to it). This code was courtesy of -lauri... the code was
ActionScript Code:
import flash.events.Event;
import flash.display.MovieClip;[code].........
what i have currently is a player who moves around with the arrow keys collecting stars which appear at random moments... i wanted to make it so that the ai can also collect these stars and i am pretty sure that the code for that would be linked to what.
View 6 Replies
Dec 19, 2005
I have an idea for something at work. I want to have stars hanging by strings from the top of my flash document. if the user mouses over these stars I want the star to lightly swing in the direction the mouse went over at. Almost as if you had a cardboard star hanging from the ceiling and you tapped it with your hand. I know this probably includes friction but my tests don't seem to work out the way I want. Does anyone know how to achieve this?
View 8 Replies
Aug 3, 2009
I made this simple AS3 game that generates a random amount of stars on the stage. The user has to count the number of stars, punch that number into the input box and hit submit.The problem is that if the user wants to play again, he/she will have to go through the hassle of closing and re-opening game. That's why i'm now wondering how to make a reset button that re-generates the stars for the user to count again.URL...
View 1 Replies
Feb 5, 2011
I was hoping someone might have found a tutorial or done one on how to make a 3d field of infinite stars that can be navigated with mouse movement or the accelerometer..
View 0 Replies
Apr 22, 2011
I've made it so when you die in my game, you explode into 20 particles which usually lags the game, especially if it's being played in a browser. I'm pretty sure that it's just because of the graphics,why it's causing so much lag? I've included the AS2 just encase.
Code:
//variables
fall = -8;
onEnterFrame = function () {[code]...
View 2 Replies
Feb 9, 2010
I've been working on a little particle generator that produces intractable particles. When you click your mouse, they will move in a straight line away from where you clicked. Seems simple enough, but I can't quite get the formula right.
I want to pass two points and a magnitude scalar value into a function and have it move the particle along the line drawn through the two points, and only as far as the magnitude specifics.
For example:Let's say the particle is at the point P(10,10) and the mouse clicks at the point Q(15,15). I pass both those points and the magnitude 10, into my function.
The function then calculates the angle the particle should travel (45 degrees or PI/4 radians) and sends the particle to the point O(20,20), again, as specified by a magnitude of 10.
Edit: By the way, I'm using ActionScript 3.0, but if possible I would prefer a universal explanation in case I decide to program this in another language, or I am without a programming language when I need to figure it out.
View 3 Replies
Nov 14, 2010
How can I rig up an if statement that will add particles to the stage based on the ENTER_FRAME update interval?
Code:
stage.frameRate = 60;
var currentParticles:uint = 0;
var maxParticles:uint = 1000;
var particlesPerSecond:uint = 100;
[Code]...
I run into the problem, where if I choose a bigger value for particlesPerSecond than the stage framerate, I don't add the correct number of particles.
View 7 Replies
Mar 25, 2011
I made a particle class following a tutorial a while ago. Basically it uses some sort of a virtual list, replacing the array method, which makes it really fast solution. So everything is working perfectly fine except the fact that i really can't understand what actually is going on. It is pretty confusing so im trying to find the logic in this stuff, unfortunately with no success.[code]
View 1 Replies
Dec 31, 2008
I know I am a new member but hopefully my question won't be overlooked because of this fact. Anyway, here goes. I have a new project, a flash intro, and my client wants to be able to wipe away sand particles to reveal an enter website button. I tried an simple method of wiping away a image layer like an eraser but they want it to look like actual sand particles are moving around.
View 9 Replies
Jul 1, 2009
how to create the type of particle I want and add it to the stage but how can I add multiple instances of this particle, with different values assigned? Here is what I have so far:
ActionScript Code:
import flash.geom.*
import flash.display.*
[code]...
View 0 Replies
Jul 31, 2009
Does anyone know of a tutorial on how to make streaking particles. I understand the basics of particles, but I want to make a firework effect, one that leaves light trails or streaks behind for a moment before they fade away.
View 0 Replies
Oct 2, 2010
I am using the smoke AS3 file from: [URL] Everything works great, but I would like for my particles to load on a certain level, for example:
[Code]...
Actually, I would like for my Content to always be on top (pertaining to my layer order on the timeline) and everything else to always be behind, but in the manner described above. I'm not sure how to do this,
View 3 Replies
Jan 27, 2011
I have a snow globe image on the stage and a movie clip that surrounds the inside of the globe called area_mc. I need my snowflakes to only float around in area_mc (my snow globe). Right Now I have all my flakes floating around the entire stage.[code]...
View 0 Replies
Feb 7, 2009
i am working on a particle engine for a little project of mine and i cant seem to add any event listeners. I have uploaded the zip so you can see what i have.
View 14 Replies
Dec 21, 2009
You notice that their are 'particles' falling from the position of the mouse but for some sort of stupid reason they get stuck at a certain point in time.
Also, the three white bars are dragable, but i want them to swing back in to place when you release them. Is this also possible with a tween ? or do i need to code something physic-like.[code]...
View 5 Replies
Mar 19, 2010
I'm new to the forums here and new to AS3 (I have some AS2 experience, and lots of general programming experience).nd I've made a few tweaks, including most significantly, fading out and killing particles after a certain amount of time. But I have a problem: I can't figure out why some of my particles live longer than they should.In more detail:In particles.as, for each dust particle that gets generated, the fadeOut function should get called after half a second, and when that tween is done, the killParticle function should get called. This seems to work for most particles but every now and then a few particles will stick around (i.e. the fadeOut function won't get called)Watch the animation: linkOh, and I'd love to know if there's anything I can do to increase performance as well. This is pretty cpu-heavy right now.All my .fla file does is include particles.as. See code below.particles.as
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
[code].....
View 1 Replies
May 4, 2009
I'm basically trying to make a bunch of particles jump around. I've used the draw tools to draw a small red puff. When you click the puff shoots up from the cursor a few pixels before falling down.
how to call the information from this .as file in another file. This way I will take out the click functionality from the file I have done and have the puffs shoot out automatically at the mouseX and mouseY coordinates.
I eventually want to have these puffs shoot out from a character as it runs across the screen in a game I have planned. It will make it much easier to have these puffs called from a seperate file I believe.
Here is the code I have so far:
[Code]......
View 7 Replies
Apr 11, 2010
I want to take any Text sting and form from it text formed by particles in actionscript 3 (In flash flex) I see I need some lib for this. but all libs Ive seen do not have such functionalyty by default...
So I want to get something like this
So Is there any sych lib? or way of doing it with some lib?
It should be Free and Opensource (any license like GPL, LGPL etc will be ok).
View 2 Replies
May 17, 2011
I am just starting to learn flash/actionscript 3 and decided to code up a simple particle simulator.The very initial design simply involves filling the screen with a buncha particles which scatter away from the cursor if you were to click.This works, but is a bit unresponsive. I am using graphics.drawCircle() to draw the particles, and each particle is inherited from Sprite.
Listener for mouseclick event:
private function mouseClick(e:MouseEvent):void
{
trace("click");
var now:Date = new Date();
trace("Before: "+now.getTime());
[code]....
How should I make this more efficient? I plan on doing collision detection and other physics interactions later, and this is already a bit slow even without the hefty number crunching code I intend to add later.
View 2 Replies
Jul 1, 2009
I am trying to generate a random number of particles (say between 1 and 4) per second, which would float up the screen from the bottom at a random X value (width is 1280 px). These particles should be a random size (say between 2 and 5 px in diameter) and a random opacity (say between 20 and 50%).
and all of this should be going on in the background while the rest of the flash actions are taking place.
How would I do this, I have been experimenting but have had very little success. It is something that I could easily do in after effects however I would like to keep file size small and allow for continuous uninterupted play.
View 1 Replies
Feb 11, 2010
ActionScript Code:
var myArray:Array = new Array();
for(var i=0; i<10; i++){
var p:Particle = new Particle();
[Code]....
I have this array of particles and I was wondering how can I add this particles inside a movieClip, in other words I would like to add particle "p" to a movieClip that I have on the stage with an instance name of "mainMC".
Also, is it possible to display the number of particles (p) inside mainMC in a text field? On this case I know it will be 10, but this will change.
View 2 Replies