MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 31

Actionscript language reference
Table of Contents

Advertisement

trace("foo");
};
var b:Function = function() {
trace("foo");
};
a(); // foo
b(); // foo
trace(a!=b); // true
a = b;
a(); // foo
b(); // foo
trace(a!=b); // false
// trace statement output:
foo
foo
true
foo
foo
false
The following example illustrates comparison by reference with two arrays:
var a:Array = [ 1, 2, 3 ];
var b:Array = [ 1, 2, 3 ];
trace(a); // 1, 2, 3
trace(b); // 1, 2, 3
trace(a!=b); // true
a = b;
trace(a); // 1, 2, 3
trace(b); // 1, 2, 3
trace(a!=b); // false
// trace statement output:
1,2,3
1,2,3
true
1,2,3
1,2,3
false
See also
! (logical
NOT),
!== (strict
inequality),
&& (logical
AND),
|| (logical
OR),
==
(equality),
===
(strict equality)
!= (inequality)
31

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents