  | |  | Array property of MoveClip subclass problem | Array property of MoveClip subclass problem 2004-03-12 - By Ingo Weiss
Back I am having a strange problem that I finally narrowed down to this:
In a movieClip subclass, I have a property "test" of type Array:
class testClass extends MovieClip {
// properties: var test:Array = new Array();
// constructor: function testClass() { test.push("hi"); onRollOver = function(){trace(test)}; }
}
Now if I place 3 instances of the clip on the stage, first of all "test" doesn't show up in the Debugger's "variables" pane (why?). Then, I would expect the "test" of each instance to have one member, "hi". Instead, they have 3 (one for each instance, ["hi", "hi", "hi"])? it's as if the instances would share one property "test". Why is that?
Thanks for any help!! Ingo
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106718 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |