Ravi's Profile
Reputation: 0
Neutral
- Group:
- Members
- Active Posts:
- 145 (0.09 per day)
- Joined:
- 16-August 07
- Profile Views:
- 3,779
- Last Active:
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
- Location:
- London
Contact Information
- E-mail:
- Click here to e-mail me
- MSN:
-
r4v1@hotmail.co.uk
- Website URL:
-
http://www.freewebs.com/r4v1
Users Experience
- Experience:
- Intermediate
- Area of Expertise:
- Coder
Latest Visitors
-
admin-jag 
18 Jan 2011 - 07:24 -
Kannan 
01 Nov 2009 - 05:13 -
DavidMuggleton 
16 Jul 2009 - 18:44 -
swimming 
26 Jan 2009 - 04:45 -
amolrajput 
03 Nov 2008 - 05:18
Topics I've Started
-
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());} }
Help




Find My Content
Display name history
Comments
Ben
01 Nov 2008 - 08:29Dizi
17 Aug 2007 - 22:07Well done on your first layout, I hope you will post more of the sites your code as your develop your skills.
Ben
16 Aug 2007 - 16:42Welcome to the forums, thanks for the nice intro post. :)