all groups > flash actionscript > july 2004 >
You're in the

flash actionscript

group:

image sliding on rollover


image sliding on rollover cjcd
7/20/2004 7:55:04 PM
flash actionscript:
I'm trying to accomplish an effect that is like this: five or six photos one
next tothe other, when I roll over one, it expands and the others contract and
so on with each one, the perfect example of what I want is located at:
http://www.thinknoodles.com and click "the space", you'll see there exactly
what I'm talking about. Is this actionScript, or a lot of layers? I'm totally
lost and I would appreciate the help. Thank you in advance.
Re: image sliding on rollover Lord Yoda
7/20/2004 9:28:18 PM
This is actionscript and it's non trivial.

1) Create an array of movieclips.
2) When one clip is clicked on, inside a loop you need to use an easing
equation (search for robert penner easing equations) to smoothly slide
it open. 'Easing' refers to the way something smoothly accellerates, or
decelerates coming to a smooth stop.
3) While you slide one open, the one's to the left or right need to be
simultaneoulsly closed. So, each time through the loop one clip opens a
little and one closes a little at the same speed, until the right size
is achieved.

I say loop but you would probably need to use the onenterframe callback
function.

Sorry if this sounds complicated, but there isn't an easier way of
saying it. As I said, it's non trivial though not heavily non trivial.

You might think you can do this using the timeline. You could probably
do it like that, but the user couldn't roll onto the next one until the
previous one had finished opening... or it would look silly and wrong.

[quoted text, click to view]




Re: image sliding on rollover kglad
7/21/2004 1:47:30 AM
Re: image sliding on rollover Lord Yoda
7/21/2004 8:40:29 PM
In the example you gave (on a website) the clips 'open' when you roll
over them. eg. they change size and get bigger. The one that was
previously open then closes.

A user can only 'open' a clip if you program the clip to open.

[quoted text, click to view]
Re: image sliding on rollover kglad
7/21/2004 9:05:46 PM
Re: image sliding on rollover Lord Yoda
7/21/2004 10:53:03 PM
[quoted text, click to view]

Yeah, my post was in response to the original post in this thread. I did
say it was non-trivial. The original post gave an example as follows...

"I'm trying to accomplish an effect that is like this: five or six
photos one next tothe other, when I roll over one, it expands and the
others contract and so on with each one, the perfect example of what I
want is located at: http://www.thinknoodles.com and click "the space",
you'll see there exactly what I'm talking about. Is this actionScript,
or a lot of layers? I'm totally lost and I would appreciate the help.
Thank you in advance."
Re: image sliding on rollover Lord Yoda
7/21/2004 10:55:44 PM
[quoted text, click to view]

I suspect you think I was asking a question. It was actually an answer
to a thread several posts deep. Go back to the beginning of the thread
and follow it from there.
Re: image sliding on rollover kglad
7/22/2004 2:15:15 AM
your (lord yoda) post is the first in the thread i see and you and i are the
only people posting to this thread.

i sure don't have a question about this. so if you don't have a question
there's no need for either of use to post to this thread.
AddThis Social Bookmark Button