Flint Particle System Forum - Beginner looking for help with easing classes2011-12-13T13:01:14+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Beginner looking for help with easing classeshttp://flintparticles.org/forum/comments.php?DiscussionID=317&Focus=1094#Comment_10942010-02-09T07:54:31+00:002011-12-13T13:01:14+00:00NickyDhttp://flintparticles.org/forum/account.php?u=325
working with one of the posted examples, I seem to have everything working; however, when I use any of the easing classes I receive this error:
ArgumentError: Error #1063: Argument count mismatch ...
ArgumentError: Error #1063: Argument count mismatch on org.flintparticles.common.easing::Quadratic$/easeInOut(). Expected 4, got 2. at org.flintparticles.common.actions::Age/update() at org.flintparticles.common.emitters::Emitter/update() at org.flintparticles.common.emitters::Emitter/updateEventListener() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at org.flintparticles.common.utils::FrameUpdater/frameUpdate()
public class DolceLogo extends Sprite { private var n:Bitmap; private var d:Bitmap; private var firstEmitter:Emitter2D = new Emitter2D(); private var tween1Emitter:Emitter2D = new Emitter2D(); private var tween2Emitter:Emitter2D = new Emitter2D(); private var renderer:PixelRenderer = new PixelRenderer(new Rectangle(0, 0, 550, 400)); private var imgLoader:Loader = new Loader(); private var imgLoader2:Loader = new Loader();
public function DolceLogo() { init(); }
private function init():void { imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); imgLoader.load(new URLRequest("image/nick.png")); }
private function loadComplete(evt:Event):void { n = evt.target.content as Bitmap; imgLoader2.contentLoaderInfo.addEventListener(Event.COMPLETE, loadFinal); imgLoader2.load(new URLRequest("image/dolce.png")); }
private function loadFinal(evt:Event):void { d = evt.target.content as Bitmap; firstEmitter.counter = new Blast(4000); firstEmitter.addInitializer(new ColorInit(0xFFFFFF00, 0xCC6600)); firstEmitter.addInitializer(new Lifetime(6)); firstEmitter.addInitializer(new Position(new BitmapDataZone(n.bitmapData, 40, 60))); firstEmitter.addAction(new Age(Quadratic.easeInOut)); firstEmitter.addAction(new TweenToZone(new BitmapDataZone(d.bitmapData, 40, 60)));
private function moveToTween1(event:ParticleEvent):void { var dyingParticle:Particle2D = event.particle as Particle2D; var newParticle:Particle2D = tween1Emitter.particleFactory.createParticle() as Particle2D; newParticle.x = dyingParticle.x; newParticle.y = dyingParticle.y; newParticle.color = dyingParticle.color; tween1Emitter.addExistingParticles([newParticle], true); }
private function moveToTween2(event:ParticleEvent):void { var dyingParticle:Particle2D = event.particle as Particle2D; var newParticle:Particle2D = tween2Emitter.particleFactory.createParticle() as Particle2D; newParticle.x = dyingParticle.x; newParticle.y = dyingParticle.y; newParticle.color = dyingParticle.color; tween2Emitter.addExistingParticles([newParticle], true); } } }]]>
Beginner looking for help with easing classeshttp://flintparticles.org/forum/comments.php?DiscussionID=317&Focus=1102#Comment_11022010-02-09T14:39:28+00:002011-12-13T13:01:14+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Try removing this line -
import org.flintparticles.common.easing.*;
You want the classes from the energyEasing package, not the easing package.
import org.flintparticles.common.easing.*; You want the classes from the energyEasing package, not the easing package.]]>
Beginner looking for help with easing classeshttp://flintparticles.org/forum/comments.php?DiscussionID=317&Focus=1104#Comment_11042010-02-09T19:16:08+00:002011-12-13T13:01:14+00:00NickyDhttp://flintparticles.org/forum/account.php?u=325
That worked! Thank you very much.
Yeah I see it was finding both of those easing classes and using the wrong one.
Thank you!
Yeah I see it was finding both of those easing classes and using the wrong one.