Web Design and Development Forums

Help! Flash CS3 - Combo Boxes with formulas

This is a discussion on "Help! Flash CS3 - Combo Boxes with formulas" within the Flash & Multimedia Forum section. This forum, and the thread "Help! Flash CS3 - Combo Boxes with formulas are both part of the Design Your Website category.


Go Back   Webforumz.com > Design Your Website > Flash & Multimedia Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Apr 2nd, 2008, 02:43   #1 (permalink)
Up'n'Coming Member
 
Join Date: May 2007
Location: Tamworth
Age: 30
Posts: 97
Send a message via MSN to cocoonfx
Help! Flash CS3 - Combo Boxes with formulas

Hello


I am trying to get a stupid combo box to work in flash cs3. All i want to do is have a couple of combo boxes which when i select an option it then performs a calculation.

i.e

Combo 1 = Age

10 - 15

Combo 2 = Gender

Male

The formula

If (Combo 1 == "10 - 15" && Combo 2 = "Male"){
answer.text = 10*10;
}

I have managed to create a combo box which when i select the Gender i can get the answer.text to show Male or Female, but i can not get the formula to work and then when i add a second combo box the who .fla comes up with errors.

Before in Action script 2 i can easily do formulas i.e

var cal:Number=Number(10*10);
var sum=cal;

but i want to use Action script 3.

Does anyone know where i can find a tutorial which uses a combo box to do a formula or can any one assist?

Here is the code i am using at the moment:

import fl.controls.ComboBox;
import fl.data.DataProvider;



var sGender:Array = new Array(
{label:"Male",
data:"Male"},
{label:"Female",
data:"Female"}

);



var aCb:ComboBox = new ComboBox();
aCb.dropdownWidth = 100;
aCb.width = 100;
aCb.move(208, 46);
aCb.prompt = "Gender";
aCb.dataProvider = new DataProvider(sGender);
aCb.addEventListener(Event.CHANGE, changeHandler);

addChild(aCb);

function changeHandler(event:Event):void {

if(aCb.value =="Male"){

txttest.text="Male" ;
}
if(aCb.value =="Female"){
txttest.text="Female";
}

}
__________________
regards - Cocoonfx -www.cocoonfxmedia.co.uk
cocoonfx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
6-level combo boxes Phoenix1664 JavaScript Forum 2 Mar 21st, 2007 12:22
How do I add a GO button to these multi combo boxes? Andy K JavaScript Forum 4 Jul 29th, 2005 20:03
grabbing data from combo boxes benbacardi ASP Forum 2 Jan 25th, 2005 13:46
Annoying Linked Combo Boxes!! Hangs ASP Forum 7 May 25th, 2004 07:21



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 19:23.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59