flash actionscript:
I have a flash file with a combobox component in the first scene. I can code to navigate between scenes with this combobox, but If I put the box on say the second scene, I can not navigate from there. I guess my question is, why can I navigate from the first scene, but not back to the first scene with my combo box??? Here is the code I have on the first scene. combo = new Object(); combo.change = function(){ var x = comboBox.selectedItem.label if(x == 'test'){ gotoAndStop('test, 1'); } if(x == 'test2'){ gotoAndStop('test2', 1); } if(x == 'test3'){ gotoAndStop('test3', 1); } } comboBox.addEventListener('change',combo); this works...shouldn't I be able to add this code on the other scenes and navigate around like a jump menu??? Hope you understand the question...I'm not sure I'm explaining it well. Thanks in advance... Mike
Don't navigate by Scenes. Instead, give the first frame of each Scene a Frame Label (Eg: Frame 1,Scene 1:"fs1";Frame1,Scene2:"fs2",etc...). Then, in your comboBox, put in the frame labels you made for each scene as the choices in your comboBox. Then, in your script, you can use something like: gotoAndStop("fs1"); And, to simplify your script a whole bunch: combo = new Object(); combo.change = function(){ var x = comboBox.selectedItem.label gotoAndStop(String(x)); } comboBox.addEventListener("change",combo);
Don't see what you're looking for? Try a search.
|