dcsimg
A Flash Developer Resource Site

Page 8 of 10 FirstFirst ... 45678910 LastLast
Results 141 to 160 of 189

Thread: For everyone with a preloader problem

  1. #141
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    well I have a question for you....lets think o this logically for a second.

    you have a Main.swf and you want to load some External.swf's into that Main.swf...correct?

    and you want this preloader to reflect ALL things being loaded (Main.swf + External.swf's)..

    Q: how are you going to load the external.swf into the main.swf if the main.swf isnt even loaded yet?

    now your Main.swf looks to not have ANYTHING in it?..is this correct?

    It just has some emptyMovieClips (place holders/container clips) to load the external.swf's into? (menu.swf, header.swf..etc)

    Is this correct?

    If so then you wont need a preloader for the Main.swf as it should be VERY small in file size and is really just a container...

    you can just check all your containers.....and add them up...making 3 movieClipsLoader instances (or however many you need)..

    and adding up the callback data for the onProgress callbacks.. to make one..

    "OR"... you can use the Multi-Loader class (created by FK member MyFriendIsATaco) that is free to use.. its been posted here a few times.. and I even made a quick working demo on its use the other day for another member.

  2. #142
    Registered User
    Join Date
    Jul 2005
    Posts
    1

    using preloader to load jpegs

    i am looking to design a photo gallery & i need the preloader action script that will load each jpeg/movie into the next frame on the time line when the "next" button is clicked.

    thanks,
    adam

  3. #143
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    where are you trying to load them? do you have a target that you want o load each image into?..is it there on EVERY FRAME?

    are you trying to load into a _level??

    more info is needed.. help us help you.

  4. #144
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Quote Originally Posted by xfiles_wolvie
    Hi whispers,

    thanks for answering my post.

    However, I don't understand this portion.

    "1 that runs displays when the movie starts..to show howmuch of the main movie is being loaded.."

    Hopefully I can do 1 preloader to load all my mcs and that the progress bar will reflect the loading of the total size of the main mc and the external mcs. For example, my banner.swf = 50kb, menu.swf=25kb, content.swf=500kb, intro.swf=200kb. I have checked and asked around and read that I can use arrays and moviecliploader to load them one by one. But if I were to load them one by one, my drawn preloader that will display the progress by revealing the logo, will be repeated a number of times based on the number of mcs that I be loading. Can I have it to gathered all the size and then load them and do the progress animation once only?

    does the moviecliploader have a function of doing so or I got to do it manually by getting the size of the all the mcs, add them up, then let them be the total size, and use bytesloaded divided by this total size and reflect it in my progress bar? You think is possible?

    thanks.
    Basically, your answer is this:
    If you want to load them all at once, that defeats the purpose of loading external swfs, and you might as well just put them all in the main movie as MC's.

    If you want to reduce loading time, and only load things when called upon, I would say put the home page, menu, etc. in the main movie, and then put the rest of the pages in external swfs and use moviecliploader for those.

    Hope that helps,
    Sportzguy933

  5. #145
    Junior Member
    Join Date
    Oct 2007
    Posts
    24
    Hi whispers and Sportsguy,

    thanks for answering my post. both of you are so correct. Nvr tot of it.

    I will go search the multiloader class as mentioned by whispers. I will also consider sportsguy suggestion.

    thanks all.

  6. #146
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Sounds good. Both are the same suggestion really. You just have to remember that if you want to load your movie separately, loading part of your movie, and then the next part right in a row is the same as loading them all at once. You might as well same some time and work for yourself and use the preloader format from this tutorial. If you would like to have a homepage and menu loaded first, and then load the rest of the pages on-demand, you might as well use the format from this tutorial for the homepage, menu and whatever else you want to have right away, and then use movieclip loader (like Whispers suggested) for the other pages.

    Hope that helps,
    Sportzguy933

  7. #147
    Junior Member
    Join Date
    Oct 2007
    Posts
    10

    Trouble with preloader for online slideshow with buttons

    Hi,

    I have built a flash website but cant seem to load a .swf presentation. The page and whole file loads, however when i try to navigate through the presentations the whole file seems blank, this may be due to the fact that i have loaded the presentation file through the preloader that has only 2 frames, which is why the first frame of the presentation is visible but nothing after that... please do help me out, this problem has been eating my head for a couple of days now. Thanks for all your suggestions.

    Regards,
    Stavros

  8. #148
    Senior Member
    Join Date
    Oct 2007
    Posts
    146
    What is the script on that loading swf? are you saying _root? what is the method that pushes forward on the timeline? How are you loading this swf? loadMovie() or loadMovieNum(). Your method will dictated how to target its own timeline.

  9. #149
    Junior Member
    Join Date
    Oct 2007
    Posts
    10
    I have used loadMovie() to call the .swf file... the slideshow has been created from the default template available for photo slideshows in flash 8... the following code has been used in the preloader

    ON THE FIRST FRAME

    myProgressBarListener = new Object();

    myProgressBarListener = function (eventObject) {

    myProgressBar._visible = false;

    myProgressBar.removeEventListener("complete", myProgressBarListener);

    };

    myProgressBar.addEventListener("complete", myProgressBarListener);

    myProgressBar.mode = "polled";

    myProgressBar.source = "_root";


    and this is the code on the second...


    myProgressBar.mode = "manual";

    myProgressBar.setProgress(0, 100);

    myProgressBar._visible = true;

    myProgressBarListener = new Object();

    myProgressBarListener = function (eventObject) {

    myProgressBar._visible = false;


    };

    myProgressBar.addEventListener("complete", myProgressBarListener);

    myProgressBar.mode = "polled";

    myProgressBar.source = "myLoader";

    myLoader.contentPath = "Gallery.swf";

    myLoader.scaleContent = false;

    myLoader.autoLoad = true;

    stop();

    PLEASE DO LET ME KNOW WHAT NEEDS TO BE DONE....

    Thanks,
    Stavros
    Last edited by stavros_243; 11-06-2007 at 11:43 AM.

  10. #150
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    I see that you're using the F8 Progress Bar component here. Some advice:
    DON'T. It's full of annoying problems and is not easily customizable. If you're looking for a nice easy preloader, just try the one suggested in the first post of this thread.

    ~Sportzguy933

  11. #151
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    I have a question, using the loadClip() method with a preloader I am loading clips into a container movieclip in my main.swf file. Is there a way to grab properties of the loaded swf file? For example: grab the height of the included swf or certain properties from elements on the stage of that swf?

  12. #152
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    yes...

    but you have to eait until the full clip/.swf has initiliazed before the data is available..

    that is why I sugest using the MovieClipLoader(); method instead of the loadMovie() method....

    as it has callbacks that trigger on Start, Porgress, Complete, Error and Init.
    events.. that you can utilize..

    to target any of the objects/clips inside of that loaded.swf you need to use the 'container/target' name of where he .swf was loaded.

    if you loaded your .swf into a emptyMovieClip called 'containerClip.. and in that .swf you wants to 'communicate' with a movieClip called 'someClip', you would do it like so:

    containerClip.someClip._alpha = 50; (or whatever it is you wanted to do)

  13. #153

  14. #154
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    I think I may be trying to grab the properties before it's fully loaded, hmm. I am going to grab my fla now and take a look. Thank you for the quick reply whispers.

  15. #155
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    hi..that not going to be possible.. you can get the data before its available..

    if you look at my preloader v2.0 (just for an example) you will see that is has a custom callback function you can assign to it, that will fire when the data IS available for you to manipulate or do whatever it is you wanna do with it.

  16. #156
    Member
    Join Date
    Jan 2006
    Posts
    92
    Hey everyone, I have a preloader and For some reason it takes until about 40% before the loader shows up on screen.
    This is not animation on the loader itself but My FLA is pretty big and i have a lot of audio files in there. Im wondering if certain things (audio files?) load even before the preloader?

    OR... and better yet, is there a way to have the site load with only 2 audio files initially, and then in the background keep loading the audio files.

    Strange stuff, but any help would be appreciated. Thanks!

  17. #157
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    spendirty, it is because you are using components, and they load first. There are plenty of threads on this already so I am not going to explain further.

  18. #158
    Member
    Join Date
    Jan 2006
    Posts
    92
    Well thanks for the advice, but i dont think I am using components. If i choose to export using actionscript in the audio files properties and then giving them an identifier, does that by definition make them a component? AS newbie here so sorry if it is a dumb question.

  19. #159
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    Im going to say that you have your preloader IN the .swf you are trying to preload? is this correct?

  20. #160
    Member
    Join Date
    Jan 2006
    Posts
    92
    Hey Whispers, thanks for trying to help out. I figured out the problem (with help from evolveDesigns, thank you). Basically what was going on was I have a preloader but it was taking up untill roughly 40 percent was loaded before the preloader even showed up. I have like 10 audio files in the library that i had set to Export using AS and had a linkage identifier. So for some reason it was as if the audio had to load BEFORE the preloader even loaded. Bottom line on the fix, was that I went into the properties and UNchecked the "export on 1st frame" option for the audio files, and then I manually placed the audio on the timeline AFTER frame 1, and set the Sync to "Stop" in the properties bar. That cleared it up. Basically It makes everything load initially but I can Manually load the audio files at a later time. Hope this may help anyone with a similar problem, and big Up's to Evolve Design who helped me out. Thanks to your 2 Whispers, as you have helped me in the past!!!!!

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