connect 3 combobox


greetings experts,

i'm beginner in as3 , want make job classification application changing frame in 1 , same scene using combobox. every frame has data.

i made 3 comboboxes , success connect combobox1 combobox2 write actions of moving frame frame writed below, failed continue in connecting combobox2 combobox3. can please?

i used simple actions here 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 on this,

the problem is: second combobox didn't work , go 3rd combobox in choosed frame, why?

 

also error appears:

typeerror: error #1009: cannot access property or method of null object reference.

@ prog2_scene2_fla::maintimeline/frame1()[prog2_scene2_fla.maintimeline::frame1:49]

 

 

*second part:

in end of choices number appear (num1), want put num1 in math actions, e.g: num1 * 30% + num2 = output field (result), how can make this?

 

thanx in advanced

ritchy gh

@ prog2_scene2_fla::maintimeline/frame1()[prog2_scene2_fla.maintimeline ::frame1:49]

line 49 of code , report says there



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account