Coding in Flash
Remember it
There are some more coding rules which
are necessary to remember
- ; - semicolon - used at the end of the code line.
Also is necessary between parameters in for loop
varAge = 14+ varAddAge;
- " " - quotes - are placed before and after text
strings and parameters that
are considered as text
on(release)
getURL("http://provider.ca");
varMessage="connected to the site";
- // and /* */ - comments - for explanation inside
the code. Double slash works for the single line and slash - stars
embrace multiline comments
// this code is written by AS-online
/* this
is
multiline
comment
*/
- ( ) - parentheses -
embrace list of arguments for methods and functions,
even if there no at all. Also are placed for event
handlers, loops and conditions parameters. Used also
for arithmetic equations
on(rollOver) {
a= b * (c+d);
function(){play();}
loadMovie("doit.swf");
}
-
{ } - curly braces - embrace code fragments for
functions, even handlers, loops and conditions.
May be nested one pair into another
if (a==b) {
b=0;
}
Next