A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Update a Variable

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    3

    Update a Variable

    I'm using the script below, yet every time I run or publish it, flash still send to me to the frame corresponding to the date in which I first ran the scrip (August 6th).
    How can I make flash update the date and goto the correct frame?
    Code:
    var augDate:Date = new Date();
    var dayNumberaug:uint = someDate.getDay();
    switch(dayNum)
    {
              case 0:
            gotoAndStop(1,"August");
            break;   
              case 1:
            gotoAndStop(2,"August");
            break;
       ......abbreviated...... 
              case 30:
            gotoAndStop(31,"August");
            break;
    }
    Thanks

  2. #2
    Senior Member somlemeg's Avatar
    Join Date
    Aug 2000
    Posts
    171
    The code you have provided is incomplete, however if you use getDay(); returns the weekday, getDate() returns the day of the month.

    Refer with http://help.adobe.com/en_US/FlashPla...pt/3/Date.html

Tags for this Thread

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