A Flash Developer Resource Site

Page 4 of 4 FirstFirst 1234
Results 61 to 76 of 76

Thread: preloader not loading properly

  1. #61
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Main preloader... Nope!

    It's not apparent so much on a fast connection as my cable connection, but very apparent on my old 56k dial-up... Takes at least 40 seconds for anything to show up!

    Same problem with the nike.swf, but others work fine...

    Think I'm going to call this a night, after one more post!
    Don't like odd numbers!

    Maybe catch you later!

  2. #62
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Hey! In fact you'll be my 18,900th post! And that will be my last post for tonight!

    And I'll expect an Oldnewbie credit in your news section!

    You can't say I haven't been taking good care of you, now can you!

  3. #63
    Senior Member
    Join Date
    Sep 2004
    Location
    Dublin, Ireland.
    Posts
    122
    boss!
    no hassle ill defo put u in my news section, just give me a site i can link to or something!!....ok i fixed the nike.swf it seems to work fine.....yeah i reckon the main preloader is the problem with the sound being in the first frame...ill fix that a little later on...cool man...have a good one..i reckon im going to grab another beer! ill prob drop u a line tommorow...cheers again mate ure a real lifesaver...

  4. #64
    Senior Member
    Join Date
    Sep 2004
    Location
    Dublin, Ireland.
    Posts
    122
    hi mate, im trying to get the graphics part of the prelaoder not to show when it has already been loaded,,,,as you were doing with the bar, however i have not been so sucessfull...the movie symbol with the graphics in it is called pgraphics and this is the script ive been using

    stop();
    this.pgraphics._visible = false;
    this.bar._visible = false;
    percent_display = "";

    this.onEnterFrame=function(){
    //trace the percentage of the movie that has loaded
    percent=(_level0.mtClip.getBytesLoaded()/_level0.mtClip.getBytesTotal())*100;

    if(!isNan(percent)){
    // The following only concern the preloader's displays...

    if (percent == 0) {
    percent_display = "";
    } else {
    percent_display = Math.ceil(percent) + "% Loaded";
    }
    this.bar._visible = true;
    this.bar._xscale = percent;
    // End of preloader's displays...
    _level0.mtClip.stop();
    }
    if(percent == 100){
    this.pgraphics._visible = false;
    // this sends this preloader clip back to frame 1
    // where it awaits the next call to it...
    this.gotoAndStop(1);
    // this deletes this onEnterFrame event...
    // so that the movie clip stops looping...
    delete this.onEnterFrame;
    // preloader's displays handling...
    percent_display = "";
    this.bar._visible = false;
    this.pgraphics._visible = false;
    // end of preloader's displays handling...
    _level0.mtClip.play();
    //starts the clip...
    }
    }
    stop();

    not sure if ive done something wrong here but if u get a chance to take a look id appreciate it...and also send me the link to ure site so i can put it up in the new section...thanks again man

  5. #65
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Good morning!

    Well yes the nike bit now seems to work fine!

    About your hint bars, you have missed one setting in the posted script...
    ...
    (percent == 0) {
    percent_display = "";
    } else {
    percent_display = Math.ceil(percent) + "% Loaded";
    }
    this.pgraphics._visible = true;
    this.bar._visible = true;
    this.bar._xscale = percent;
    // End of preloader's displays...
    _level0.mtClip.stop();
    }
    ...

    But more importantly, the symbol has to be set to be invisible to start with within the symbol itself, as I have done with the bar.
    Open up the bar, and look at the actionscript on the first frame of the bar, to see what I mean...

    Also the hint bars should only be within the preloader symbol itself (along with the bar and textfield) and not on any other timeline as the main timeline for example.

    As for my credit, I don't have have a site... I was just thinking some reference to "Oldnewbie's help..." in this manner, as Ingale (another user here) added to this site...

    http://www.rachela-designs.com/flash/

  6. #66
    Senior Member
    Join Date
    Sep 2004
    Location
    Dublin, Ireland.
    Posts
    122
    Hey man,

    Yeah I had the pgraphics symbol set to invisible as per the bar symbol and i have changed the script in the preloader to this

    stop();
    this.pgraphics._visible = false;
    this.bar._visible = false;
    percent_display = "";

    this.onEnterFrame=function(){
    //trace the percentage of the movie that has loaded
    percent=(_level0.mtClip.getBytesLoaded()/_level0.mtClip.getBytesTotal())*100;

    if(!isNan(percent)){
    // The following only concern the preloader's displays...

    if (percent == 0) {
    percent_display = "";
    } else {
    percent_display = Math.ceil(percent) + "% Loaded";
    }
    this.pgraphics._visible = true;
    this.bar._visible = true;
    this.bar._xscale = percent;
    // End of preloader's displays...
    _level0.mtClip.stop();
    }
    if(percent == 100){
    // this sends this preloader clip back to frame 1
    // where it awaits the next call to it...
    this.gotoAndStop(1);
    // this deletes this onEnterFrame event...
    // so that the movie clip stops looping...
    delete this.onEnterFrame;
    // preloader's displays handling...
    percent_display = "";
    this.pgraphics._visible = false;
    this.bar._visible = false
    // end of preloader's displays handling...
    _level0.mtClip.play();
    //starts the clip...
    }
    }
    stop();[PHP]

    however i still have the same problem...the pgraphics symbol is placed on the frame 2 of the preloader symbol and is on a different layer to the bar symbol...but i followed your script logically as i can see and for some reason it still shows up....

    on another not i think that i fixed the main preloader...it should work now on a 56k...

    cheers man

  7. #67
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Sure "pgraphics" is really the instance name, and not just it's Library name? No caps in the instance name? Exactly the same as in the script?

    I can look into it, but would need to see the .fla.

    Hey! Just checked the site, and don't see any hint bars at all? Nor the percent character on the textfield?
    Didn't check the preloader on my 56k yet though!

  8. #68
    Senior Member
    Join Date
    Sep 2004
    Location
    Dublin, Ireland.
    Posts
    122
    Thanks man, it was the instance name, it such a stupid mistake..i was up till 5:30 last night trying to get that to work...you live and learn though eh..i put the shout out to u in the info box...i guess ill work on the main loader now...

    thanks again

  9. #69
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Hey! My man in NY!

    Main preloader seems to be working fine now on both my connections. Nice news item also!

    Only thing left are those hint bars on a re-press or refresh of the same button! But I'm sure you'll work that out!

    Good luck! And if ever you're in Montréal, we should have a beer, or maybe grappa for me!

  10. #70
    Senior Member
    Join Date
    Sep 2004
    Location
    Dublin, Ireland.
    Posts
    122
    I dont seem to see a problem when u repress the buttons with the hint bars? Can u still see it? There is one thing with the music though, if u turn it off and then up a loaded movie when u close it the music turns back on...its a very simple script on the last frame of the movie clip the sound is contained in, the one of button is directed to this script

    stop();
    stopAllSounds();

    is there any script i can add to it to stop the unload movie action on the loaded movies from loading the sound back up on the main timeline?

    thanks though man, its nearly ready for official publishing now, i put a small icon in the browser address bar aswell...i dont know if u can see it?

    Ill surely meet u for a beer though, if im ever in montreal, to be honest i was going to go at the end of the month for to bump my visa another 3 months but they dont do that anymore so ill have to fly home...

    anyway, thanks man

  11. #71
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yep! Definately see those hint bars (and only the hint bars) on a re-press of an already loaded and cached file.

    A new copy of the sound is started each time you hit a folio button... But I don't know how you've integrated that sound, so can't really help you on that unless you provide your.flas

    If you don't want to post them here, I can allways PM you my private e-mail address where you could mail them to me...

  12. #72
    Senior Member
    Join Date
    Sep 2004
    Location
    Dublin, Ireland.
    Posts
    122
    yeah man that would be great i can just mail u the small movie...just mp me...cheers..it so wierd cos i dont see the hint bars at all...on my roomates computer either....

  13. #73
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Just PMed ya!

  14. #74
    Senior Member
    Join Date
    Sep 2004
    Location
    Dublin, Ireland.
    Posts
    122
    just emailed u...it got sent back so i tried again..hopefully u get it

  15. #75
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yeah! Well that's not much use to me! I need the whole picture... Main movie's .fla and at least the first 2 folio .flas, to see how all of these interact which each other...

    And going to hit the sack now, so will catch you later tomorrow, if you do send those other .flas, and as always in a MX only format, not MX2004.

  16. #76
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Each time your move the playhead back on the main timeline (when closing any of the folio items) you're actually starting up your sound loop again over the existing one.
    Furthermore, the sound should only be on the first frame of your music clip or external .swf, rather than on both frames as you now have it.

    2 possible workarounds...

    First one, load this music as an external .swf on another level, which will then not be affected by the playead moving back on the main timeline. If you want the music to start with the exact beginning of the movie, you would then have to, in your preloader, start by preloading that external sound .swf, before loading the main movie, so that it's fully preloaded and ready to start on the first frame of your movie. You most probably will have to add another frame with a stop(); action to it, so it doesn't start to play, before you tell it to on the first frame of your movie... Otherwise it will play as the main movie is loading.

    Second workaround, is to use a soundObject, which won't be affected by the playhead's movements on the main timeline. This attached soundObject, would normally preload in your existing preloader.
    Problem here is that looping an attached mp3 soundObject is not as seamless as a looping "event" sound as you were using, although the loop you were presently using, isn't very good and you can clearly hear the edit looping point...

    The rest seems to be working fine, although on the site, I still see the hint bars on a re-press or refresh! Can't explain it, because on the file you provided to me, I don't see them.
    Maybe delete the present main movie on your site, and upload a current new version it...
    Last edited by oldnewbie; 10-22-2004 at 09:25 PM.

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