Groups | Blog | Home
all groups > flash actionscript > august 2006 >

flash actionscript : Button embedded in MC (Call gotoAndPlay)


cinemaguy
8/15/2006 12:28:18 PM
not sure if this helps but have your tried
on (rollOver) {
_root.scrollmc.gotoAndPlay(2);}
or
on (rollOver) {
_root.panel.scrollmc.gotoAndPlay(2);}

it just depends on where it is located.
MoonPilot
8/15/2006 7:08:06 PM
Well, I have a MC named "panel". Inside "panel" are multiple buttons. One
button is named "nflbut". When the panel MC is loaded the individual buttons
scroll across the screen and stop via mouseover. I want to use AS for a
rollover of "nflbut" which will gotoAndPlay another MC (textmc) below the
button. Essentially a textual description of the bottom that's listed below
when rolled over. Simple enough, but it's got me.

Here's the simple script for the "nflbut" as I have it now:

on (release) {
getURL("http://www.somewhere.com/nfl", "_self");
}
on (rollOver) {
scrollmc.gotoAndPlay(2);
}
aniebel
8/15/2006 8:40:34 PM
you could do it this way:

If I understand you correctly, on your main timeline, (assuming your panel mc
exists there), in a layer titled "actions" put this code:

this.panel.nflbut.onRollOver = function(){
this._parent.textmc.gotoAndPlay(2);
};

But that is assuming that the textmc is located in the panel mc. Where is the
textmc located?

AddThis Social Bookmark Button