Hello Dear Flashcoders,

I am trying to create a particle system in AS3 in flex builder 2.

so my structure is like this: I do have a main class of the program, I do have Circle class and I do have CircleManager class which handles all initialization and declarations about circle objects.

What I am having difficulty is the rendering process.

Before adding this CircleManager class, the way I created Circle class was to extend Shape class and use it according to my needs and then in the main class I could able to add it like;

// main class
var c:Circle = new Circle();
c.draw();
addchild(c);



but since I added my CircleManager class and even I did the changes I was supposed to do, I think I am still missing something since I don't see anything on the screen. What I did was I create a CircleManager class and move all declarations of circle to here. for my main I changed it like below:

// main class
var c:CircleManager = new CircleManager();
c.draw();
addchild(c);


This first gave me error and it made sense. I forgot to extend my CircleManager class with sprite or shape in order to be able to use it with addChild. So I went ahead and added extend Shape to my CircleManager class. It corrected the error but when I ran this I don't see anything on the screen. When I debug the code I can trace the x,y values for Circles. So my questions:

Should I still be adding all the circle objects with addchild() method in order to render them on the screen? Isn't there a way to just add my CircleManager and let it do the job? Should I make Circle subclass of CircleManager in order to do it? I am looking forward to your advices.

best,
ilteris


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to