Help! Troubleshooting a slow down

Hi All,

I have a very simple .swf file that is causing some kind of slow down or memory leak. It is effecting the browser its self as moving the mouse cursor around or selecting text becomes sluggish.

Within the .swf, the stage is only 1px by 1px. It is meant to fit the size of the html element its embedded in. Once the .swf loads it adjusts its stage to the new dimensions. It then draws a rectangle movie clip to fit the new size.

Once the rectangle is drawn the .swf then draws 50 circles of varying size to animate as a snow effect. I wasn’t having any slow down until I added this snow effect in. However let me explain in the next paragraph that the snow is not the real culprit.

The rectangles fill, stroke, and corner radius. Can all be set by variables sent to the swf. by the Flashvars attribute of object, and embed. Once they are retrieved by the .swf they are processed by a conditional statement I wrote. If one of the attributes isn’t set they are set to a default. looks like this:

///////////////////////////////////////////////////////////////////////////
//style object rebuilder checks to see if the styles exists 
//if not, it sets them to a default style. If they do exist set them to negative times negative 1
//because they come in as string datatypes from javascript and need to be numbers, the - operater forces datatype change
function rebuildStyleObj():Object{
	var styleObj:Object = {
		fillC:Number = fillC ? -fillC*-1 : 0x000000,
		fillA:Number = fillA ? -fillA*-1 : 32,
		strokeW:Number = strokeW ? -strokeW*-1 : 0,
		strokeC:Number = strokeC ? -strokeC*-1 : 0x000000,
		strokeA:Number = strokeA ? -strokeA*-1 : 100,
		rad:Number = rad ? -rad*-1 : 10
	};
	
	return styleObj;
};

Heres how I know the snow effect isn’t the culprit. If I don’t pass the .swf any Flashvars attribute and just let it use the defaults for styleObj in the .swf. The effect runs fine. If I do try to pass it Flashvars the slow down occurs. Is there an issue with my conditional statements?

I have tried embedding using the SwfObject.js Class and using standard HTML tags. Both display the same issue if Flashvars are passed there’s a slowdown if not its fine.

If anyone could help with this, or shoot me some links with info I would be eternally grateful. I can also provide the source files if you want to take a look at it.