You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a Starling Extension that you can download below along with a very simple JSFL script used to output the motion you mock up in Flash Professional.
Mock up the path you want your particle to have in Flash Pro
Run the custom JSFL script (SimpleMotionXML.jsfl) to export your path to XML.
Now you have an XML copied to your clipboard. Now simply create a new MotionParticleSprite instane as follows:
// Create an init Object used to configure behavior. first param is the particle// XML Config file that you exported from fx- Particle-Designer. The second param is// the particle Texture.</pre>var initObj:MotionParticleSpriteInitObject =new MotionParticleSpriteInitObject
(
XML(newPARTICLE()),
myAssetManager.getTexture( AssetConstants.PARTICLE )
);// Store the Clipboard XMLvar xmlPastedFromClipboard:XML=PASTE_HERE;// Create the MotionParticSprite and pass the XML and the Init Obj.var motionParticleSprite:MotionParticleSprite =new MotionParticleSprite( xmlPastedFromClipboard , initObj);addChild( motionParticleSprite );
motionParticleSprite.initialize();// this takes care of making the particle ready.
motionParticleSprite.play();// this starts the particle.
With the Init Object you can configure these properties.
fadeInAt
fadeOutAt
delay
notifyAtFrames
hideWhenComplete
extraGraphic
extraGraphicOnTop
frameRate
About
Mock up at motion path in Flash Pro and use it to guide a particle in your starling scene.