?
Solved

flash 2004 rollover image gallery

Posted on 2005-03-28
5
Medium Priority
?
274 Views
Last Modified: 2008-03-04
hello,
 
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.
0
Comment
Question by:drewman75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 18

Assisted Solution

by:Billystyx
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)
mymc1.onRollOver=function(){
myContainer.loadMovie("jpeg1.jpg");
}
mymc1.onRollOut=function(){
myContainer.unloadMovie("jpeg1.jpg");
}
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

Billystyx

0
 
LVL 11

Accepted Solution

by:
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.
0
 
LVL 18

Expert Comment

by:Billystyx
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.

Billystyx
0
 

Author Comment

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

Expert Comment

by:Billystyx
ID: 13651745
no worries, thanks for the points:)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

765 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