Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-22-2011, 01:08 PM   #1
Registered User
Join Date: Apr 2011
Posts: 17
Default [AS2] combobox xml

in my xml i basically have this
HTML Code:
<image><colors> red1, blue1 </colors></image>
i can call it into flash with this where number is passed in a function
ActionScript Code:
colorlist1.addItem({cname:myImages[number].childNodes[3].firstChild, label:cname});

alright but my question is if there is a way to split this up so that when it is displayed in flash i get this:
and not this : red,blue

thank you for your response.
patrick123 is offline   Reply With Quote
Old 11-23-2011, 02:40 PM   #2
Registered User
Join Date: Apr 2011
Posts: 17

i have been able to split the result gotten using this bit of code
ActionScript Code:
function combobox(number) {     _root.mycolors = myImages[number].childNodes[3].firstChild;     _root.mysizes = myImages[number].childNodes[4].firstChild;         colorsplit = mycolors.nodeValue;     trace(colorsplit.split(","));     trace(colorsplit);     //add colors into combo box     colorlist1.addItem({cname:colorsplit.split(",",2).join("/n"),label:cname}); }

but all iget in the combo box is red1/nblue. it still refuses to go to a new line, how can i get it to go to a new line please...anybody
patrick123 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 08:01 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.