This
is what I have come up with (thanks to Mike Chambers et al for
stringUtils.as)
on(click) {
this._parent.region_ds.previous();
var i:Number = 0;
var selectItem:String = this._parent.region_ds.R_STATE.rtrim();
var cbLen:Number = this._parent.r_state_cb.length;
while (i < cbLen && this._parent.r_state_cb.getItemAt(i).data != selectItem) {
i++;
}
this._parent.r_state_cb.selectedIndex = i;
}
this._parent.region_ds.previous();
var i:Number = 0;
var selectItem:String = this._parent.region_ds.R_STATE.rtrim();
var cbLen:Number = this._parent.r_state_cb.length;
while (i < cbLen && this._parent.r_state_cb.getItemAt(i).data != selectItem) {
i++;
}
this._parent.r_state_cb.selectedIndex = i;
}
is
there a better/easier way to do this?
--------Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Andrew Mercer
Sent: Thursday, 6 November 2003 11:57 AM
To: Flash Developers List
Subject: [fugli] FMX04proI am still struggling with combobox -I have a combobox and have populated data and labels, egdata: wa, sa, qld ...label: Western Australia, South ...what I would like to do is programaticly select at item in the combobox, i.e. I have a variable = wa, I want to make Western Australia selected.Is there a method to do this, or do I have to loop through the contents looking for a match? Either way, can some once send me or point me to some code.TIA
Regards,
Andrew Mercer
Senior Developer
Power Business Systems
7 Aberdeen Street
Perth WA 6000
T: +61 8 9221 1182
F: +61 8 9325 5198
E: [EMAIL PROTECTED]
W: www.power.net.au
Speak with us today about Skillsoft e-Learning, and how an integrated e learning solution
can deliver tangible results for your training program.
SkillSoft is the world's largest e-Learning provider. www.skillsoft.com
CAUTION -This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Power Business Systems immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Power Business Systems.
---
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
