Richard Lord has recently released the Version 0.9.4 of Flint.
I made this example using Flint particle system is an Actionscript 3.0 Open Source project with the aim of create a library that handles the common functionality for all particle systems. To see it work just click anywhere on stage and it will make a nice Firework out of my “Logo”
I just tried it myself and i must say it’s super easy to use and to extend. You can find Flint source on the google code page of Flint with working examples in the downloads section there’s also some very good examples and tutorials on Flint Particle System Site and you can keep track of Richard on his blog.
The latest version comes packed with all kind of particles goodies like:
* Access all properties in Actions, Initializers, Counters and Activities so they can be modified while the emitter is running.
* AlphaInit initializer sets the initial alpha value for all particles
* ImageClasses and SharedImages initializers set the particle image to one selected from a group, with weighting to adjust the selection
* MouseExplosion action pushes particles away from the mouse
* MouseGravity action pulls particles towards the mouse
* TurnAwayFromMouse action causes particles to turn away from the mouse
* GreyscaleZone uses a greyscale image to define a zone, with weighting based on the luminence of each pixel
* Pulse counter emits particles in regular bursts
* PerformanceAdjusted counter adjusts the rate of particle emission if the frame-rate drops
* TwoWay energyEasing functions have an energy peak half-way through the particle’s lifetime
Heres the link to my example using Flint, and Flex 3 as much as I would love to add the code right below my post the IG Syntax HighLighter seems to not be getting very well with the latest update of wordpress so to get the code just right click on my example and it will take you there.
Update you can now view the code right here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | package { import flash.display.Bitmap; import flash.display.Sprite; import flash.events.MouseEvent; import flash.filters.BlurFilter; import flash.filters.ColorMatrixFilter; import flash.geom.Point; import org.flintparticles.actions.*; import org.flintparticles.counters.*; import org.flintparticles.emitters.*; import org.flintparticles.energyEasing.Quadratic; import org.flintparticles.events.FlintEvent; import org.flintparticles.initializers.*; import org.flintparticles.zones.*; [SWF( frameRate='61', backgroundColor='#000000')] public class LogoFireworks extends Sprite { [Embed(source="assets/sgw.png")] public var Logo:Class; public var bitmap:Bitmap = new Logo(); public var ev:FlintEvent; private var emitter:PixelEmitter = new PixelEmitter(); public function LogoFireworks() { ViewSource.addMenuItem(this, "srcview/index.html"); stage.scaleMode = "noScale"; stage.align ="TL"; init(); } public function init():void { stage.addEventListener(MouseEvent.MOUSE_DOWN,startFlint); stage.addEventListener(MouseEvent.MOUSE_UP,stopFlint) } public function prepareToFlint(event:MouseEvent):void { stage.addEventListener(MouseEvent.MOUSE_DOWN,startFlint); stage.addEventListener(MouseEvent.MOUSE_UP,stopFlint) } public function startFlint(Event:MouseEvent):void { emitter.addFilter( new BlurFilter( 2, 2, 1 ) ); emitter.addFilter( new ColorMatrixFilter( [ 1,0,0,0,0, 0,1,0,0,0, 0,0,1,0,0, 0,0,0,0.96,0 ] ) ); emitter.setCounter( new Blast( 1500 ) ); emitter.addInitializer( new ColorInit(Math.random()* 0xFFFF3300,Math.random()* 0xFFFFFF00 ) ); emitter.addInitializer( new Lifetime( 7) ); emitter.addInitializer( new Position( new DiscZone( new Point( 0, 0 ), 10 ) ) ); emitter.addInitializer( new Velocity( new BitmapDataZone( bitmap.bitmapData,-211, -550 ) ) ); emitter.addAction( new Age( Quadratic.easeIn ) ); emitter.addAction( new Fade( 1.0, 0 ) ); emitter.addAction( new Move() ); emitter.addAction( new LinearDrag( 0.5 ) ); emitter.addAction( new Accelerate( 0, 70 ) ); addChild( emitter ); emitter.x = stage.stageWidth/2; emitter.y = stage.stageHeight -(5); emitter.start( ); emitter.addEventListener( FlintEvent.EMITTER_EMPTY, restart); } public function stopFlint(Event:MouseEvent):void { stage.removeEventListener(MouseEvent.MOUSE_DOWN,startFlint) } public function restart( ev:FlintEvent ):void { mouseEn(); } public function mouseEn():void { stage.addEventListener(MouseEvent.MOUSE_DOWN,startFlint); } } } |







![Validate my RSS feed [Valid RSS]](http://www.cloudfaces.com/swfgeekblogexamples/images/valid-rss.png)


Google Analytics Tracking for Adobe Flash
A new API for using Google Analytics Tracking in Flash/Flex projects this API is developed in ActionScript 3.0 and can be used as a component or called in your ActionScript code, Google Analytics Tracking for Adobe Flash seems to solve a lot of troubles and the needed workarounds for making consistent user tracking in your Flash projects, keep reading for a more detailed explanation extracted from the implementation overview.
The Google Analytics Tracking for Adobe Flash component makes it easy for you to implement Google Analytics in your Flash-driven content. This component contains all of the functionality of the Google Analytics Javascript code, and is 100% compatible with the latest
ga.jstracking code. The Flash Tracking component is a compiled tracking object native to ActionScript 3, making Analytics implementation intuitive in Flash, and Flex development environments.You can develop Analytics Tracking for Flash in either Adobe Flash or Adobe Flex environments. Each environment requires a different component, which you can download from http://code.google.com/p/gaforflash/. These components are based on ActionScript 3 and can be set up in one of two ways for each environment:
In Adobe Flash
In Adobe Flex
How to use the Component in Adobe Flash
In order to use the Flash tracking component in your environment, you either use the visual tools inside Flash, or you set up the tracking object directly in your code. Regardless of whether you are setting up the component visually or via code, you provide the following elements:
UA-xxxxx-yy, where the x’s and y’s are replaced with the numbers that correspond to your account and profile information for the object you are tracking. See Web Property for more information.Installation for Flash CS3
Before you begin to use gaforflash to add Analytics tracking within Flash CS3,
you first need to add the gaforflash SWC to Flash CS3.
To do so:
1. If you have Flash CS3 currently open, quit the application.
2. Navigate to the location where you unzipped the Google Analytics zip
and find the swc (e.g. lib/analytics_flash.swc).
3. Create a “Google” directory in one of the following locations
and copy the SWC file there:
- (Windows) C:\Program Files\Adobe\ Adobe Flash CS3\language\Configuration\Components
- (Mac OS X) Macintosh HD/Applications/Adobe Flash CS3/Configuration/Components
Flash CS3 is now set up to support Google Analytics Tracking For Adobe Flash.
Alternatively if you want to use gaforflash in code-only mode
you can do the same as the above and add the lib/analytics.swc,
you will then need to drag the “AnalyticsLibrary” component in your Library.
Installation for Flex Builder 3
Before you can compile your code, you will need to link it to the gaforflash SWC file.
To do so:
1. select Project->Properties.
A Properties dialog box will appear for your project.
Click on Flex Build Path and then select the Library Path tab:
2. Click Add SWC… within the Library Path pane.
An Add SWC dialog box will appear.
Navigate to the location where you unzipped the Google Analytics zip
and select lib/analytics.swc file and click OK.
or
Just drop the analytics.swc file into your Flex project /libs directory
Here’s the link for the Google code project
The gaforflash direct download
More info on the API