FORUMS: list search recent posts

mouse events on movie clips

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael Wilfong
mouse events on movie clips
on Dec 22, 2005 at 3:44:21 pm

hello out there...I'm a flash beginner with little to no experience other than watchin a 14hour cd-rom from lynda.com...

I'm trying to set up a flash site and have 5 movie clips...I want to be able to click on one movie clip instance and have the 4 others
shrink and mask out while moving off to the side...Can this be done with BASIC beginner scripting???

Like i said...I'm a begginer, especially with code...

Thanks for any help...
M.w>


Return to posts index

Richard
Re: mouse events on movie clips
on Dec 22, 2005 at 10:07:25 pm

Easiest way is to simply tell the other MovieClips what to do by playing the timeline.

Simply set up a timeline in each clip to get larger or grow. Then tell it where to start playing in the timeline.

Lets say your MovieClips are set up like this..

_root.button01
_root.button02
_root.button03
_root.button04
_root.button05

Here's the code to create a MovieClip to act like a button.

_root.button01.onRelease = function() {
//grow by using the timeline
_root.button01.gotoAndPlay(1);
};

So, if your telling button01 to go to a spacific place in the timeline, which animates it to "Grow", then you can also tell other movie clips to "Shrink" telling them to go to another part of their timelines that animates it shrinking.

_root.button01.onRelease = function() {
//grow by using the timeline
_root.button01.gotoAndPlay(1);
//shrink the others using the timeline
_root.button02.gotoAndPlay(12);
_root.button03.gotoAndPlay(12);
_root.button04.gotoAndPlay(12);
_root.button05.gotoAndPlay(12);
};

This can all be done via AS, however, this is the fastest way to learn about targeting.

Hope this helps

-Richard












Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]