dcsimg
A Flash Developer Resource Site

Page 1 of 4 1234 LastLast
Results 1 to 20 of 65

Thread: Preloader hell

  1. #1
    Senior Member
    Join Date
    Jun 2005
    Posts
    143

    Preloader hell

    Hi
    Ive been trying to make a preloader for ages and its really bugging me.

    ALL i want is a simple loading line (nothing else! no bars, swirly bits, numbers, animations or anything).

    That preloads in between my frames when i click 'next'

    Can anyone help?

    Many Thanks

  2. #2
    Jack Foster cabbar's Avatar
    Join Date
    Feb 2007
    Location
    England
    Posts
    111
    search the tutorial section, you'll find many samples that will help you with it

  3. #3
    Jack Foster cabbar's Avatar
    Join Date
    Feb 2007
    Location
    England
    Posts
    111
    for what you're looking for, a "generic preloader" might do the job for you, so search for that.

  4. #4
    Senior Member
    Join Date
    Jun 2005
    Posts
    143
    Hello
    Thanks for the replies!
    Yeh im trying to work from this:

    http://www.flashkit.com/tutorials/An...1358/index.php

    But not with much luck!!! As i have already made my gallery, im finding it hard to edit the actionscript and figure out whats going on.

    Does anyone think they could have a look at my .fla file and see if they can add that preloader to it?

    Many Thanks

  5. #5
    Jack Foster cabbar's Avatar
    Join Date
    Feb 2007
    Location
    England
    Posts
    111
    you never use a preloader to preload the content in the nextFrame,

    the ways to use preloaders;
    preload the whole file,
    preload external file, or
    use a preloader on the external file itself.

    so you should find a preloader that would aply to either of those.

  6. #6
    Senior Member
    Join Date
    Jun 2005
    Posts
    143
    so hows this done?:

    http://www.studiomakgill.com/

  7. #7
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Without looking too extensively at the site, I would have to say that the images are being loaded dynamically via xml. And since they're not nested inside the actual swf file a preloader would be necessary.
    Wile E. Coyote - "Clear as mud?"

  8. #8
    Senior Member
    Join Date
    Jun 2005
    Posts
    143
    Hi
    Thanks for the response. Although I don't really know what any of it meant

    i tried to use this tutorial:

    http://www.webwasp.co.uk/tutorials/b...ages/index.php

    However it doesn't work.

    My images didnt show up

    Heres the .fla file
    Attached Files Attached Files

  9. #9
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Are your images placed inside the same directory as your swf file, within a folder named "images"? Of course that's just a guess...
    Wile E. Coyote - "Clear as mud?"

  10. #10
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Another thing, your images need to have a naming convention of "0.jpg", "1.jpg", "2.jpg" etc. Other than that, I tried your file and it works fine.
    Wile E. Coyote - "Clear as mud?"

  11. #11
    Senior Member
    Join Date
    Jun 2005
    Posts
    143
    Yes to both of those, real weird one.

  12. #12
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    If you want upload all your files to a site like MediaFire http://www.mediafire.com/index.php, and I'll take a look and see what I can do.
    Wile E. Coyote - "Clear as mud?"

  13. #13
    Senior Member
    Join Date
    Jun 2005
    Posts
    143
    hi thankyou.

    heres the link:

    http://www.mediafire.com/?sharekey=4...da093e346e4aa5

    Hope its not confusing!

    I also tried adding this to make the images scale but couldn't:
    Code:
    Stage.align = "TL";
    Stage.scaleMode = "noScale";
    picHeight = new Object ();
    picHeight = pic._height / pic._width;
    picWidth = new Object ();
    picWidth = pic._width / pic._height;
    if ((Stage.height / Stage.width) < picHeight) {
    pic._width = Stage.width;
    pic._height = picHeight * pic._width;
    } else {
    pic._height = Stage.height;
    pic._width = picWidth * pic._height;
    };
    pic._x = Stage.width / 2;
    pic._y = Stage.height / 2;
    sizeListener = new Object();
    sizeListener.onResize = function() {
    if ((Stage.height / Stage.width) < picHeight) {
    pic._width = Stage.width;
    pic._height = picHeight * pic._width;
    } else {
    pic._height = Stage.height;
    pic._width = picWidth * pic._height;
    };
    pic._x = Stage.width / 2;
    pic._y = Stage.height / 2;
    }
    Stage.addListener(sizeListener);
    As i said, the images didnt appear on mine!!
    And i didnt know how to add a fade!

    Many many thanks

  14. #14
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    OK had a look... way too many comments for my liking, but hey who am to say to anything. Anyways, I have it working, at least for the most part a couple of small things, at least to me. But here's the link http://www.mediafire.com/?sharekey=d...07dab5d09a5f8f

    Let me know how it turns out.
    Wile E. Coyote - "Clear as mud?"

  15. #15
    Senior Member
    Join Date
    Jun 2005
    Posts
    143
    Hi!
    Thanks, I can't open the file. I'm using mx 2004 though.
    Any way round this?
    Cheers

  16. #16
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    All I can do is save it to a Flash 8 file. The app won't let me save it as a earlier version. I'll see what I can do. I might have a work around.
    Wile E. Coyote - "Clear as mud?"

  17. #17
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Wile E. Coyote - "Clear as mud?"

  18. #18
    Senior Member
    Join Date
    Jun 2005
    Posts
    143
    Thankyou
    Although im still getting this error:

    Code:
    **Error** Scene=Scene 1, layer=actionscript, frame=3:Line 122: There is no property with the name 'onMotionFinished'.
         	fadeOut.onMotionFinished = function() {
    
    **Error** Scene=Scene 1, layer=actionscript, frame=3:Line 130: There is no property with the name 'onMotionFinished'.
         	fadeOut.onMotionFinished = function() {
    
    Total ActionScript Errors: 2 	 Reported Errors: 2
    
    Error opening URL "file:///Macintosh%20HD/Users/alansopp/Desktop/Websites/alastair%20sopp%20photography/new/undefined"
    I have saved the fla file into a folder with another folder containing the images next to it.
    But nothing appears, the loader gets to the end and then its still blank
    Last edited by brisa_main; 09-05-2008 at 11:48 AM.

  19. #19
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    What's the name of the folder that holds your images?
    Wile E. Coyote - "Clear as mud?"

  20. #20
    Senior Member
    Join Date
    Jun 2005
    Posts
    143
    images

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