What's the quickest way to print "debug" messages from Flex? You know, things like "got a mouse click at ($x, $y)" or "received and event from $sender".
+3
A:
trace(mouseEvent.x + ", " + mouseEvent.y);
prints it to the console if you're using Eclipse/Flex Builder.
CookieOfFortune
2009-03-31 20:54:24
Or just trace(mouseEvent.x, mouseEvent.y) works fine too.
le dorfier
2009-03-31 21:15:39
+2
A:
Using trace() is a simple way to see messages in the Flex Builder console. But you have to run in debug mode to see them. You can also get trace statements to print to a local file. For more complex logging there is a Log4J-like framework in the Flex SDK. More information on all of this is in the Flex Documentation:
http://livedocs.adobe.com/flex/3/html/help.html?content=logging_07.html
James Ward
2009-03-31 21:13:46