Triple check the intervals - they are notorious for causing problems.

It's always a good idea to clear intervals before you set them - that way if
they accidentally get set twice you'll know the first one will get
cleared...

clearInterval( myInt );
myInt = setInterval( myFunc, 1000 )


J



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Makely
Sent: 22 March 2007 16:04
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] High CPU usage problems

If you are doing a lot of createEmptyMovieClip() and attachMovie(), then
make sure that those movieclips are getting removed when you are done with
them.  If you are fading those clips away, but never removing them from the
stage with removeMovieClip() (*not* delete), CPU performance will surely
suffer as the number of invisible movieclips increases.

Also double-check to see if your intervals are actually getting cleared.  If
you are using intervals to do multiple tweens, make sure that they ALL get
cleared.  Also beware of intervals declared in loops because if you are not
careful, you can overwrite an interval with a new one.  This leaves the
previous one uncleared and unaccessible as well.

--
andy makely

On 3/22/07, Carl Welch < [EMAIL PROTECTED]> wrote:
>
>
> I programmed the "Portfolio Section". Bring up the task manager and 
> watch the performance graph. You can watch it start to bogg down after 
> a while of clicking around the portfolio section. Its loading xmls 
> (one for the Side
> Menu) and the other for the thumbnails and theire respective data. 
> There are quite a few createMovieClips and AttachMovieClips and some 
> setIntervals - which I do clear when I'm done. When I create a tween 
> object I try to kill
>
> it when I'm done using it with "delete myObject;" - not sure if that 
> even works.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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

_______________________________________________
Flashcoders@chattyfig.figleaf.com
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