dcsimg
A Flash Developer Resource Site

Page 6 of 10 FirstFirst ... 2345678910 LastLast
Results 101 to 120 of 189

Thread: For everyone with a preloader problem

  1. #101
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Please explain the hiccup a little more .... Also, as I said preloading all of the sounds would be better practice if they are that small.... Since you already have it set up, try preloading a seperate library with all of the sounds, and then use attachSound to call them.

    ~Sportzguy933

  2. #102
    Junior Member
    Join Date
    Jul 2006
    Posts
    14
    Hi There!

    I've read every post and the explanations come close to what I need to know, but I am having trouble applying it to my actual movie, so if anyone could say exactly what I'd need to do, that would be a great help!

    I have my main movie that is relatively small filed - 88kb. But I also have my background music that is 1MB. I have a preloader, but it only preloads the main movie, so that when the music is supposed to start playing, it doesn't.

    I loaded the music into level 1 of my movie, so I take that this is why it is not being preloaded. It has to stay in level 1, so is there any way that my preloader can load both my main movie and my level 1 sound file right at the start? Bascially, I want it to load the main movie and an external swf.

    Thank you in advance!

  3. #103
    Junior Member
    Join Date
    Jul 2006
    Posts
    14
    I don't believe this! I thought I'd cracked it (see previous post), but now on the scene in which the soundloop is actually loaded, the preloader movieclip appears and starts playing over and over?!?!?!

    see here: http://www.vanitee.co.uk/princess.swf

    I used this code for the preloader, it seemed to work even though I didn't really know what I was doing lol.

    Code:
    totalBytes = _level1.getBytesTotal()+this.getBytesTotal();
    loadedBytes = _level1.getBytesLoaded()+this.getBytesLoaded();
    remainingBytes = totalBytes-loadedBytes;
    percentDone = int((loadedBytes/totalBytes)*100);
    bar.gotoAndStop(percentDone);
    if (_framesloaded == _totalframes) {
    	gotoAndPlay("Intro", 1);
    }

  4. #104
    Junior Member
    Join Date
    Jul 2006
    Posts
    10
    Sorry Uzuria I can't understand why your preloader is continually playing, and have never experienced that problem myself, but I'd do like the look and sound of your web site.

  5. #105
    Junior Member
    Join Date
    Jul 2006
    Posts
    14
    thank you kindly. It's rather getting to me now though. It's quite an endeaver when you've never made anything in flash before haha. Anyone who can get to the bottom of this?

  6. #106
    Junior Member
    Join Date
    Jul 2006
    Posts
    7
    Maybe you're missing a stop(); action somewhere?

  7. #107
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Try recoding the preloader (from scratch), and don't use the "+this" part. Instead put the movieclip in level 1 and then try preloading level 1.

    Good luck,
    Spotzguy933

  8. #108
    Junior Member
    Join Date
    Apr 2006
    Posts
    4
    Whisper and everyone else,

    OK. I get the solution of loading in swfs, and not having the preloader on the loaded in swf.

    But, I have a question. Sometimes when I make a movie and test it in the bandwidth profiler the first frame is very small (let's say 1kb or less), other times it seems to stick at 64kb, regardless of the objects or code on the first frame.

    Now why is that? Example, I create a new movie with a little loading text ("Loading..." with the dots blinking) on frame 1, and then some jpegs on frame 2, and the bandwidth profiler shows less than 1kb on frame 1 and 200kb on frame 2.... thus the preloader on the swf works great. HOWEVER, I take my little "Loading" animation to another file I have, I move all the content to frame 2, and put the "Loading" into frame 1. All that is on frame 1 is that little "Loading" animation and a few lines of AS, but the first frame has 64kb according to the bandwidth profiler, and of course my "Loading" animation does not start until that first 64kb is loaded. I just want to know why that is!

    I mean, if every swf had 64kb added to frame 1 for some reason, OK.... but it seems it is only some swfs, and I dont know why.

    Thanks for any answers!

    Ryan

  9. #109
    Junior Member
    Join Date
    Jul 2006
    Posts
    10
    If you are using soundfiles that are being attached from the library, components, etc. They will be loaded into the movie before your root preloader begins playing hence the hiccup.

  10. #110
    Member
    Join Date
    Mar 2005
    Posts
    96

    preloader (ifFrameLoaded) + sharedObject

    i cant provide u guys with .fla right now coz im in school but i'll provide u guys with full information. ill try. ok my swf is divided into these frame labels.. frm its starting point


    preloader (frame 1) --> header (frame 10) ---> menu (frame 15)

    im using ifFrameLoaded script for my preloader. in the preloader frame an animation lays while "header" loads. once its loaded, it will play header.

    however, i also have this script below the preloader's script on the first frame

    //visit history

    var visit:SharedObject = SharedObject.getLocal("visitHistory");
    var counter:Number = visit.data.visits;
    var frameName:String = "";
    if (counter == undefined) {
    counter = 1;
    visit.data.visits = counter;
    frameName = "preloader";
    } else {
    counter = counter + 1;
    visit.data.visits = counter;
    frameName = "menu";
    }

    myCounter.flush();
    this.gotoAndStop(frameName);
    so assuming that its the first user'svisit, it will load the preloader animation then the header where there is animation of the menu n finally a static menu. if its the second user's visit, it will play the static menu straight away.

    however, the code dosnt work. what happens is be it or not its the first or second visit, it will load preloader -> n jump to static menu. so i changed the,

    if (counter == undefined) {
    counter = 1;
    visit.data.visits = counter;
    frameName = "header";
    i changed the first frameName to "header" instead of "preloader" and now its working. first preloader -> header -> menu for first visit. but on 2nd visit, i thought it wont play preloader anymore since its stored in the cookie. but itdoes and its pretty annoying for 2nd visit, it plays preloader -> static menu

    im not sure the ifFrameLoaded code makes this happening. becoz i have that set up to go to "header"and not "menu"

    so im pretty stumped now :| how do i initiate a preloader and still use sharedObject to not play animation for 2nd time visitors, or basically to avoid from header to be reloaded each time user clicks a link.

    sorrie for this really long explanation. hope someone cares to explain

  11. #111
    Junior Member
    Join Date
    Apr 2006
    Posts
    4
    LastRadius,

    So if I have some components (example: button components), they will add to the size of the first frame, regarless of which frame they are placed on?

    Thanks!

    Ryan

  12. #112
    Junior Member
    Join Date
    Jul 2006
    Posts
    10
    Yeah, that's right. They will be loaded before your preloader plays. Here is something I've read on the internet that will provide a work around for this problem. Note, I've never actually tried this with components so I'm not sure of the veracity of the information. Check it out and tell me if it works okay.

    Approaches

    1. In the Property Inspector click on the Publish Settings button.
    2. Click on the Flash Tab and then click on the 'Settings' Button
    3. In the [Export Frame for Classes] load classes on frame after preloader
    finishes running.
    4. In the Library right click on the component and select Linkage and
    untick 'Export in first frame option' for all components, sound objects etc.
    3. On the frame [step 3] you chose to load your components place them
    offstage on a separate layer, or onstage if you plan on actually using them
    in your movie on this frame.

  13. #113
    Wannabe Flash Programmer
    Join Date
    Aug 2006
    Location
    Canada
    Posts
    3

    Confusion still looms...

    So how does this preloader feature work for 3D flash animator? I have made a preloader with a dynamically loading par and percentage, which works in reference to itself. I tried making a scene with a preloader before the main movie, and also the preload movie option, and I can't get either to sync up with the main video. I guess I'm not referencing the main movie because the preloader's script does nothing.

    Here is the preloader video file's script I have been trying to use:

    I found this script similar to one in another forum on this site by 'blanius', and it works, in reference to itself. I don't know how to reference the other file.
    Code:
      pct = getBytesLoaded / getBytesTotal() * 100;
      ptext= "LOADING  " + toString (int(pct)) + "%"
      element ("pct_bar").scale.x = pct
    After I made a scene called "preload" this is the script I have tried to use inside of scene 1, but it does not work. It moves past it onto scene 2.

    Code:
      var loaded = getBytesLoaded();
      var total = getBytesTotal();
           if (loaded>=total) {
                gotoAndPlay("name_of_scene_2", 1);
           }
    I suppose my main problem is how to reference the information from my main movie. But at this point I have no preload feature for my movie. Can someone help me with my issue?
    Last edited by g.lightfoot; 08-04-2006 at 07:06 PM.

  14. #114
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    My advice:
    If you can, import it into Flash and add a regular preloader... easy as that.

    ~Sportzguy933

  15. #115
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Hey.

    Lastradius:

    Did a little search for you:
    http://www.kennybellew.com/tutorial/...ttachsound.htm

    Hope that helps,
    Sportzguy933

  16. #116
    Junior Member
    Join Date
    Jul 2006
    Posts
    10

    Tutorial

    Thanks for the help. I'm familiar with the tutorial you've mentioned. Recently, I purchased some web space and actually did some online testing with regards to preloaders and it seems that I've ironed out my problems. Anyways, I appreciate your help. THANKS

  17. #117
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Glad you were able to fix your problems.

    ~Sportzguy933

  18. #118
    Junior Member
    Join Date
    Sep 2007
    Location
    United States
    Posts
    11

    preloader negates my sound

    i decided to use this preloader
    www.lukamaras.com/tutorials/preloaders/green-sphere-mathematical-preloader.php
    but there is a small problem with it......
    when the movie is finally loaded and playing, my music does not
    and i have no clue why.
    so i think i want to make an entirely new preloader that does almost the sam thing (loads an external movie using a placeholder) but id like it to have a bar, with the percent loaded and the amount of bytes loaded/total bytes

    can somebody help me achieve this?
    .....im not very talented in actionscripting, so it will probably have to be explained in a little more depth than most tutorials

  19. #119
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    in my footer are some links called preloader help 1 2

    check them out they will help you understand how to create your own.

  20. #120
    Junior Member
    Join Date
    Sep 2007
    Location
    United States
    Posts
    11
    thanks a ton whispers this was perfect =]

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