Reputation: 2961
When I'm tracing a variable in Flash Player Debug, I'm getting a strange behavior. Let's assume that we have a pattern like "x:y". "x" and "y" are integer vars. If we trace that expression with
trace("x:y");
the behavior is
1) if x < 10
"x" variable and ":" will be omitted and only "y" will be printed out
2) if x >= 10
everything works as expected. "x:y" printed out.
Questions:
To reproduce:
// following looks wrong
trace("1:1"); // 1
trace("2:1"); // 1
//but the next ones - look correct
trace("10:1"); // 10:1
trace("11:1"); // 11:1
Thanks in advance.
Upvotes: 0
Views: 665
Reputation: 1014
Testing this with mxmlc:
// following looks wrong
trace("1:1"); // 1
trace("2:1"); // 1
//but the next ones - look correct
trace("10:1"); // 10:1
trace("11:1"); // 11:1
Produces these results for me:
1:1
2:1
10:1
11:1
Anything else you can post to help narrow the problem down?
Upvotes: 2
Reputation: 15390
Variables should not be in quotation marks. The correct way to trace this would be:
trace(x + ":" + y);
Edit: I'm not sure why it is doing that for you but I am not getting that behavior when tracing inside Flash Pro...
Upvotes: 0