Jared Weinstock-TL

Chau Nguyen

Todd Carpenter

Kyle McArdle

Nick Deimler

Tom Bergamini *NEW*
Saved by a trace statement?
12 May 2009 | by Jared

I have just witnessed something I have never seen before while coding in AS3.  Two identical sets of code with the exception of one line, a simple trace statement, have different outputs.  The trace statement is actively affecting the compile.  I actually need the trace statement in the code, uncommented, for everything to work properly.  To see the differences between the versions, open one version in two separate tabs in your browser.  You will notice that the red (or blue) guy’s rotation is off.

test with trace statement | test without trace statement

and heres the code:

buddyArray[id].mesh.rotationZ = transformObj.rotationZ;

trace(”rotation Z: ” + buddyArray[id].mesh.rotationZ); // corrects rotation, but why!?


1 Comment
Jon Williams | 9 June 2009

I’ve seen this before. Are any of the properties you’re tracing part of a getter function? It’s possible (probable) that there’s an update happening you aren’t aware of. I remember seeing something like that deep in the bowels of PV3D somewhere …

Leave a Comment

Copyright © 2009 | The Fourmation | All Rights Reserved.