Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorDinkyfish
- CommentTimeJan 21st 2010
Hi there, I've just copied the code from the firework example into the document class of my .fla file and I'm not getting anything appearing on screen... any ideas why? I want to achieve an effect very similar to the firework, so I thought using it as a base would be a good place to start. I've never used FLiNT before so I figured I could use a head start lol
It's literally copy-pasted straight in, except I have it in the document class rather than on the timeline. I don't think I really need to put this in, but here's my code:
package {
import flash.display.MovieClip;
import flash.geom.Point;
public class BlastTest extends MovieClip
{
//Vars
//Constructor
public function BlastTest():void
{
var emitter:Emitter2D = new Emitter2D();
emitter.counter = new Blast( 700 );
emitter.addInitializer( new SharedImage( new Dot( 2 ) ) );
emitter.addInitializer( new ColorInit( 0xFFFFFF00, 0xFFFF6600 ) );
emitter.addInitializer( new Velocity( new DiscZone( new Point( 0, 0 ), 200, 120 ) ) );
emitter.addInitializer( new Lifetime( 5 ) );
emitter.addAction( new Age( Quadratic.easeIn ) );
emitter.addAction( new Move() );
emitter.addAction( new Fade() );
emitter.addAction( new Accelerate( 0, 50 ) );
emitter.addAction( new LinearDrag( 0.5 ) );
emitter.addEventListener( EmitterEvent.EMITTER_EMPTY, restart );
var renderer:BitmapRenderer = new BitmapRenderer( new Rectangle( 0, 0, 500, 400 ) );
renderer.addFilter( new BlurFilter( 2, 2, 1 ) );
renderer.addFilter( new ColorMatrixFilter( [ 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0.95,0 ] ) );
renderer.addEmitter( emitter );
addChild( renderer );
emitter.x = 250;
emitter.y = 150;
emitter.start();
}
function restart( ev:EmitterEvent ):void
{
Emitter2D( ev.target ).start();
}
}
}
I'm not getting any errors, just a blank swf... -
- CommentAuthorDinkyfish
- CommentTimeJan 22nd 2010
I have downloaded the examples from the downloads section and noticed that they were created using CS3 while I am using CS4, could this be the problem?
I have even tried just creating a plain emitter and renderer, with no 'effects' applied to them and I'm still getting nothing. If anyone has any ideas please tell me, I don't have much time left to spend on this so if I can't get some sort of answer then I'm going to have to use an alternative system... -
- CommentAuthorDinkyfish
- CommentTimeJan 22nd 2010
Never mind... it was to do with the file paths and whatnot... stuff that I don't really understand and shouldn't tinker with haha
1 to 3 of 3
