5 Replies Latest reply on Jul 6, 2007 1:25 PM by Newsgroup_User

    Load by date

    ptvsavant
      Greetings!

      Hoping I might get some help with a problem. I want to create a movie that will read the date (numeric day off server or user computer) and load an flv (or swf) into the movie. Any suggestions as to a starting point. The thing that is holding me up is the date detection.

      Thanx in advance!
        • 1. Re: Load by date
          Level 7
          Hi,

          the Date Class in the docs should give you a start when using the date
          on the clientside. Just a few quick lines:

          var dt:Date = new Date();
          // get day of month (1 to 31)
          var the_day_of_month:Number = dt.getDate();
          // day of week 0 to 6 in a heathen way ;)
          var the_day_of_week:Number = dt.getDay();

          var video_filename:String = "video" + the_day_of_month + ".flv";

          you can then feed it to the FLVplayback component or your own coded
          NetStream.

          Manno

          ptvsavant wrote:
          > Greetings!
          >
          > Hoping I might get some help with a problem. I want to create a movie that
          > will read the date (numeric day off server or user computer) and load an flv
          > (or swf) into the movie. Any suggestions as to a starting point. The thing that
          > is holding me up is the date detection.
          >
          > Thanx in advance!
          >

          --
          ----------
          Manno Bult
          http://www.aloft.nl
          • 2. Re: Load by date
            ptvsavant Level 1
            This is great. Thank you!

            Unfortunately, I don't have the FLVplayback option (flash 7). I was going to use loadMovie in conjunction with it. Think that will work?
            • 3. Re: Load by date
              Level 7

              That'll work just as well. Somthing like:

              var dt:Date = new Date();
              // get day of month (1 to 31)
              var the_day_of_month:Number = dt.getDate();
              // day of week 0 to 6 in a heathen way ;)
              var the_day_of_week:Number = dt.getDay();

              var video_filename:String = "video" + the_day_of_month + ".swf";

              placeholder_mc.loadMovie(video_filename);

              Manno


              ptvsavant wrote:
              > This is great. Thank you!
              >
              > Unfortunately, I don't have the FLVplayback option (flash 7). I was going to use loadMovie in conjunction with it. Think that will work?

              --
              ----------
              Manno Bult
              http://www.aloft.nl
              • 4. Re: Load by date
                ptvsavant Level 1
                Awesome!

                Thanks, that worked great!
                • 5. Re: Load by date
                  Level 7
                  You're welcome.

                  BTW:
                  you can ofcourse remove the:

                  // get day of month (1 to 31)
                  var the_day_of_month:Number = dt.getDate();

                  (demo purposes only)

                  ptvsavant wrote:
                  > Awesome!
                  >
                  > Thanks, that worked great!

                  --
                  ----------
                  Manno Bult
                  http://www.aloft.nl