List Box, UI Components and Away3d

13 views
Skip to first unread message

Amarnaman

unread,
Jan 30, 2010, 5:24:26 PM1/30/10
to Away3D.dev
Hi all,

I've been playing around with using standard UI components in Away3D
projects (pure as3 no Flex) and I've hit a problem. Buttons and text
boxes are fine but I can't seem to get a list box to appear as a child
member of a sprite. I'm trying the mx.controls.List import route and I
can create what appears to be a functional list box whose data is
populated by an XML document. Tracing through in debug mode appears to
show the list being created with the data and I then add it to a
sprite that acts as my dialog box using the standard addChild method
call. However, the list box is missing from the view. Does anyone know
either what I'm doing wrong or can suggest an alternative method?

Here's the code (where dialogBox is a sprite initialised earlier):

var newNode:XML = <test/>;
newNode.name[0] = "1st line";
newNode.name[1] = "2nd line";

myList = new List();
myList.editable = false;
myList.dataProvider = newNode;
myList.width = 250;
myList.height = 80;
myList.buttonMode = true;
myList.selectable = true;
myList.y = 30;
myList.x = 25;

dialogBox.addChild(myList);

Thanks in advance!

Yvan.

Rob Bateman

unread,
Feb 2, 2010, 3:59:30 PM2/2/10
to away3...@googlegroups.com
Hey Yvan

difficult to see whats up from here - can you give more detail? maybe send over a quick test fla? for us to test?

Rob
--
Rob Bateman
Flash Development & Consultancy

rob.b...@gmail.com
www.infiniteturtles.co.uk
www.away3d.com
Reply all
Reply to author
Forward
0 new messages