switching frames in side by side movieclips  
Author Message
Jakewho





PostPosted: 2007-11-3 8:07:42 Top

flash-actionscript, switching frames in side by side movieclips 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

 
kglad





PostPosted: 2007-11-3 10:17:00 Top

flash-actionscript >> switching frames in side by side movieclips as2 or as3? are your buttons true buttons or movieclip buttons?
 
Jakewho





PostPosted: 2007-11-3 10:27:00 Top

flash-actionscript >> switching frames in side by side movieclips 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");
}

 
 
clbeech





PostPosted: 2007-11-3 10:42:00 Top

flash-actionscript >> switching frames in side by side movieclips 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');
}

 
 
Jakewho





PostPosted: 2007-11-3 20:20:00 Top

flash-actionscript >> switching frames in side by side movieclips 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





PostPosted: 2007-11-3 21:12:00 Top

flash-actionscript >> switching frames in side by side movieclips Do you have the second movieclip assigned the instance name, 'eventright' ?
 
 
Jakewho





PostPosted: 2007-11-3 21:30:00 Top

flash-actionscript >> switching frames in side by side movieclips 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,
 
 
Jakewho





PostPosted: 2007-11-3 21:32:00 Top

flash-actionscript >> switching frames in side by side movieclips ...and I am able to find this instance name in th target dialog box
 
 
clbeech





PostPosted: 2007-11-3 21:42:00 Top

flash-actionscript >> switching frames in side by side movieclips 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');
}

 
 
Jakewho





PostPosted: 2007-11-4 21:31:00 Top

flash-actionscript >> switching frames in side by side movieclips I gave up...

I moved everything into a single MC instead.

Thanks anyways