Web Design Forum: Ravi - Viewing Profile - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting

Ravi's Profile User Rating: -----

Reputation: 0 Neutral
Group:
Members
Active Posts:
145 (0.09 per day)
Joined:
16-August 07
Profile Views:
3,779
Last Active:
User is offline May 08 2011 03:04 PM
Currently:
Offline

My Information

Member Title:
Dedicated Member
Age:
19 years old
Birthday:
November 1, 1992
Gender:
Not Telling Not Telling
Location:
London

Contact Information

E-mail:
Click here to e-mail me
MSN:
MSN  r4v1@hotmail.co.uk
Website URL:
Website URL  http://www.freewebs.com/r4v1

Users Experience

Experience:
Intermediate
Area of Expertise:
Coder

Latest Visitors

Topics I've Started

  1. Actionscipt and Date

    08 May 2011 - 12:02 PM

    Hi,

    Let me summarise what I want to happen. There are 3 scenes, 'general', 'may', 'june'. The .swf opens the general scene.
    Open loading the .swf, the user will be led to a page with a button which they click. When the click the button 4 things can happen:

    If the date is before 15 May, they will be taken to the same scene called 'general' and be told they have visited too early
    If the date is May 15 - 31 (incl.) they will be taken to a scene called "May" and start on frame 1 if 15th, 2 if 16th and so on... (so frame number = [day] - 14)
    If the date is June 1 - 24 (incl.) they will be taken to a scene called "June" and be placed on the frame number corresponding the day.
    If the date is 25 June onwards, they will be kept in the same 'general' scene and taken to frame which tells them they are too late


    I've got the following if statement setup on the button, but it won't work. Does anybody have any suggestions as to how I should alter my code to make it work? Or if anybody knows a script that will work, I would greatly appreciate it!

    on(release){
        g = new Date();
        if( (g.getDay() < 15)   &&    (g.getMonth() <= 5)){gotoAndStop("general", 'early');}
        else if((g.getMonth() >= 6)     &&  (g.getDay() > 24)){gotoAndStop("general", 'late');}
        else if(g.getMonth() == 5){gotoAndStop("May", ((g.getDay())-14);}
        else if(g.getMonth() == 6){gotoAndStop("June", g.getDay());}
                }

Friends

Comments

Page 1 of 1
  1. Photo

    Ben 

    01 Nov 2008 - 08:29
    Happy Birthday Ravi :)
  2. Photo

    Dizi 

    17 Aug 2007 - 22:07
    Thanks Ravi, :D
    Well done on your first layout, I hope you will post more of the sites your code as your develop your skills.
  3. Photo

    Ben 

    16 Aug 2007 - 16:42
    Hey Ravi,
    Welcome to the forums, thanks for the nice intro post. :)
Page 1 of 1