MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 148

Actionscript language reference
Table of Contents

Advertisement

If you add an undeclared function,
example:
trace("");
craig.dance = true;
for (i in craig) {
trace("craig."+i +" = "+ craig[i]);
}
/* output:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 14: There is no
property with the name 'dance'.
craig.dance = true;
Total ActionScript Errors: 1
*/
Add the
dynamic
dynamic class Person2 {
Test the code again, and you see the following output:
craig.dance = true
craig.age = 32
craig.name = Craiggers
See also
class,
extends
148
Chapter 5: ActionScript Core Language Elements
dance
keyword to the Person2 class, so that the first line appears as follows:
, an error is generated, as shown in the following
Reported Errors: 1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents