connect 3 combobox
Greetings experts,
I'm beginner in AS3 and I want to make a JOB Classification Application by changing from frame to another in one and same scene using combobox. every frame has a data.
I made 3 comboboxes and success to connect combobox1 to combobox2 by write actions of moving from frame to frame as writed below, but I failed to continue in connecting the combobox2 to combobox3. Can anyone help please?
I used simple actions here as a rookie prograammer:
import flash.events.Event;
import flash.events.MouseEvent;
import fl.controls.ComboBox;
combobox1.addEventListener(Event.CHANGE, changeFrame);
function changeFrame (event:Event):void
{
if (combobox1.selectedItem.label == "General Employee")
gotoAndStop (2);
else if (combobox1.selectedItem.label == "Education Employee")
gotoAndStop (3);
else if (combobox1.selectedItem.label == "Health Employee")
gotoAndStop (4);
}
combobox2.addEventListener(Event.CHANGE, changeFrame1);
function changeFrame1 (event:Event):void
{
if (combobox2.selectedItem.label == "Employee")
gotoAndStop (5);
else if (combobox2.selectedItem.label == "Semi-Employee")
gotoAndStop (6);
else if (combobox2.selectedItem.label == "Contracted")
gotoAndStop (7);
if (combobox2.selectedItem.label == "Teacher")
gotoAndStop (8);
else if (combobox2.selectedItem.label == "Adminstrator")
gotoAndStop (9);
}
combobox3.addEventListener(Event.CHANGE, changeFrame2);
function changeFrame2 (event:Event):void
{
if (combobox3.selectedItem.label == "1st Level degree 1")
gotoAndStop (10);
else if (combobox3.selectedItem.label == "1st Level degree 2")
gotoAndStop (11);
else if (combobox3.selectedItem.label == "1st Level degree 3")
gotoAndStop (12);
}
and so on like this,
The problem is: the second combobox didn't work and go to the 3rd combobox in choosed frame, why?
Also this error appears:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at prog2_Scene2_fla::MainTimeline/frame1()[prog2_Scene2_fla.MainTimeline::frame1:49]
*Second Part:
In the end of choices the is a number appear (Num1), I want to put this Num1 in Math actions, e.g: Num1 * 30% + Num2 = output field (RESULT), How can I make this?
Thanx in advanced
Ritchy GH
