Sprites can have mouse handling. If you don't base your class on UIComponent
you lose all the automatic display list stuff (measuring, layout, etc). But
if you manually control positioning and everything yourself, and don't have
any need for stuff like CSS styles, then you should be OK using Sprite.

Doug

On Wed, Oct 15, 2008 at 4:49 PM, Guy Morton <[EMAIL PROTECTED]> wrote:

>   It seems odd that there is no really lightweight class for addressing
> this sort of need, which I would have expected was a common one (I note it's
> the subject of a second thread now too).
>
>
> On 16/10/2008, at 9:51 AM, Guy Morton wrote:
>
> Thanks for the reply, Josh. They do need to respond to mouseovers and
> mousedowns, so am I stuck with UIComponent?
>
> Guy
>
> On 15/10/2008, at 8:11 AM, Josh McDonald wrote:
>
>
> If they don't need mouse events, base them on Shape instead.
>
> On Wed, Oct 15, 2008 at 7:09 AM, Guy Morton <[EMAIL PROTECTED]> wrote:
>
>> Anyone?
>> On 14/10/2008, at 11:34 AM, Guy Morton wrote:
>>
>> We have an app which adds 50 or 60 dynamically created and animated
>> canvas-based objects to the display list as it runs. I've noticed when
>> running this under the profiler that even though these canvas-based
>> components are really simple (they have a draw function and a rotate
>> function in them and don't import any other classes) they each add
>> about 1 Mb to the overall memory consumed by the app.
>>
>> I've also tried making the components UIComponent based instead of
>> using Canvas (as I believe it's a little more lightweight) but it
>> doesn't seem to make a huge difference.
>>
>> Is there a better/more efficient way to dynamically create, draw,
>> rotate and animate a bunch of small objects in a flex app?
>>
>> TIA
>>
>> Guy
>>
>>
>>
>
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> Like the cut of my jib? Check out my Flex blog!
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
> :: http://flex.joshmcdonald.info/
>
>
>
>
>  

Reply via email to