The MouseGravityFilter causes the particle be attracted to the mouse. The strength
of this attraction is determined by the mass given to the mouse. If you use
a negative value for mass, this will repel items away from the mouse.
Example
There are two ways to apply the filter. The first way it so set it
via the config object. The second way is to add it to the effectFilters array itself.
import cv.Orion;
import cv.orion.filters.MouseGravityFilter;
// First method
var e:Orion = new Orion(linkageClass, null, {effectFilters:[new MouseGravityFilter(100)]});
// Second method
var e2:Orion = new Orion(linkageClass);
e2.effectFilters.push(new MouseGravityFilter(100));
public var mass:Number
Mass
public function MouseGravityFilter(mass:Number = 1000)
Causes particles to be attracted to the mouse.
Parameters
| mass:Number (default = 1000 ) — The mass given to the mouse. The higher the number, the stronger
the gravitational force is. The lower the number (below zero), the more
it will repel particles.
|
public function applyFilter(particle:ParticleVO, target:Orion):void
Applies the specified filter to a particular particle.
Parameters
| particle:ParticleVO — The individual particle.
|
|
| target:Orion — The emitter associated with the particle.
|
Copyright 2009 Gabriel Mariani (http://blog.coursevector.com/orion)