5 Replies Latest reply on Jun 23, 2006 4:24 AM by Newsgroup_User

    Preload help

    Total-MK
      Hi there,

      I will first admit that I use director mostly for moving sprites and playing sounds, but when it comes to the script, I suck. I am good at other types of scripting, and I have the general idea of how to get the formula of a script to fuction, but I can never get it going 100%. I am in desperate need of a preload script, I know It's a hassle to see these n00b requests all the time, but if someone could look at my script and tell me where I am going wrong, it would be a big help. I only need this script to work then I can apply it to all my work. Thanks in advance! :)

      Movie has 1900 frames.
      Here is my script, in frame 1:

      on exitFrame
      preLoad 0, 1900
      if preLoad(0, 1900) = true then
      go to "a"
      end if
      end

      It accepts the script, but when it runs it comes back with:

      Script Error: Function not defined
      if preLoad(0, 1900) = true then

      All i want to do is have this preload set up in frame 1, to load the total frames, then advance to frame 2 (with the marker "a" is) where a "play" button is on the stage.

      Regards,
      TMK.
        • 1. Re: Preload help
          Level 7
          Total-MK wrote:
          > Script Error: Function not defined
          > if preLoad(0, 1900) = true then

          So look up the help for the preload command where it explains how to use
          it...

          Andrew


          • 2. Re: Preload help
            Total-MK Level 1
            THanks for the reply,

            The first thing I did was look it up in the help files, but "Preload", and "if then else statements" in help don't give me enough information to get it working, as far as my script goes compared to how help explains the lingo, it should work.

            Thats why I need a few tips.

            Regards,
            -TMK


            • 3. Re: Preload help
              Level 7
              Total-MK wrote:
              > The first thing I did was look it up in the help files, but
              > "Preload", and "if then else statements" in help don't give me enough
              > information to get it working, as far as my script goes compared to
              > how help explains the lingo, it should work.

              The preload command stops further execution until the preload has finished
              (or it has filled the RAM). Do you /really/ need to preload that many
              frames? It always looks like a good idea, but Director is actually fairly
              good at managing that on its own. Note also that video is not preloaded:
              using preload on a video makes it preload the header info, not the video.

              Andrew


              • 4. Re: Preload help
                Total-MK Level 1
                Thanks for the reply,

                I just asumed this was the most lingo-basic way of making a "loading" type preloader to load my full movie.
                I usally don't have any videos in my movies, just images and sounds.

                Regards,
                • 5. Re: Preload help
                  Level 7
                  Total-MK wrote:
                  > I just asumed this was the most lingo-basic way of making a "loading"
                  > type preloader to load my full movie.

                  That isn't usually necessary as Director is usually good at loading assets
                  as needed, and it isn't usually desirable to potentially fill up the RAM on
                  the user's computer - indeed, unloading members when they're finished with
                  can be very helpful.

                  If you're doing a Shockwave movie, google for "lingo preloader". In
                  particular, the articles at lingoworkshop.com are useful. Then in the google
                  results page click on "Groups" up near the top and have a browser through
                  what's been written before in this ng.

                  HTH

                  Andrew