ok this is really wierd, i just added the trace values and they would always appear as the correct number and everything would work fine, then i tried in my swf and i would still get the error. so i added two text fields which displayed the stagew and stageh properties and i havent got the error in my swf. then i took the text fields away and got the error straight away. i dont know how these text fields could stop the error but they appear to be doing so.