MACROMEDIA FLEX 2-TESTING FLEX APPLICATIONS WITH MERCURY QUICKTEST PROFESSIONAL Manuale Utente Pagina 7

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 27
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 6
486Debugging
You’ll want to set up your mm.cfg file to look like this:
TraceOutputFileEnable=1
ErrorReportingEnable=1
MaxWarnings=500
With logging now enabled, details will be stored in a log file called flashlog.txt whose
location is operating-system specific (see table 23.3).
With the configuration good to go, you can now use it via the
trace()
function.
23.1.3 Using the trace() function
trace()
is a simple global function that is available from anywhere in your code. It lets
you record text to the flashlog.txt log file. Now that you have mm.cfg set up, you can
use this function, as listing 23.1 demonstrates.
<mx:Label text="Type in something:"/>
<mx:TextInput id="something"/>
<mx:Button click="trace('Something is currently: ' + something.text)"
label="Record Something"/>
When you type something and click the Record Something button, the text you type
shows up in the flashlog.txt file (listing 23.2 shows an example).
*** WARNING: Please use gotoAndPlay(1) in the last frame of your Motif
creative if you intend to loop. ***
*** Please use 'stop();' at the end of your Motif creative if you do not
intend for it to loop. ***
MaxWarnings Number
Maximum number of warnings to record.
Default is
100; use 0 for unlimited.
Table 23.3 Output location of the Flash Player’s log file
Operating system Path
MAC OS X /Users/[username]/Library/Preferences/Macromedia/Flash Player/Logs/
Windows 95/98/ME/
2000/XP
C:\Documents and Settings\[username]\Application Data\Macrome-
dia\Flash Player\Logs
Windows Vista C:\Users\[username]\AppData\Roaming\Macromedia\Flash Player\Logs
Linux /home/[username]/.macromedia/Flash_Player/Logs/
Listing 23.1 Using trace() to write information to the Flash log file
Listing 23.2 Sample Flash log file
Table 23.2 Flash Player’s configuration-file settings (continued)
Configuration property Type Description
Vedere la pagina 6
1 2 3 4 5 6 7 8 9 10 11 12 ... 26 27

Commenti su questo manuale

Nessun commento