This is a discussion on "loading external images into array" within the Flash & Multimedia Forum section. This forum, and the thread "loading external images into array are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
loading external images into array
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
loading external images into array
hey guys
Sorry for the long post, but I've been fighting this for days and i am sure there is a simple little solution that keeps on eluding me... The source file is at http://www.imaginegreatthings.com/index10.zip. To test, download and unzip the .fla. Then create a folder "photos" in the same directory. The folder photos has to have at least 8 images called img0.jpg through img7.jpg. Here is what I'm trying to do: The site is a gallery with several albums, and several sets of thumbnails. The idea is to externally load all the images, so that you can view img1 while img2 is still loading. After page 1 is finished loading, page 2 would then load, etc. Everything works except the image doesn't load into the thumbnail movie clip. Can someone please take a look at the code, I've been fighting it for days now... Thanks in advance!! Please contact me with questions! Details: The site will contain a multiple galleries of images, for example, gallery 1 - weddings, gallery 2 - children, gallery 3 - model. In each gallery, there are a couple of pages of thumbnails of externally loading images. So on page 1 of wedding gallery, there are 4 thumbnails, and on page 2 there are also 4 thumbnails. On mouseover of a thumbnail, the big image appears in the "img" movie clip. The idea behind this is to externally load all the images, so that you can view img1 while img2 is still loading. After page 1 is finished loading, page 2 would then load, etc. Logic behind coding: First, we externally load the image into the invisible big image movie clip (called "img"). The loading bar shows in the corresponding thumbnail (thumbnails are named "img0", "img1", "img2", "img3"). After the big image is done loading, we load the same image into the thumbnail movie clip. Then we put a button on that thumbnail, so that on mouse over, the big image becomes visible. I made an output window to see the order in which everything loads. It HAS TO load in the following order: p1 img0 loaded p1 thumb0 loaded p1 thumb0 showing p1 img1 loaded p1 thumb1 loaded p1 thumb1 showing p1 img2 loaded p1 thumb2 loaded p1 thumb2 showing etc. then loading in the same order on p2. Below is the explanation of the site structure: _root contains "gals" (galleries) "gals" contain "wedp1", "wedp2" (stands for wedding page 1, wedding page 2) "wedp1" contains "img" (big image) and "img0", "img1", "img2", "img3", (four thumbnails) Below is the explanation of the code: In each gallery, I would create an array of thumbnails for each page. Right now, I'm only working with two arrays, wedArr0 for wedding page 1 and wedArr1 for wedding page 2. This is the code I put in "gals". Note: here I have 16 thumbnails in each array, but for simplicity I'm working with 4 for now.
img3) same applies to wedp2. Each thumbnail has this code, this one specifically is "img0" on wedp1:
In frame 2 of each thumbnail, there is a button, which has these actions:
Here's the code for the big image ("img"):
|
|
|
|
#2
|
|||
|
|||
|
<s>I don't see that you are calling preload(url, mc) for each thumbnail image anywhere?
You will need to loop through all your images and their urls and call the appropriate forum in each thumbnail mc.</s> Oops...you are...let me figure this out... |
|
#3
|
|||
|
|||
|
I think it may have something to do with this...
but they are path to them is passed to the preload function: _root.gals.wedArr0[i%4].preload("photos/img"+i+".jpg",myArr[i].child); so when it gets to preload, it believes the path that it should load the preview images to is: _level0.gals.wedp1.img.imageholder0.child which doesn't exist! |
![]() |
| Tags |
| loading, external, images, array |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| loading external swf | crazytyler34 | Flash & Multimedia Forum | 3 | Nov 15th, 2007 21:38 |
| loading external swf | worldheadja | Flash & Multimedia Forum | 3 | Feb 7th, 2007 19:06 |
| loading external content | CDT KM | Flash & Multimedia Forum | 0 | Mar 24th, 2006 09:56 |
| loading external swf | razor | Flash & Multimedia Forum | 1 | Nov 30th, 2005 15:40 |
| loading external images and txt files | ST | Flash & Multimedia Forum | 9 | Aug 2nd, 2005 17:20 |