flash 2004 rollover image gallery

Posted on 2005-03-28
Medium Priority
Last Modified: 2008-03-04
i am looking to make an image gallery within flash that when a user rolls over or clicks (prefer rollover) an image, a larger version appears in the same page. saw this write up in another question and explains what i want to a T.

"An outer ring of thumbnails surrounding a central box where the fullsize image will display when any of the thumbs are either rolled over, or clicked.  (I'd prefer the rollover effect)"

i would like to do this using flash actionscript or methods if possible.  i see a lot of answers regarding this using javascript, but would like to avoid that if possible. thanks.  the simpler the better.  is it possible?  thanks.
Question by:drewman75
  • 3
LVL 18

Assisted Solution

Billystyx earned 1000 total points
ID: 13649967
load and unload the mcs using attachMovie and removeMovieClip, or loadMovie and unloadMovie, depeding onif you want the images loaded at runtime to keep swf file size down.
do for thumbnails:(probably store them in the swf, as mcs with instance names)
where the myContainer clip is in the centre of the page, with its top left corner starting at the point you wish to position the images to (for their top left corners).
The myContainer clip will be an emtpy mc with an instance name myContainer, and the images in this case would be stored in the same folder as the main html holding the embedded swf, and would be named there corresponding to the name you give them in the onRollover and onRollOut functions.

Any Qs please ask


LVL 11

Accepted Solution

Buffon earned 1000 total points
ID: 13650696
the approach Billystyx offered is no good, for my opinion (no offend). because:
1) images will be loaded every time when roll over
2) it wont be smooth, there will be a delay while image loading

so I sugest that you load in the beginning (make a preloader) two versions of images, name them item1, item2.... and big_item1, big_item2.... and then:

someimage.onRollOver = function()
  var index = this._target.split("item")[1];
  eval("big_item" + index)._visible = true;
  eval("big_item" + index)._x = 0;
  eval("big_item" + index)._y = 0;
  lastbig._visible = false;
  lastbig = eval("big_item" + index);

thats a general desing I would suggest.
LVL 18

Expert Comment

ID: 13650768
Well, I do agree (partly), although in interests of ease (the simpler the better - as Drewman says), maybe it would be more sensible to put all clips inside the swf to start with and use a preloader initially to while away the time (with clips unchecked on linkage for export on first frame and dump frame used for loading the bytes).
Then use attachMovie and removeMovieClip to add and remove clips on rollover and rollout? No extra time needed then through the course of the swf.


Author Comment

ID: 13651719
  i actually figured it out yesterday evening.  but i will split the points between you because i appreciate the quick responses. thanks so much.
LVL 18

Expert Comment

ID: 13651745
no worries, thanks for the points:)

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question