Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Array property of MoveClip subclass problem

Array property of MoveClip subclass problem

2004-03-12       - By Ingo Weiss

 Back
Reply:     1     2     3     4  

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.