Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthoroknoeno
- CommentTimeAug 9th 2011
I had the problem that particles in a DisplayObjectRenderer were automatically removed at the global x position of 1024. I ran different tests and found out that the auto-removement depends on the particle's scale value.
if I add an Scale Initializer with a value < 1 the particle is removed before 1024, if the value is > 1 its removed later. Really strange is that its calculated via tha global position. When I move the renderer to the right it still removes the particle at the same position.
Can I somehow change this behavior? Is there a rule?
Thanks!
Here my test code:
import org.flintparticles.common.counters.*;
import org.flintparticles.common.displayObjects.RadialDot;
import org.flintparticles.common.initializers.*;
import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.initializers.*;
import org.flintparticles.twoD.renderers.*;
import org.flintparticles.twoD.zones.*;
import flash.display.StageScaleMode;
import flash.display.StageAlign;
var emitter:Emitter2D = new Emitter2D();
emitter.counter = new Steady( 50 );
stage.align = StageAlign.TOP_LEFT
stage.scaleMode = StageScaleMode.NO_SCALE
emitter.addInitializer( new ImageClass( RadialDot, 2 ) );
emitter.addInitializer( new Velocity( new PointZone( new Point(165, 0 ) ) ) );
emitter.addInitializer( new ScaleImageInit( 0.5 ) ); // forces the particle to be removed at 512 px
emitter.addAction( new Move() );
var renderer:DisplayObjectRenderer = new DisplayObjectRenderer();
renderer.addEmitter( emitter );
renderer.y = 200
addChild( renderer );
emitter.start(); -
- CommentAuthorRichard
- CommentTimeAug 19th 2011
I was able to reproduce the error, using your code as supplied. However, when I change the display object to something else, like the Dot or Star, the problem goes away. It seems to be an issue specifically with the radial dot. I can't find the cause and wonder if it's a display error in the Flash Player.
1 to 2 of 2
