The constructor for TextFormat() would have to be called before your class was ready to be instantiated. Class properties can only be initialized with primitives outside of a constructor -- and the wierdness inherent in assigning arrays in a property definition means that just about all initalization of properties should occur either in a constructor or within an initialization function.
> > From: "Mendelsohn, Michael" <[EMAIL PROTECTED]> > Date: 2006/06/27 Tue AM 11:04:27 CDT > To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com> > Subject: [Flashcoders] init TextFormat prop in a class > > Hi list... > > Why is it that when I try to init a prop for my class, I get this error: > "A class's instance variables may only be initialized to compile-time > constant expressions." > What exactly does that mean? > > Thanks, > - Michael M. > > class test{ > private var tf:TextFormat = new TextFormat(); > function test(){ > trace("hello"); > } > } > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 > -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) _______________________________________________ Flashcoders@chattyfig.figleaf.com 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