Skip to main content
Inspiring
June 29, 2006
Question

Buttons open same mc, but link to different layers

  • June 29, 2006
  • 2 replies
  • 189 views
I have 2 buttons on an interface, on the root timeline which play the same animation (of the interface disappearing) in a mc. But i would like to have them open they're 2 respective layers at the end of the animation.

ie one button could be to "Contact us" which would play the closing of the interface animation and then open up a layer on level 2 called contactus.swf

if you had pressed another button called "Portfolio" it would play the closing of the interface animation and then open up a layer on level 2 called portfolio.swf

(the reason im asking is because I'll have a lot more than 2 of these buttons happening and was wondering if i could use one animation rather than may duplicated versions of the same aniamtion)

thx in advance.
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
June 30, 2006
no, nextSWF is the name of the swf file that's to be loaded after the animation plays.
kglad
Community Expert
Community Expert
June 30, 2006
you wouldn't be opening a layer. you would be loading a swf into _level2.

and yes, you could have all your buttons play the same closing sequence and then direct the appropriate swf to load.

one way to do this would be to have each button define a variable (say nextSWF) and use that variable in a loadMovieNum() statement. for example:

Inspiring
June 30, 2006
sorry, been mucking around too much in Photoshop, i meant level not layer, please forgive me :)

so nextSWF is the mc's instance name? cause im not seeing how the code is playing the mc with the animation in it