PDA

View Full Version : Using a Movieclip as a button within a movieclip


BREK
11-15-2002, 12:29 AM
Maybe you guys can help me. I'm stuck now. I don't think it's a hard problem I just can't seem to get it to work.

I have a Movie Clip called "Pages". In this I have movieclips that when clicked make an external movieclip called "PageR" goto a certain frame, so it can display the contents. I also have a movieclip called "currentselection" that highlights the clicked movieclip.


The code I am stuck on is this.

on (press)
{

_root.Pages.currentselection._x=(-384.6);
_root.Pages.gotoAndStop(11);
_root.PageR.gotoAndStop(27);

}

for some reason it will not do all of these instructionsThe code that doesn't work is "_root.PageR.gotoAndStop(27);" This is supposed to Make the right hand side of my webpage goto a certain frame which has the content in. Each frame is essentially a different page. It works for the other movieclips, but not for my right arrow movieclip.
WHY.?

I'd really appreciate some help. My brain is about fried.
If I'm not making mayself clear, just tell me what you want to see and I'll do my best to show you.

BREK..

BREK
11-15-2002, 12:51 AM
Hee hee....

Okay I haa one more shot at it... I turned the right and left arrows into buttons and copied the code I had before into these, and it works fine now. :)

I don't understand why it works with buttons and not movie clips though.

Anyone know why?

matt poole
11-15-2002, 08:57 AM
on (press) is a button event ie only works on buttons...

... to trigger events on a movie clip you need to use the onClipEvent handler.

;)