Skip to main content
November 3, 2007
Question

switching frames in side by side movieclips

  • November 3, 2007
  • 9 replies
  • 567 views
I have a single scene, which contains side by side movieclips. The movieclip on the left contains a series of buttons. I would like to have these buttons control which frame of the movieclip on the right side of the screne is displayed. Please help.

Thanks,

Michael
This topic has been closed for replies.

9 replies

November 4, 2007
I gave up...

I moved everything into a single MC instead.

Thanks anyways
clbeech
Inspiring
November 3, 2007
hmmm ... this should be working then. you may want to try putting the code for the handler on the timeline. In the MC (either) that contains the button (give and instance name) target the button, make an actions layer and try:

the_btn.onRelease = function() {
_level0.eventright.gotoAndPlay('lucyframe');
}
November 3, 2007
...and I am able to find this instance name in th target dialog box
November 3, 2007
Yes. I have assigned the instance name "eventright" to the movieclip on the right. This is the movieclip which contains the two frames I am trying to switch between.

Thanks,
clbeech
Inspiring
November 3, 2007
Do you have the second movieclip assigned the instance name, 'eventright' ?
November 3, 2007
Hmmm...I still can't quite get it to work correctly. I have been experimenting a little more...

I added a button inside of the movieclip on the right (eventright) and I used the following code to switch from frame 1 to frame 2 of the that same movie clip:

on (release) {
gotoAndPlay("lucyframe");
}

This code worked correctly. Then I tried to perform the same action with the same button, but by referencing back to the "root":

on (release) {
_root.eventright.gotoAndPlay("lucyframe");
}

This did not work. So I am guessing that the problem is that I am not correctly referencing the target.

Any thoughts?

Thanks
clbeech
Inspiring
November 3, 2007
I think that if your buttons are within a movieclip (on the left) you will need one more level of depth to reach the main timeline (ie. one more '_parent') and complete the path. However it would be easier to reference the lowest level then the MC by calling:

on(release) {
_level0.eventright.gotoAndPlay('lucyframe');
}
November 3, 2007
I believe I am using as2. When I select the symbol it displays the button logo, so I am assuming that they are true buttons and not movieclip buttons. The code I am trying to use right now is:

on (release) {
this._parent.eventright.gotoAndPlay("lucyframe");
}
kglad
Community Expert
Community Expert
November 3, 2007
as2 or as3? are your buttons true buttons or movieclip buttons?