Flash on Android? |
- char
- number
- boolean
Char or Character can be long or we called as string. Number can be variation like Integer, Float or double. For Boolean, there is only 1 type boolean but in other programming Boolean have more variation like number. I should talk a little bit about number.. Number as you know is variable that use number. But for science purpose, number is not fully fixed like 3, 5, etc... Sometimes they can show 3.14 !! That's the reason why number is separated like integer and float.
Float can be use for scientific calculation, but Integer for fixed number, Integer can't have value after 0, float can!! but there are limit how many number can be add to the variable.
More detail to other variable, we will continue other part. But now we should try to read again the previous code!!?
public function fl002( ) {
var userName:String = "Bill Smith";
trace("My name is " + userName + ".");
}// public function
I Skip to the main code. And go to the main code, we have this function to call me or we just called Whoami. In this program I called my self Bill Smith.. for your info.. this is WRONG!
Let's change the code into something different like your name.
Succeded renane the userName, try run it.. You will notice something wrong!! if you said.. why the whoami show on debug/comment box? well.. that's because the code are to show trace (log/comment)
You can trace the value or anything that able to help you using function Trace actualy.. if you need the code to be debug in the file.. try to edit MM.cfg.. but I suggested don't..
The mm.cfg file allows you to set the following variables:hmm.. but the trace is not show anything on the Flash.. What should you do? For me.. is to continue my tutorial next part. Next part will be something burning.. eh something related to handling!! for the review.. do you remember in AS2.. every movie have handling like onFrame, OnKey and other.. next part will be use the handling in AS3
TraceOutputFileEnable
The value can be 0 (don't write trace content to a file) or 1 (write to a file).
TraceOutputFileName
The path to the file to which to write. If a value isn't specified, then the content is written to flashlog.txt in the same directory as mm.cfg.
ErrorReportingEnable
The value can be 0 (don't write errors to the logfile) or 1 (write errors to the logfile). The default value is 0.
MaxWarnings
The maximum number of errors to write to the logfile. If this value is set to 0, there is no limit. If a larger value is specified, that limit is imposed and any errors beyond the limit are not written to the log.
Tidak ada komentar:
Posting Komentar