Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-07-2002, 07:23 PM   #1
salud
Registered User
 
Join Date: Oct 2001
Location: earth
Posts: 84
Default combo box? (MX)

I have a movie with different layers and two of them are for combo box and labels, how can I use gotoAndPlay for specific frame according to a combo box selection: see example:

label layer:

contact1 (frame 5) contact2 (frame 10)

combo box:

option 0 select one
option 1 contact1
option 2 contact2


thanks,
salud
salud is offline   Reply With Quote
Old 06-08-2002, 02:02 AM   #2
leblob
Registered User
 
Join Date: May 2002
Location: France
Posts: 50
Default

let's say your combobox instance name is mybox

put this on your action layer , on frame 1 :
Code:
function myonchange(component){
	if (component._name=="mybox"){

		switch (component.getValue()){
			case 1 : _root.gotoAndPlay("contact1");
			break;
			case 2 : _root.gotoAndPlay("contact2");
			break;
		}
	}
}

mybox.setChangeHandler("myonchange");

stop();
hope this helps
leblob is offline   Reply With Quote
Old 06-08-2002, 02:27 AM   #3
salud
Registered User
 
Join Date: Oct 2001
Location: earth
Posts: 84
Default it did not work :-(

please see file

Thanks,
Salud
Attached Files
File Type: zip combo.fla.zip (76.7 KB, 186 views)
salud is offline   Reply With Quote
Old 06-08-2002, 01:08 PM   #4
leblob
Registered User
 
Join Date: May 2002
Location: France
Posts: 50
Default

*saw file*

in the properties/parameters of your combo box, you must not only fill up the labels field

[select one, contact1, contact2]

but also the data field
with :

[0,1,2]

this way each label goes with a value, just like the select box in html.

now it should work
leblob is offline   Reply With Quote
Old 06-08-2002, 01:56 PM   #5
salud
Registered User
 
Join Date: Oct 2001
Location: earth
Posts: 84
Default We are half way there :-)

Hey Leblob,

It did not work intirelly :-( Please check the file to see what's going on

* If you select contact 1 nothing happens but if you select contact 2 it will take you to contact1 in a weird way (the combo box disapears for a second)

Thanks,
Attached Files
File Type: zip combo.fla.zip (76.5 KB, 171 views)
salud is offline   Reply With Quote
Old 06-08-2002, 02:25 PM   #6
leblob
Registered User
 
Join Date: May 2002
Location: France
Posts: 50
Default

of course it does not work, you changed my code!

now your code is better, cause simpler, but if you want it to work, you must replace the

[0,1,2]

in the data properties of your combobox with :

[0,contact1,contact2]

because if you dont , if you choose contact1 it will send you to frame 1, and if you choose contact2 it will send you to frame 2.

and now it works (at least for me)
leblob is offline   Reply With Quote
Old 06-08-2002, 04:32 PM   #7
salud
Registered User
 
Join Date: Oct 2001
Location: earth
Posts: 84
Default thanks :-)

You were right... Now works just fine
salud is offline   Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash MX 2004 Combo box & asp Grizzly Components 2 09-22-2004 09:02 AM
combo box dcullinane Components 9 06-21-2004 11:08 AM
MX bug? (combo box problem) maxx Components 1 04-14-2003 12:57 AM
Flash MX Combo Box ? dolfan76 ActionScript 1.0 (and below) 1 09-18-2002 08:50 AM
populate a combo box in Flash MX joeyzeri ActionScript 1.0 (and below) 1 03-30-2002 11:21 PM


All times are GMT. The time now is 09:14 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.