Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-10-2012, 11:30 PM   #1
Join Date: Aug 2011
Posts: 79
Default [AS3] Combobox numerical values

I currently have 2 combo box on stage. I have added all the labels and some data to these combo boxes, through properties tab. what I want to do is a mathematical operation with the numerical values assigned to each label in the combo box, so I can for example multiply the numerical value assigned to a label in the first combo box and multiply it by another numerical value in the second combo box.
How can I do this?
Thanks in advance!
Nando88 is offline   Reply With Quote
Old 08-10-2012, 11:50 PM   #2
Join Date: Aug 2011
Posts: 79

I found the answer to my problem:

var out1:int;
out1=Number(cb2.selectedItem.data) + Number(cb1.selectedItem.data);

Where cb1 and cb2 are combo boxes.
Nando88 is offline   Reply With Quote
Old 08-22-2012, 03:20 AM   #3
Registered User
Join Date: Aug 2012
Posts: 1

yeah itis true and how can i make it better?
puresns 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 05:23 AM.

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.