Trying to create a List Class instance and having trouble. The list shows up
on the stage, but the variable returned from createClassObject is null, so I
cannot change the format or reposition it.

This code is based on an example in the Mook Essential ActionScript book.
The List composnent is in the Library and placed on frame after the classes
have loaded.

// -------- begin code snippet

import mx.controls.List

var listText:List;

clip_mc = parent_mc.createEmptyMovieClip( "clip", parent.getNextHighestDepth()
);
listText =   clip_mc.createClassObject(List, "listText_lst",
clip.getNextHighestDepth() );

// these commands have no effect -- debugger shows that listText is null.
listText.setSize(550, 150);
listText.move(listText.x+50, listText.y+50);


Any thoughts?

Thanks,

August

--
---------------------------------------------------------
--------------------------------------------------------

August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

---------------------------------------------------------
--------------------------------------------------------
_______________________________________________
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

Reply via email to