Re: [Flashcoders] ListBox component, get Data (2nd Value)?!

2006-09-02 Thread Marshall MacGillivray

When i have to add more than one data i like to use objects rather than
arrays like so


var obj:Object = new Object();
obj.name = foo;
obj.age = 18;
obj.weight = 500; //lbs pretty big !

lista.addItem ({label:Shown on list,data:obj});

// then to get the data.

age = lista.selectedItem.data.age;
name = lista.selectedItem.data.name;
isFat = (lista.selectedItem.data.weight  300); //boolean


Array's work too but i find objects easier to read but that's may just be.




On 9/1/06, Arul Prasad M L [EMAIL PROTECTED] wrote:


AFAIK, addItem takes only the label and ONE data element.

To save 2 data elements into the data part, you can make an array with
both
the values, and add that array as the data.

Like this:

lista.addItem(categorias[n + 1], [categorias[n + 0], categorias[n + 3]])

Now, to access the second element, you can access it as

lista.sellectedItem.data[1]

~Arul Prasad.

On 9/1/06, MJorge [EMAIL PROTECTED] wrote:

 Need a tiny help here folks,

 I have a listBox which i am inserting items with one label and two
values
 of
 data in it.

 Like this:

 lista.addItem (categorias[n + 1], categorias[n + 0], categorias[n + 3]);

 Now, how can i get the value of my data (2nd one) ?!

 At first i haded only one value in the data and was doing this:

 foto = _root.categoria1.lista.getItemAt (z).data;  (which was (is)
 working,
 but now i need to had another value, how can i get the second one?)

 Thanks,

 --
 
 Mário Jorge
 Icq: 164987050
 Msn: [EMAIL PROTECTED]
 Blog: http://www.beedigital.net/blog
 
 ___
 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

___
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





--
marshall.
___
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


RE: [Flashcoders] ListBox component, get Data (2nd Value)?!

2006-09-01 Thread Doug Coning
Try this: 
lista.addItem ({label:categorias[n + 1], data:categorias[n + 0], 
otherData:categorias[n + 3]});

Lista.selectedItem.otherData;



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MJorge
Sent: Friday, September 01, 2006 10:47 AM
To: Flashcoders mailing list
Subject: [Flashcoders] ListBox component, get Data (2nd Value)?!

Need a tiny help here folks,

I have a listBox which i am inserting items with one label and two values of
data in it.

Like this:

lista.addItem (categorias[n + 1], categorias[n + 0], categorias[n + 3]);

Now, how can i get the value of my data (2nd one) ?!

At first i haded only one value in the data and was doing this:

foto = _root.categoria1.lista.getItemAt (z).data;  (which was (is) working,
but now i need to had another value, how can i get the second one?)

Thanks,

-- 

Mário Jorge
Icq: 164987050
Msn: [EMAIL PROTECTED]
Blog: http://www.beedigital.net/blog

___
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
 
This e-mail and any attachment(s) are intended for the specified recipient(s) 
only and are legally protected.  If you have received this communication in 
error, please reply to sender's e-mail address with notification of the error 
and then destroy this message in all electronic and physical forms.
___
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


Re: [Flashcoders] ListBox component, get Data (2nd Value)?!

2006-09-01 Thread MJorge

Thanks for the reply, i will try that.

Many thanks,
Mário

On 9/1/06, Doug Coning [EMAIL PROTECTED] wrote:


Try this:
lista.addItem ({label:categorias[n + 1], data:categorias[n + 0],
otherData:categorias[n + 3]});

Lista.selectedItem.otherData;



-Original Message-
From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] On Behalf Of MJorge
Sent: Friday, September 01, 2006 10:47 AM
To: Flashcoders mailing list
Subject: [Flashcoders] ListBox component, get Data (2nd Value)?!

Need a tiny help here folks,

I have a listBox which i am inserting items with one label and two values
of
data in it.

Like this:

lista.addItem (categorias[n + 1], categorias[n + 0], categorias[n + 3]);

Now, how can i get the value of my data (2nd one) ?!

At first i haded only one value in the data and was doing this:

foto = _root.categoria1.lista.getItemAt (z).data;  (which was (is)
working,
but now i need to had another value, how can i get the second one?)

Thanks,

--

Mário Jorge
Icq: 164987050
Msn: [EMAIL PROTECTED]
Blog: http://www.beedigital.net/blog

___
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

This e-mail and any attachment(s) are intended for the specified
recipient(s) only and are legally protected.  If you have received this
communication in error, please reply to sender's e-mail address with
notification of the error and then destroy this message in all electronic
and physical forms.
___
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





--

Mário Jorge
Icq: 164987050
Msn: [EMAIL PROTECTED]
Blog: http://www.beedigital.net/blog

Working at: http://www.netliz.pt
___
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


RE: [Flashcoders] ListBox component, get Data (2nd Value)?!

2006-09-01 Thread Doug Coning
Sorry, try this:

trace(Lista.selectedItem.data);

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Coning
Sent: Friday, September 01, 2006 11:11 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] ListBox component, get Data (2nd Value)?!

Try this: 
lista.addItem ({label:categorias[n + 1], data:categorias[n + 0], 
otherData:categorias[n + 3]});

Lista.selectedItem.otherData;



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MJorge
Sent: Friday, September 01, 2006 10:47 AM
To: Flashcoders mailing list
Subject: [Flashcoders] ListBox component, get Data (2nd Value)?!

Need a tiny help here folks,

I have a listBox which i am inserting items with one label and two values of
data in it.

Like this:

lista.addItem (categorias[n + 1], categorias[n + 0], categorias[n + 3]);

Now, how can i get the value of my data (2nd one) ?!

At first i haded only one value in the data and was doing this:

foto = _root.categoria1.lista.getItemAt (z).data;  (which was (is) working,
but now i need to had another value, how can i get the second one?)

Thanks,

-- 

Mário Jorge
Icq: 164987050
Msn: [EMAIL PROTECTED]
Blog: http://www.beedigital.net/blog

___
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
 
This e-mail and any attachment(s) are intended for the specified recipient(s) 
only and are legally protected.  If you have received this communication in 
error, please reply to sender's e-mail address with notification of the error 
and then destroy this message in all electronic and physical forms.
___
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
 
This e-mail and any attachment(s) are intended for the specified recipient(s) 
only and are legally protected.  If you have received this communication in 
error, please reply to sender's e-mail address with notification of the error 
and then destroy this message in all electronic and physical forms.
___
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


Re: [Flashcoders] ListBox component, get Data (2nd Value)?!

2006-09-01 Thread Arul Prasad M L

AFAIK, addItem takes only the label and ONE data element.

To save 2 data elements into the data part, you can make an array with both
the values, and add that array as the data.

Like this:

lista.addItem(categorias[n + 1], [categorias[n + 0], categorias[n + 3]])

Now, to access the second element, you can access it as

lista.sellectedItem.data[1]

~Arul Prasad.

On 9/1/06, MJorge [EMAIL PROTECTED] wrote:


Need a tiny help here folks,

I have a listBox which i am inserting items with one label and two values
of
data in it.

Like this:

lista.addItem (categorias[n + 1], categorias[n + 0], categorias[n + 3]);

Now, how can i get the value of my data (2nd one) ?!

At first i haded only one value in the data and was doing this:

foto = _root.categoria1.lista.getItemAt (z).data;  (which was (is)
working,
but now i need to had another value, how can i get the second one?)

Thanks,

--

Mário Jorge
Icq: 164987050
Msn: [EMAIL PROTECTED]
Blog: http://www.beedigital.net/blog

___
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


___
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