Flint Particle System Forum - HELP!! ERROR WHEN I TRY TO USE IMAGE IN PARTICLE2010-12-25T19:44:33+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
HELP!! ERROR WHEN I TRY TO USE IMAGE IN PARTICLEhttp://flintparticles.org/forum/comments.php?DiscussionID=147&Focus=590#Comment_5902008-12-29T18:56:19+00:002010-12-25T19:44:33+00:00luigicoriahttp://flintparticles.org/forum/account.php?u=111
Hello, i have my own engine, and tried to embbeb Flint engine. It works Fine when i use the basic particle, but when i try to use an Image, i get a null value in my object.
i use a ...
i use a LoaderResourses Manager as Class type, but by now is impossible to run it
i post the code so you can help me about that:
/////////////////////////////////////////////////// CLASS PARTICLE /////////////////////////////////////////////////
public class Particulas extends Emitter2D { private var m_ResourcesMgr : ResManager; private var m_ResLoaded : Res_Loader; private var m_Variables : Variables; private var m_p:MovieClip;
public function Particulas() { OnEngineStart(); }
public function OnEngineStart():void { var Prototype:Class; m_Variables = Variables.GetInstance();
Prototype = m_ResLoaded.LoadClassMc("Catch"); //-->/// HERE I GOT A NULL VALUE TO THE VARIABLE PROTOTYPE
counter = new Steady(15);
//this.addInitializer( new ImageClass( RadialDot, 4 ) ); //-->THIS WORK FINE!! this.addInitializer(new ImageClass(Prototype,2)); // --> THIS DOESNT WORK this.addInitializer( new Position(new LineZone(new Point( 0, 460), new Point(0, 70)))); this.addInitializer( new Velocity( new PointZone( new Point( 40, 0 ) ) ) ); this.addInitializer( new ScaleImageInit( 1, 1 ) );
this.addAction( new Move() ); this.addAction( new DeathZone( new RectangleZone( -10, -10, 620, 620 ), true ) ); this.addAction( new RandomDrift( 15, 15 ) );
this.addAction( new Move() ); this.addAction( new DeathZone( new RectangleZone( -10, -10, 620, 420 ), true ) ); this.addAction( new RandomDrift( 15, 15 ) );
////////////////////////////////////////////////////////////////////////////////// PART OF THE CLASS RESOURCES LOADER (I GET THE CLASS NAME OF THE MOVIECLIP FROM THE SWF) HERE I RETURN A VALUE OF CLASS TYPE, USED IN PARTICULA CLASS LATER. //////////////////////////////////////////////////////////////////////////////////
public function LoadClassMc(name:String):Class { if (!appDomain.hasDefinition(name)) { trace ("error "+name); return null; } return appDomain.getDefinition(name) as Class;]]>
HELP!! ERROR WHEN I TRY TO USE IMAGE IN PARTICLEhttp://flintparticles.org/forum/comments.php?DiscussionID=147&Focus=599#Comment_5992009-01-07T08:20:54+00:002010-12-25T19:44:33+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
This looks like a problem with your class loader.
HELP!! ERROR WHEN I TRY TO USE IMAGE IN PARTICLEhttp://flintparticles.org/forum/comments.php?DiscussionID=147&Focus=605#Comment_6052009-01-07T19:47:19+00:002010-12-25T19:44:33+00:00luigicoriahttp://flintparticles.org/forum/account.php?u=111
The problem was solved, the loader class works fine, the problem was in other side
thanks anyway
thanks anyway]]>