A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: How do I add an external preloader to my thumbnail images?

  1. #1
    Kris Hunt
    Join Date
    Aug 2001
    Posts
    181

    How do I add an external preloader to my thumbnail images?

    I made myself a nice Flash photo gallery template with dynamically loading JPEG images and thumbnails.

    http://www.toprival.com/temp/flashga...o_gallery.html

    I have an external preloader set up for the large images (the kind that uses listeners), but I was wondering how to go about adding a simple spinner preloader to the thumbnails themselves. Since each thumbnail's MC container has a different instance name, it seems like I would have to have a separate chunk of code for each thumbnail's preloader. Is there any way I can just code the thumbnail preloader once? Does the thumbnail preloader even need to be external? Remember, the thumbnails are being loaded dynamically.

    This is in Flash 8. I've posted the Flash file and preloaders here, and the photos and thumbnail images can be downloaded from here if anybody wants to fiddle with it.
    Attached Files Attached Files

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    yes, you only need to write the movieClipLoader once.
    The line that actually triggers it is loadClip() so you can call it anywhere you want and just pass it a new file and target.

  3. #3
    Kris Hunt
    Join Date
    Aug 2001
    Posts
    181
    I really don't understand how loadClip works. If you could modify my file and show me I would greatly appreciate it.

  4. #4
    Kris Hunt
    Join Date
    Aug 2001
    Posts
    181
    Are you saying I don't even need to write a separate movieClipLoader and listener for the thumbnails; I can use the same one that I use for the large images? I don't think that's the case, since I want to use a different preloader for the thumbnails. The large images have a pie chart progress display with an incrementing percentage; the thumbnails will just have a small spinning graphic.
    Last edited by KrisHunt; 05-27-2007 at 07:33 PM.

  5. #5
    Kris Hunt
    Join Date
    Aug 2001
    Posts
    181
    Why is it, when I add this line, my whole (10-frame) Flash movie loops and flashes continuously?

    Code:
    myMCL.loadClip("spinnerPreloader.swf", this.thumbnail1.spinnerPlaceholder);

  6. #6
    Kris Hunt
    Join Date
    Aug 2001
    Posts
    181
    I figured it out.

  7. #7
    Junior Member
    Join Date
    Jun 2007
    Posts
    1
    Thanks for uploading this, it gave me something to read on my lunch break.

    Video Converter
    http://www.allvideotools.com

  8. #8
    Kris Hunt
    Join Date
    Aug 2001
    Posts
    181
    Buggy ActionScript is an enjoyable read for you? Happy to oblige... I got lots more where that came from.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center