PDA

View Full Version : Linking Between MovieClips



V1SHAL
02-04-2007, 05:44 PM
Hello....

I know there is a very simple solution for this, but I'm not competent enough with ActionScript to be able to resolve this issue.

This is what I want to accomplish:
Have a mouse press event (i.e. a click) on a encompassing movie clip's constituent movie clips effect which frame of another movie clip is displayed (presumably through the gotoAndStop method).

The best way to visualize this is by considering a picture gallery. Imagine a "thumbnail viewer" at the top of a document. When one thumbnail is clicked it changes which frame of the picture window changes (assuming each frame has another picture corresponding to the thumbnails).

I hope that explains it well.
I'd appreciate all help.

Thank you!

BLiZZaRD
02-04-2007, 06:32 PM
You have your MC we will call it "thumb" you want to click on "thumb" and have the MC we will call "photo" go to a new frame? Is that right?

Simple enough.. add this to the actions panel of "thumb"



on(release){
_root.photo.gotoAndStop(2);
}


where the "2" is which ever frame you want it to go to.

If you want to use the same button to progress through the frames (i.e. click "thumb" to make "photo" go to frame 2, them frame 3, then frame4...) You need to set it up to tell it to go to the next frame. Still pretty simple:



on(press){
_root.photo.nextFrame();
}


and you can have on another button:



on(release){
_root.photo.prevFrame();
}


Either way works, depending on your needs. :D

V1SHAL
02-04-2007, 07:20 PM
Thanks...

worked like a charm
i knew there was something simple

my biggest issue was that i was misplacing the actionscript (i.e. it was outside the movie clip object)

BLiZZaRD
02-04-2007, 07:25 PM
Welcome! Glad its working for you now! :D