|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with variables in a menu
I have created a menu with 5 buttons and each button has an associated movie clip.
The problem I am having is being able to set each menu button to play the clip and then when the next button is clicked to clear the mc that is showing and play the movie clip associated with the button just clicked. Someone told me to use variables but I am not sure how to do that. I am using Flash MX. Any help greatly appreciated. Thanks |
|
#2
|
|||
|
|||
|
are the clips you want to play all on the stage or do you want to attach them from the library when they're needed?
|
|
#3
|
|||
|
|||
|
Great question! Which will run faster or more efficiently? It doesn't really matter except that whatever way runs better or if possible keeps file size down is preferable.
I assume running from library has not effect on the swf file size since it is still part of the file whether it is in the library or on stage. In any event thanks for the response. |
|
#4
|
|||
|
|||
|
you're right - if the clips are in the library it won't affect file size - if they are large though, you could have them as seperate swfs loaded with loadMovie - thats the best thing to do if the clips contain music or bitmaps or anything bulky....if you had three seperate swfs to be loaded by the buttons you could make a container mc on the main stage to load them into and code it like this (all on the main timeline):
Code:
button1_mc.onRelease = function() {
container_mc.loadMovie("movie1.swf");
}
button2_mc.onRelease = function() {
container_mc.loadMovie("movie2.swf");
}
button3_mc.onRelease = function() {
container_mc.loadMovie("movie3.swf");
}
and put those swfs in the same directory as your main movie |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Help with variables in a menu |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|