5 Replies Latest reply on Jul 20, 2007 11:54 AM by funkysoul

    Playing movie section based on date

    WDSLibrarian
      I have a movie with 55 keyframes in two distinct sections (really different two movies contained in one). For clarity I’ll call each section “Section One” and “Section Two”.

      Section One starts on keyframe 5 and Section Two starts on keyframe 25. Each section has a STOP command at the end of the clip so that only that version will play.

      Section One is date sensitive. I would like to play it based on the day of the month and have Section Two be the alternative.

      I have created a separate track to hold this script to control which section plays:

      var now=new Date();
      trace (now);

      var myDate = new Date();
      trace(myDate);

      Check = myDate.getDate();
      trace(Check);

      if (Check >'7') {
      gotoAndPlay(25);
      } else {

      gotoAndPlay(5);
      }

      My problem is this: When I play the published movie on it’s own, it plays correctly (the correct section plays based on the date.) However, when I load the movie onto my webpage it always starts at frame 5. When put on the webpage it seems that the script is being ignored.

      Do I need to incorporate something into my HTML? I thought the Flash movie could stand alone within the HTML and still work.

      Any help would be greatly appreciated!