Flint Particle System Forum - How to call a class from your FLA file? Wed, 17 Nov 2010 10:54:03 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher How to call a class from your FLA file? http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=369#Comment_369 http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=369#Comment_369 Mon, 08 Sep 2008 14:37:34 +0100 fs_tigre
I'm new to flint and sort of new to classes. How can I call a class from the .fla file? Lets pretend that I want to use the logo fireworks or the fire and smoke class.

How can I call the class from my .fla file?

Is the procedure the same for all classes or some classes require different parameters?

Thanks,
fs_tigre ]]>
How to call a class from your FLA file? http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=373#Comment_373 http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=373#Comment_373 Mon, 08 Sep 2008 19:14:54 +0100 Richard How to call a class from your FLA file? http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=384#Comment_384 http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=384#Comment_384 Tue, 09 Sep 2008 02:41:47 +0100 fs_tigre
Well I was referring more to call the class on a MOUSE_OVER or on some other event.

Thanks,
fs_tigre ]]>
How to call a class from your FLA file? http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=386#Comment_386 http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=386#Comment_386 Tue, 09 Sep 2008 08:39:52 +0100 Richard How to call a class from your FLA file? http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=388#Comment_388 http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=388#Comment_388 Tue, 09 Sep 2008 12:44:28 +0100 fs_tigre How to call a class from your FLA file? http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=393#Comment_393 http://flintparticles.org/forum/comments.php?DiscussionID=82&Focus=393#Comment_393 Tue, 09 Sep 2008 13:48:03 +0100 Richard gravity wells example as a frame script is

import flash.display.Sprite;
import flash.filters.BlurFilter;
import flash.filters.ColorMatrixFilter;
import flash.geom.Point;

import org.flintparticles.actions.*;
import org.flintparticles.counters.*;
import org.flintparticles.emitters.Emitter;
import org.flintparticles.initializers.*;
import org.flintparticles.renderers.*;
import org.flintparticles.zones.*;

var emitter:Emitter;
emitter = new Emitter();
emitter.counter = new Blast( 4000 );

emitter.addInitializer( new ColorInit( 0xFFFF00FF, 0xFF00FFFF ) );
emitter.addInitializer( new Position( new DiscZone( new Point( 200, 200 ), 200 ) ) );

emitter.addAction( new Move() );
emitter.addAction( new GravityWell( 25, 200, 200 ) );
emitter.addAction( new GravityWell( 25, 75, 75 ) );
emitter.addAction( new GravityWell( 25, 325, 325 ) );
emitter.addAction( new GravityWell( 25, 75, 325 ) );
emitter.addAction( new GravityWell( 25, 325, 75 ) );

var renderer:PixelRenderer = new PixelRenderer();
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.99,0 ] ) );
emitter.renderer = renderer;
addChild( renderer );

emitter.start();
]]>