Hi!

I've got a class that is linked to a symbol, and I'm instantiating it within
a parent class.

var myComment:Comment = new Comment(
    _level0.comments.attachMovie("CommentSymbol","comment",1), // attach
Symbol associated with this class
    ADOdata.queryResults // send query results to be parsed
    );

The Comment class has a constructor that calls super and then initialized
some variables.  I run a trace inside the constructor like so:

  trace("this comment's id is " + this.commentXML.getNodeValue
("comment_id"));
  trace("this _x is " + this._x);

and I get this:

  this comment's id is
  this _x is 0
  this comment's id is 48
  this _x is undefined

It seems that the constructor is being called *twice*.  It seems that the
first time, the object is associated with the Movieclip and not the class.
The second time, the object is associated with the class and not the
Movieclip.

Is this normal behavior?  How do I prevent the Constructor from being called
twice, and from values being assigned as undefined?

Thanks!
Geoff
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to