K ... got the combobox ... one lil bug in it :)

if you could help me figure this out … i’d appreciate it.

here’s the script i have for one of the comboboxes on the main timeline of the movie


onChange=function(fcombobox){
_root.mapview.gotoAndStop(divisions.getselecteditem().data);
}

i have data entered in the combobox as just a number … so it will gotoAndStop on whatever the number is corresponding to that frame within the mc named mapview … it’s instance name on the main timeline is map

i tried saying … _root.map.gotoAndStop … as well … but that’s not working either … what am i doing wrong … i can post an example if necessary . but the file is kinda large :slight_smile:

also … one thing i just thought of … in the mc “mapview” i have all the frames labeled with their names … exactly as they are in the labels for the combobox. is it possible to write a script that goes to the frame with the label corresponding to the selected name in the combobox … or would it just be easier to tell it to go to a frame number like i’m currently trying to do? :slight_smile:

frame labels are usually best. If you labels on your combobox correspond exactly with your frame names, then…


onChange=function(fcombobox){
_root.mapview.gotoAndStop(fcombobox.getselecteditem().label);
}

Note two things. If the instance name of your combobox is division, you could just say onChange=function(division){
etc…

notice I changed division to fcombobox… for the same reason.

Try to trace the value just to check

onChange=function(fcombobox){
    trace (divisions.getselecteditem().data);
    _root.mapview.gotoAndStop(divisions.getselecteditem().data);
}

And if divisions is the name of your combobox, then your function should be:

onChange=function(fcombobox){
    _root.mapview.gotoAndStop(fcombobox.getselecteditem().data);
}

Cheers.

pom :asian:

:stuck_out_tongue: You’re getting faster, Inigo… :cowboy:

Hey man! How are you?

Im boooooooooooooooooooored! Just got a new assignment for a site. We’ll see how it goes!

So-so… exams are coming really fast, I don’t know anything, I flash too much, and I’m going to have a head ache for 3 weeks after all the C++ I have done this week. That language is just too much trouble for me.

So, what’s the site about? And does it mean you’ve just finished one? Can we see it :slight_smile:

all the stuff I’ve done is Internal for a financial institution, so they dont let us share. I am doing a new site for a development company. I just got it today. I did another one a looooooooong time ago in html, but it is just funny dreamweaver stuff. Very outdated the moment I finished it.

Naahh, don’t be so modest.

Man I really have to work on my site. I have a few ideas, but it’s all messy and pretty much impossible to do. It’s really frustrating, so I guess I’ll leave that for later, when I have time…

So what about that prototype? :stuck_out_tongue:

prototype sounds right… Im trying to get the cobwebs out of my head. My first thought was a couple of functions. I guess the trick is that it should invoke onpress and onEnterframe in order to work correctly. Right? Sounds right… :slight_smile:

i did the trace like you said pom … and it returned nothing … what do i do?

here’s the code i have on the frame containing the combobox instance


//this is the control funtion for the Divisions combo box
onChange = function (divisions) {
	trace (divisions.getselecteditem().data);
	_root.map.gotoAndStop(divisions.getselecteditem().label);
};

did you try what I said, shuga? You said the labels matched the frame names.

However, like Pom said… if your trace is not showing a value, something else is wrong. Check your change handler and the name of your instances.

i did try what you said inigo … when i do that … do i erase the data values for the combobox? or leave them as frame numbers like they were?

can i email you the file … its 1.81 mb?

running away
You take it, Inigo!! :stuck_out_tongue:

hhahahah… you can just leave them, Shuga. It should work. If you have problems with it, email to me at iammontoya@hotmail.com and let me know here that you did that, please. :slight_smile:

Pom, you crack me up. I keep refreshing to see if you’re prototype comes up… I think Im too fried today! hahah

i just sent it … go get it quick before hotmail clears your inbox b/c the file is so large :slight_smile:

thanks very much for your help

nothing there. zip before you send, shuga, plus I should plenty of space available.

Well Inigo, I kept refreshing to see if YOU had posted it :stuck_out_tongue:

i had to upload it to one of my servers b/c the filesize was too large for your box :slight_smile:

http://www.roughedout.com/newTour.fla

Hi,
I’m trying to load a couple of .swfs into a main swf. I wan to drop it into a target movieclip. This is all I have

function movieSelector() {
loadMovieNum(comboBox.getSelectedItem().data, 2);
}
stop();

but this drops it into a level. Anybody got any ideas?

Thanks

well, this one fell through the cracks. I wonder if it was resolved?