Can anyone tell me how I can make a combo box that navigates to different frames within a movie? I have different sections of my movie on different frames all on the same movie and I want to be able to navigate through the movie by using the combo box.
Click the combobox; make sure it has an instance name;
While the combobox is still selected, go in the actions panel and enter:
on (release) {
_root.instance_name.setChangeHandler("the_name_of_a_function ");
}
Create a layer called Actions. Clip on the first keyframe and go to the actions panel. Enter the function procedure that wil respond to whatever you want it to do :
function the_name_of_the_function () {
if (root.instance_name.getValue() == Data_value) {
gotoAndPlay( Scene_name ,*frame#* ) ;
} else if (_root.instance_name.getValue() == other Data_value) {
…
}
}
I’m sorry but I couldn’t get your scripting to work. Could you please explain it clearer because I am a novice at flash. I keep getting sytax errors using the scripting and I don’t know what I should be doing. All I know is that I have four frames (on the same timeline) that I’d like to use the combo box to navigate through. Each frame contains info and pics and I’d like the end user to be able to navigate freely to which ever frame they choose. HELP HELP HELP!!!
Thanks a million for the file! I copied it into my project and it worked when I perform a Test Scene. However when I publish it in the windows projector, it just loops me right back to the beginning of my presentation. Why is that? Specifically for my purposes, I placed the combo box on frame 71 of scene 12 in my project. I need it to navigate to frames 71, 72, and 73 of the same scene. What do I need to do to make it work? I changed the data so the numbers are 71, 72, & 73 instead of 1,2, &3. Is that what I am supposed to do? I don’t understand why making a combo box is so difficult but what you did is exactly what I need.
I figure I better paste on the script for anyone else that can help my dilema. Once again, I need to be able to navigate between frames 71, 72, and 73 in scene 12.
goFrame = function () { _root.gotoAndStop(goCB.getSelectedItem().data);};
stop();
I changed the data numbers to reflect these frame numbers, however I suspect that it is looping back to the beginning because it thinks the formula means scene 1 frame 71 etc…
I’m soooo stuck. I noticed the crazy amount of scripting the actual box has attached to it but I don’t know if that has to be altered to get this to work.
Here is a really basic sample of what I am trying to accomplish. In it, I don’t use the combo box navigational tool until the second scene. For my real project, it doesn’t appear until the twelveth scene and navigate to different frames within the scene. In the sample I created a problem arises when I try to navigate just to frame 1. It points me back to scene 1. Also, the combo box labels don’t match exactly what is on the stage. It will say Frame 3 but the stage will say Frame 2. In my real project, this doesn’t happen; instead when i try to navigate I go from scene 12 back to scene 1 at the very beginning. I’m so stuck and am open to any suggestions. Thanks!
For example, you have 1 frame in scene 1 and 5 frames in scene 2… When the code is compiled, Flash gets rid of all the scene and creates a one long 6 frame movie file… So, the frame 2 in scene 2 actually becomes frame 3 when published… Are you with me so far???
So, when you choose frame 3 from the combobox, it is actually getting the data ‘3’ and tries to go to the frame 3 of the movie which says ‘frame 2’ of the scene 2… Make sense???
To solve this, you can either change the data for the combobox to be 2,3,4,5,6 instead of 1,2,3,4,5, or ‘Fr1’, ‘Fr2’, ‘Fr3’, ‘Fr4’, ‘Fr5’ and define frame labels according to that string…
Before I let you go, you gotta repeat after me…
SCENE BAD!!! FRAME LABEL GOOD!!!
SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD! SCENE BAD, FRAME LABEL GOOD!!!
IT WORKS NOW!!! THANK YOU SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MUCH!!! I’VE BEEN IN AGONY FOR FOUR DAYS OVER THIS AND NOW I CAN SEE A LIGHT AT THE END OF THE TUNNEL! YOU ARE A GENIOUS AND A SAVIOUR!!! THANKS FOR TAKING THE TIME TO HELP ME OUT AND REPLY! I TRULY APPRECIATE IT!!! KEEP UP THE GREAT WORK! I WILL HAVE A GOOD DAY TODAY AND I HOPE YOU WILL TOO!
Glad that you got it working… Remeber what you just yelled… I believe you will get into lot bigger trouble than this later on, but keep in mind that scenes are just for your visual pleasure… Alrighty??? :elderly:
Creating engaging and entertaining content for designers and developers since 1998.