Flash MX 6 Tips

Trace() locks up Flash MX

The trace() ActionScript call is used to send a string to the Flash Player's Output window. When the output window refreshes, it gains focus and pauses flash playback for a small duration. If you have a trace() event occuring on every frame, Flash MX loses focus almost completely, and it is near impossible to return to the application until/if the trace events complete.

Workaround: There are a couple methods to stop these trace events from locking up the system. If you are running a one or two frame loop infinitely, putting a blank frame between the looping frames is enough to give you a breather.

You can also create a trace()-like function like this and link it to a text field:

function myTrace(myString){
	_root.myText += myString + "\\n";
}
This is the preferred method, and it will stop the output window from slowing playback.

If it does lock up, things are not hopeless. Chances are you will not be able to click the close button on the player, but you will be able to click Close on the application(in the upper right corner). Click the close button, wait, and you should be able to see a flickering 'save before close' window. Click on it until all of them go away, and the application should exit after a while. Your work should be safe, you can restart Flash where you left off.


by Unknown on 2009-07-17 11:30:31
Important Information Tips are provided by the CrossOver Community and Advocates. They are not intended to be used for official CodeWeavers Support. For that, please visit our official support pages.
CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...
eyJjb3VudHJ5IjoiVVMiLCJsYW5nIjoiZW4iLCJjYXJ0IjowLCJ0enMiOi01LCJjZG4iOiJodHRwczpcL1wvbWVkaWEuY29kZXdlYXZlcnMuY29tXC9wdWJcL2Nyb3Nzb3Zlclwvd2Vic2l0ZSIsImNkbnRzIjoxNzI3NDcwNjA2LCJjc3JmX3Rva2VuIjoiVTVOZ3laYmFQQlRGUGIyZiIsImdkcHIiOjB9