Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Play By Month?



I want to make a banner with the monts of the year, eatch month on a specific frame and want the movie to see wath month it is and play its frame
so far the code looks like this bt it dosen't work

var luna:Date = new Date();
trace(luna.getMonth());
C = luna;
for (var C:Date = 0; C<11; gotoAndStop(C+2)) {
}

can someone help me
major newbie so be explicit pls



FlashKit > Flash Help > Flash Newbies
Posted on: 04-27-2006, 05:25 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Play Different MC Frame Every Month
Hi I am trying to work out how to do this.. can anyone help.
I have a movie clip called "photos" with 12 frames. each frame has a photo in it.
I need some kind of "if" Date = March, goto frame 3, April goto frame 4 etc so every month the picture will automatically change by itself by detecting the current date on the machine.
Can anyone help please as I have searched everywhere for a way of doing this
Many thanks

How To Make The Correct MONTH.I Cant Juz +1 On The Month
Hi,

By using this command, mydate.getMonth, I can get the month,However it is behind by 1 month which is to say it shows 8 instead of 9...

What shall I do, I cant possibly add 1 at the end...For hours and minutes it can be done so....If I add 1 at the end. It will show 81..


Pls advice.............

Get Month
when I use get month it returns an integer of 00 for jan and 11 for dec.
How do i get it to display jan as 1 and dec as 12 in other words how would i add 1 to the month integer.
Here is an example of the code used.

mydate = new Date( );
code = mydate.getFullYear() + "/" + mydate.getMonth() + "/"
+ mydate.getDate() + "-" + mydate.getHours() + ":"
+ mydate.getMinutes() + ":" + mydate.getSeconds()

Thanx in advance !!!!!!!!!!!!!!

Heebi

Get First Day Of The Month? (ie: Mon, Tue)
if I create a new Date() for a given month and year; is there a way to tell on what day the 1st was?

once I find out what the first is I can determine the rest.


does anyone know of a way?


THANKS!

Month, Month, Month
Me again!

Interesting little question I have.

Is there a script of some sort in which a can tell flash to play a different frame each month? Meaning, I have 12 frames, flash checks what month it is (e.g. March) and then go to frame 3.

Any suggestions?

Get.Month() ? And Absolute Value
do i have to set the get month to a veriable, or is it already one?

And, how do i do absolute value in AS?

Thanks
-KeyserSoze

Determining 1st Day Of Month
Hello All,

Does anybody know how to determine what day of the week the first day of the month is on??

ex:

For August 2001 - Wednesday

I need to find a script that determines this.
(for any month, and any year in the future)

I think it needs to have something to do with

Code:
mydate = new Date();
curmonth = mydate.getMonth();
Then another date object set to the first day of the current month that was just detected.??

Thanks in advance!

Anyone Else Get The Wrong Month?
Not July 24.

I have this script in my movie:

mydate = new Date();
myvariable = mydate.getMonth()+"/"+mydate.getDate()+"/"+mydate.getFullYear();


I have put mydate = new Date (); as an expression

Everything comes out fine and it shows up as a properly formatted date. The only thing is, it shows a 7 instead of 8 for the month. I used SSI to check the date on my server, which shows 8. My computer's clock shows 8, but for some reason my flash shows 7. Am I missing something?

Thanks!
~!/
[Edited by TheTableist on 08-24-2001 at 09:58 AM]

Dumb ? Of The Month
How do you remove the background from each frame in an imported animated gif? (It took me all day just to figure out how to separate them ...)
Thanks!

New Picture Every Month
Actionscript.
Object date.
Windows date.
When is January i want to display picture for January.
(for example: _root.january.gotoAndPlay(2))
When is February i want to display picture for February.
When is March i want to display picture for March.
How can i do it?

Hi This Is My Second Month With Flash
Dear all,
I have been using flash now for two months and wanted to show any newbies like my self what is possible after only a couple of months and flash kits help.
My site is a university project for my year in russia.
Its url is
http://uk.geocities.com/ruslangallery
I hope this inspires as i am so happy to have got this far.
2 months ago i knew nothing and hoped for a nice text site and maybe a few thumb nails then i found out about flash and flash kit and have really enjoyed it.
If i should not have posted my url sorry and please delete posting.
yours
christopher.
thanks to kamyab he helped to set up the recommend to a friend PHP form. A real boost to the site.
I'm off to the coolsites forum (find it on the drop down menu) to be inspired

Month Problems
HI

im using the following script to get the month and date, im having a slight problem in th at the script returns the wrong month, it returns the month one in front. I can't see my way round this any help please


onClipEvent (load) {
mon = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Oct", "Nov", "Dec"];
weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
}
onClipEvent (enterFrame) {
now = new Date();
nDay = weekdays[now.getDay()];
nMonth = mon[now.getMonth()];
nDate = now.getDate();
nYear = now.getFullYear();
displayDate = nMonth+" "+nDate+", "+nYear;
displayDay = nDay;
}


ps flash mx

How To Display Day Of The Month?
Hi i need to ba able to display the current day of the month (say "25" for friday 25th july)

also i would like to be able to say in MyRemainingDays how many days are left in the month (25 of july would = 6)

tnx

Add Month(s) To A Date
Hi,
I am trying to add month(s) to a date using the calendar component in flash. Basically someone needs to enter an startdate, and I want flash to calculate the expiredate based on a variable 'duration'.

so far I have:

duration=6;//Nr of months to add

calendar1.setChangeHandler("getdatum");
function getdatum()
{
theYear = Calendar1.getSelectedItem().getFullYear();
theNumber = Calendar1.getSelectedItem().getDate();
theMonth = (Calendar1.getSelectedItem().getMonth())+1;

mysql_startdate = theYear+"-"+theMonth+"-"+theNumber;
//mysql_expiredate=???????

}

Anyone an idea?

greetings
Patrick

DAy Month Year
I just want to make a simple 'thing' that shows the day, month and year. Is this possible without going code crazy .. i just need some ideas..
I appreciate the help.

Thanks

Peter

Go Back 1 Month
Hi all, I searched around, and to be honest, I don't know if I read the answer to my ?
I have an array with day, month, all works fine.
I am making a calendar that pages will be torn off. Starting with 10 days prior to the current date.

So, easy:
code:
thaDay.text = currentDay[today.getDay() -1];

and so on.
But if I do the same for month:
code:
thaMonth.text = currentMonth[today.getMonth() -1];

I get the ol' UNDEFINED

I don't know where I am going wrong. Silly me thought I could just subtract like I could days/date.

If This Month Is February Do This Else If ...
hi all

i have a mc i want it to work on the month
if the month is 1 go to and play what ever
else if 2 ...

.
.
.
.
.
else 12 then do ...

how to do it

give me a small example for one month

Month To Varaible
Can anybody look into this.
A function gets the current month name whenever it is called and then tries to load a file with that name using loadvaraibles or loadvars

eg.
its september now so the movie tries ot load
september.txt.

Change BG Every Month HELP
I am trying to get a background to change every month
I got a code at http://www.flashkit.com/movies/Compo...0543/index.php

I modified this code and I think it will work but I do not know too much Action Script
Can some one PLZ help me put a If statement so on December it goes to frame 2 else go to frame 13





Quote:




myNow=new Date();
myMonth=myNow.getMonth();


theMonth=new Array("January","February","March","April","May"," June","July","August","September","October","Novem ber","December");


theDate=theMonth[myMonth]


if (myMonth=December)
{
gotoAndStop(2);
}

else
{
gotoAndStop(13);
}

[F8] Finding First Day In A Month
Hey, I'm having trouble finding the first day of a given month.
The big problem I'm having, is that (inside my function), when I set the year and month to the desired values, calling a .getDate(); function just reads local time.

I'm guessing that I'm going to have to come at it from a completely different direction, so any ideas would be great.

Heres my code:


Code:
// Function to discover the first day of the desired (des) month and year
function getFirstDateNumber(des_month:Number, des_year:Number) {
var date:Date = new Date();
var year:Number = date.setYear(des_year);
year = date.getFullYear();
var month:Number = date.setMonth(des_month);
month = date.getMonth();
var day:Number = date.getDay();
var datenum:Number = date.getDate();
return(day);
}
What if I tried using a .setFullYear() to the desired month, year, use the last date number, run a .getDay(), and iterate backwards until I hit 1.
I'm thinking that the date would still retrieve from local time....

Thanks,
Echo Gen

Month Messes Up
code//
time=new Date(); // time object
var seconds = time.getSeconds()
var minutes = time.getMinutes()
var hours = time.getHours()
var month = time.getMonth()
var date = time.getDate()
if (month=1) {
month = "January";
}
if (month=2) {
month = "February";
}
if (month=3) {
month = "March";
}
if (month=4) {
month = "April";
}
if (month=5) {
month = "May";
}
if (month=6) {
month = "June";
}
if (month=7) {
month = "July";
}
if (month=8) {
month = "August";
}
if (month=9) {
month = "September";
}
if (month=10) {
month = "October";
}
if (month=11) {
month = "November";
}
if (month=12) {
month = "December";
}

if (hours<12) {
ampm = "AM";
}
else{
ampm = "PM";
}
while(hours >12){
hours = hours - 12;
}
if(hours<10)
{
hours = "0" + hours;
}
if(minutes<10)
{
minutes = "0" + minutes;
}
if(seconds<10)
{
seconds = "0" + seconds;
}
clock_txt.text = month + " " + date + " " + hours + ":" + minutes + ":" + seconds +" "+ ampm;
//code

Current Month
I have 12 frames in a mc, each frame represents each month. When the mc loads, i want it to always go to current month. How can i do this?

Find The First Day Of The Month
This goes out to all the AS gurus

How would you find what weekday is the first day of the month? I'm doing a calendar similar to the component included in MX2004. Currently I'm working on this code:


Code:
// DEFINE ARRAY GETINDEX PROTOTYPE
Array.prototype.getIndex = function(data) {
for (i=0; i<this.length; ++i) {
if (this[i] == data) {
return i;
}
}
return -1;
};
// END

// DEFINE ARRAYS
months = new Array("JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER");
daysInMonths = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
weekdays = new Array("Mo", "Tu", "We", "Th", "Fr", "Sa", "Su");
// END

// DEFINE DATE OBJECT AND CURRENT DATE
now = new Date();
selectedMonth = now.getMonth();
today = now.getDate();
// END

// MOVE SUNDAY TO THE END OF ARRAY
weekday = weekdays[now.getDay()-1];
if (weekday == undefined) {
weekday = weekdays[6];
}
// END

// FIND THE FIRST DAY OF THE MONTH
weekdayNum = weekdays.getIndex(weekday);
firstweekdayNum = weekdays.getIndex(weekday);
daysinmonth = daysInMonths[selectedMonth];
for (k=now.getDate(); k>1; k--) {
if (firstweekdayNum == -1) {
firstweekdayNum = 6;
}
firstweekdayNum -= 1;
}
// END
This code is working alright. But what if I want to find the first day of the last month? Or the next month?..

Find The First Day Of The Month
This goes out to all the AS gurus

How would you find what weekday is the first day of the month? I'm doing a calendar similar to the component included in MX2004. Currently I'm working on this code:


Code:
// DEFINE ARRAY GETINDEX PROTOTYPE
Array.prototype.getIndex = function(data) {
for (i=0; i<this.length; ++i) {
if (this[i] == data) {
return i;
}
}
return -1;
};
// END

// DEFINE ARRAYS
months = new Array("JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER");
daysInMonths = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
weekdays = new Array("Mo", "Tu", "We", "Th", "Fr", "Sa", "Su");
// END

// DEFINE DATE OBJECT AND CURRENT DATE
now = new Date();
selectedMonth = now.getMonth();
today = now.getDate();
// END

// MOVE SUNDAY TO THE END OF ARRAY
weekday = weekdays[now.getDay()-1];
if (weekday == undefined) {
weekday = weekdays[6];
}
// END

// FIND THE FIRST DAY OF THE MONTH
weekdayNum = weekdays.getIndex(weekday);
firstweekdayNum = weekdays.getIndex(weekday);
daysinmonth = daysInMonths[selectedMonth];
for (k=now.getDate(); k>1; k--) {
if (firstweekdayNum == -1) {
firstweekdayNum = 6;
}
firstweekdayNum -= 1;
}
// END
This code is working alright. But what if I want to find the first day of the last month? Or the next month?..

1 Month Of Actionscript
Last edited by shwanky : 2007-01-09 at 21:08.
























So, a month ago I decided to stop being lazy and started learning actionscript. In honor of a month well spent I created this xml driven slide show thingy. It's far from perfect but it uses everything I learned in the last month. It doesn't have a preloader because I haven't learned that yet. But cheers and I hope someone gets some use out of it .


ActionScript Code:
import mx.transitions.Tween;
 
var xmlData:XML = new XML();
var xmlDataHolder:XMLNode;
var sFile:String;
var sPath:String;
var sTitle:String;
var nCurrent:Number = 0;
 
loadXML();
createStage();
 
mcHolder.mcNext.onRelease = function():Void {
    if(nCurrent < xmlDataHolder.childNodes.length - 1){ 
        nCurrent++;
        sFile = xmlDataHolder.childNodes[nCurrent].attributes.filename;
        sPath = xmlDataHolder.childNodes[nCurrent].attributes.path;
        sTitle = xmlDataHolder.childNodes[nCurrent].firstChild.nodeValue;
        loadFile(sPath + sFile);
    }
}
 
mcHolder.mcPrevious.onRelease = function():Void {
    if(nCurrent >= 1){ 
        nCurrent--;
        sFile = xmlDataHolder.childNodes[nCurrent].attributes.filename;
        sPath = xmlDataHolder.childNodes[nCurrent].attributes.path;
        sTitle = xmlDataHolder.childNodes[nCurrent].firstChild.nodeValue;
        loadFile(sPath + sFile);       
    }
}
 
mcText.onRollOver = function():Void {   
    this.createTextField("tTitle",this.getNextHighestDepth(),0,this._height -25,this._width,25);
    var tfForamt:TextFormat = new TextFormat();
    tfForamt.align = "center"; 
    tfForamt.font = "_sans";
    tfForamt.bold = true;
    this.tTitle.background = true;
    this.tTitle.backgroundColor = 0xFFFFFF;
    this.tTitle._alpha = 25;       
    this.tTitle.text = sTitle; 
    this.tTitle.setTextFormat(tfForamt);   
   
};
mcText.onRollOut = function():Void {
    this.tTitle.removeTextField();
};
 
function loadXML():Void {   
    xmlData.ignoreWhite = true;
    xmlData.onLoad = function(bSuccess:Boolean):Void {
        if(bSuccess){
            xmlParser(this.firstChild);
        }
    };
    xmlData.load("slideShow.xml");
}
 
function xmlParser(xmlObject:XMLNode):Void {
    xmlDataHolder = xmlObject;
    sFile = xmlDataHolder.childNodes[nCurrent].attributes.filename;
    sPath = xmlDataHolder.childNodes[nCurrent].attributes.path;
    sTitle = xmlDataHolder.childNodes[nCurrent].firstChild.nodeValue;
    loadFile(sPath + sFile);
}
 
function createStage():Void {
    var nStagew:Number = Stage.width;
    var nStageh:Number = Stage.height;   
       
    this.createEmptyMovieClip("mcHolder",this.getNextHighestDepth());
    this.createEmptyMovieClip("mcText",this.getNextHighestDepth());
    mcHolder.createEmptyMovieClip("mcImage",mcHolder.getNextHighestDepth());   
    mcHolder.createEmptyMovieClip("mcNext",mcHolder.getNextHighestDepth()); 
    mcHolder.createEmptyMovieClip("mcPrevious",mcHolder.getNextHighestDepth());
    createButtons(mcHolder.mcNext,'tText','NEXT',36);
    createButtons(mcHolder.mcPrevious,'tText','PREVIOUS',68);      
   
    createBox(mcHolder.mcImage,410,300);
    createBox(mcText,410,300); 
    mcHolder._x = nStagew / 2 - mcHolder.mcImage._width / 2;
    mcHolder._y = nStageh / 2 - mcHolder.mcImage._height / 2 - 15;
    var nXYPos:Number = mcHolder.mcImage._height + 15;
    mcHolder.mcNext._x = mcHolder.mcImage._width - mcHolder.mcNext._width;
    mcHolder.mcPrevious._x = 0;
    mcHolder.mcNext._y = nXYPos;
    mcHolder.mcPrevious._y = nXYPos;
    mcText._width = 410;
    mcText._height = 300;
    mcText._x = mcHolder._x;
    mcText._y = mcHolder._y;
    mcText._alpha = 0;
}
 
function createButtons(mcObject:MovieClip,sName:String, sText:String, nWidth:Number):Void {
    mcObject.createTextField(sName,mcObject.getNextHighestDepth(),0,-10,nWidth,18);
    var tfFormat:TextFormat = new TextFormat();
    tfFormat.bold = true;
    tfFormat.font = "_sans";   
    mcObject[sName].text = sText;
    mcObject[sName].setTextFormat(tfFormat);
}
 
function loadFile(sImage:String):Void { 
    var mclImage:MovieClipLoader = new MovieClipLoader();
    var oListener:Object = new Object();
    oListener.onLoadInit = function():Void {
        var imageTween = new Tween(mcHolder.mcImage,'_alpha', Bounce.easeOut, 0, 100, 24, false);   
    };
    mclImage.addListener(oListener);
    mclImage.loadClip(sImage,mcHolder.mcImage);
}
 
function createBox(mcObject:MovieClip,nWidth:Number, nHeight:Number):Void {
    mcObject.beginFill(0x000000, 100);
    mcObject.lineStyle(1, 0x000000, 100);
    mcObject.lineTo(0,nHeight); 
    mcObject.lineTo(nWidth, nHeight);
    mcObject.lineTo(nWidth, 0);
    mcObject.lineTo(0,0);   
    mcObject.endFill();
}


The Xml File

Code:
<root>
<image filename="cute_smile.jpg" path="./images/">Cute Smile</image>
<image filename="grocery_isle.jpg" path="./images/">Shopping!</image>
<image filename="snowboard.jpg" path="./images/">Guy on a snowboard</image>
<image filename="stool_books.jpg" path="./images/">Books on a Stool</image>
<image filename="zela_smile.jpg" path="./images/">Zela's Smile</image>
</root>
I hope this next month will be better than the last

Last Date Of Month
ok, so i'm programming a dynamic asp driven calendar in flash, got the code down to create the dates starting at the appropriate day of the week, but i've no idea how to find out how many days are in my (dynamic) month...


any ideas??

Calculate Days In Month
Hi all, I am putting together a calendar using AS and need to calculate the days in any given month - my function is unreliable - sometimes right sometimes wrong!

function countDays(theDate)
{

thisYear = theDate.getUTCFullYear();
thisMonth = theDate.getUTCMonth();
nextMonth = new Date(thisYear,thisMonth+1);
lastDay = new Date(nextMonth.getTime() - oneDay);
return noOfDays = lastDay.getDate();

}

Any ideas??!

Thanks,

Date To Pick The Month
Hello all,

I have a button that when I click it. It brings me to my callander page. Well I have created he Entire years callander and would like to be able to go to the correct month. How can I use the date function in the action of the button to take me to he right frame.

Old day programe I would say if Month = December then goto 1. else if Month = January then goto 2 else if.....

Anyone hae any clues would be realy helpfull instead of having to changethe calander section on a monthly basis.

Thanks,
Attila GnA

http://server40.hypermart.net/gna/

How To Display Current Month.. Help Please.
I made a calender which you can view at

http://geocities.com/sri1101/index.html

My problem is the calender is loading with January by default, whereas I want it to load with the current month of the year by default. I have made it by placing each month in frame 1, frame 5 etc and I am using the two arrows to navigate, just like a slideshow. With this fashion, can I make the current month to display automatically? If so can somebody please tell me how?

How To Display Current Month.. Help Please.
I made a calender which you can view at

http://geocities.com/sri1101/index.html

My problem is the calender is loading with January by default, whereas I want it to load with the current month of the year by default. I have made it by placing each month in frame 1, frame 5 etc and I am using the two arrows to navigate, just like a slideshow. With this fashion, can I make the current month to display automatically? If so can somebody please tell me how?

How To Get System Date Or Month?
Hi all,

As i was browseing thourgh tutorials in this site i came across
one wonderful tutorial "Analog clock" and i did that successfully.

But now if want to show current month, date, and year also with it
how i will do it?

As i am not much actionscript master can some explain why i have to write .time everytime to get seconds, minutes, and hours to track system time?

the code is somthing like:-
time = new Date();
mil = time.getMilliseconds();
s = time.getSeconds();
m = time.getMinutes();
h = time.getHours();
and if i try the same code without copypaste from tutorial it dose not take .time but just a .getSeconds()then how a newcomer like me will understand significance of .time why its requide (i mean the function for it)

Thanking you in advance

Bhushan

[flash Mx/5] Day, Hour, Min, Sec...but What About Month
hi everyone... just got a simple question:

in the following code, which displays a set countdown in days, hours, minutes, seconds, how is it possible to show months? so that i can have months/days/hours


quote:
------------------------------------------------------------------------
currentDate = new Date();
// note: flash starts to count months from 0, so January is month 0 and December month 11.
// the date here is expressed as follows: Year, Month, Day, Hour, Minutes, Seconds.
endDate = new Date(2002, 11, 31, 23, 59, 59);
days = (endDate-currentDate)/1000/60/60/24;
daysRound = Math.floor(days);
hours = (endDate-currentDate)/1000/60/60-(24*daysRound);
hoursRound = Math.floor(hours);
minutes = (endDate-currentDate)/1000/60-(24*60*daysRound)-(60*hoursRound);
minutesRound = Math.floor(minutes);
seconds = (endDate-currentDate)/1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
secondsRound = Math.round(seconds);
// Check when to put day and when to put days
if (daysRound == 1) {
dy = " day ";
} else {
dy = " days ";
}
if (secondsRound == 60) {
secondsRound = 0;
}
if (minutesRound == 60) {
minutesRound = 0;
}
if (secondsRound<=9) {
secondsRound = "0"+secondsRound;
}
if (minutesRound<=9) {
minutesRound = "0"+minutesRound;
}
if (daysRound<=-1) {
timeRemaining = "endDate introduced!";
} else {
timeRemaining = daysRound+dy+hoursRound+":"+minutesRound+":"+secon dsRound;
}
------------------------------------------------------------------------


any help appreciated as always, thanks

miss parodius xxx

PS - isn't there any way of kerning the text within a dynamic or input text box?

Ver5. Getting Flash To Tell You What Day It Was On The First Of The Month
problem:
I have been trying to work out how to get flash to tell oyu what day it was on the first of the month
There is the myDate.getDay() function but that only tells you what day it is today. I

Question:
Is there someway I can feed flash a date and have it tell me the day it was? Anything will help.

thanks
muz

Do We Gain A Month Every 6 Years?
hey there...On a milisecond scale do we gain a month every 6 years...seems so on Planet MX...following code works fine till 2009 then adds a whole month in 2010 and then again in 2016 and so on...

function getTime() {
var time = new Date();
//trace(time);
newYear = new Date(2016, 0, 01);
//trace(newYear);
var now = newYear.valueOf() - time.valueOf();
//trace(newYear.valueOf());trace(time.valueOf());tra ce(now);
var month = Math.floor(now/86400000/30);
trace(month);
if (month > 12) {
year = Math.floor(month/12);
trace(year);
month = month - (year*12); }
if (time.getDate() <= 31) { month -= 1; }
//var year = Math.floor(now/86400000/30/12);
//if (year > 0) { month -= 12; }
//xyz = time.getMonth();
//trace(xyz);

//var days = Math.floor(now/86400000);
if (time.getMonth() % 2 == 0){ var days = 31 - time.getDate(); }
else{ var days = 30 - time.getDate(); }
//if (time.getMonth() % 2 == 0) { days -= 31;}
var hour = time.getHours();
var minute = time.getMinutes();
var second = time.getSeconds();
var milisec = time.getMilliseconds();

var temp = (year + " : ");
temp += (month + " : ");
temp += ((days) + " : ");
temp += (23-hour);
temp += (((59-minute)<10) ? " :0 " : " : ")+(59-minute);
temp += (((60-second)<10) ? " :0" : " : ")+(60-second);
temp += " : "+(999-milisec);
if (hour == 0 && minute == 0 && second == 0) {
day -= 1;
}
return temp;
}


Please advise.

Go To A Key Frame Depending On The Month
Hello,

I am making a little calender thingy for a website I am working on and want it to automaticaly be on the current month when it loads up (I have a keyframe per month). I have been fiddling around with action script for this to no avail. Can anyone please help me?

Count Down For Day/month/time
Does anybody no where i can get my hands a .fla
for one of those count down things?
U tend to get them before movies are released on their websites. bit like the one over at www.gtagaming.com


thanks
aidan

Getting Month From Server Clock
I have this php code that gets the time from the server:


Code:
<?php
echo "time=" . time();
?>
How do I extrapolate the month from this?

I'm setting the season in my Flash file based on the month, but I don't want to use the user's computer clock in case they don't have it set to the right month.

Here is my code, which works, but it's getting the month from the computer's clock:


Code:
onEnterFrame = function () {
var date;
date = new Date();
month = date.getMonth();
if (month<=2) {
spl_txt = "WINTER";
}
if (month>2 && month<=5) {
spl_txt = "SPRING";
}
if (month>5 && month<=8) {
spl_txt = "SUMMER";
}
if (month>8 && month<=11) {
spl_txt = "FALL";
}
};
I want to get the month from the server's clock.

Thanks in advance!

Date() Comes Up With Wrong Month
Hi,

I'm customizing a game for a client and they sent me the following code to submit the time to their server:


Code:
var d:Date = new Date();
var mm = (d.getUTCMonth()<10)?'0'+d.getUTCMonth():d.getUTCMonth();
var dd = (d.getUTCDate()<10)?'0'+d.getUTCDate():d.getUTCDate();
var hh = (d.getUTCHours()<10)?'0'+d.getUTCHours():d.getUTCHours();
var ii = (d.getUTCMinutes()<10)?'0'+d.getUTCMinutes():d.getUTCMinutes();
var ss = (d.getUTCSeconds()<10)?'0'+d.getUTCSeconds():d.getUTCSeconds();

var utcdate = (d.getUTCFullYear()+'-'+mm + '-' + dd + 'T' + hh + ':' + ii + ':' + ss + 'Z');

trace(utcdate);


This traces out the following: "2007-06-05T00:28:55Z"
It's coming up with the wrong month, June! It should be July (2007-07-05T00:28:55Z)

Does anyone know what's going wrong here?

Thanks

Number Of Days In Given Month
Hi

Does anyone know a way to return the number of days in a given month?

Thanks

Bitmap Image Changes By Month
I need a script that will change at the beginning of each month. Right now, a button rollover shows the image in a box within a flash movie. Each month I've manually changed out the image with the swap symbol feature. I would like to have that image update each month. So when the user rolls over the button, the image will be changed out. Also, I'm not an advanced programmer with actionscript, so if you can tell me where to place the script or scripts, that would be greatly appreciated.

Thanks,

Monte Darland

FMS Total Bandwidth/Month
Is it possible to monitor flash media servers total monthly bandwidth usage?

Checking Month Combobox
i am making some code to make sure the user doesnt input an incorrect month, here is the code i have

Code:
function buttonPressed (buttonInstance) {
if (buttonInstance == submitBtn) {
if (yearText.length == 4) {
if (!Number(yearText.text)) {
feedback = "Please input a year in only digits";
return;
}
// check they havent input a year b4 1932
if (yearText.text < 1932) {
feedback = "Please enter a year from 1932 onward.";
return;
}
// also check they havent gone too far in the future
if (yearText.text > myDate.getFullYear()) {
feedback = "Please input a year from 1932 to the current year";
return;
}
// make sure they input a relevant month in combobox
if (monthBox.data > myDate.getMonth()) {
feedback = "Please input the current or previous months";
return; //THIS IS THE PROBLEM IF STATEMENT
}
trace ("Button Pressed");
trace ("______________________________");
// get value of year box
trace (yearText.text);
year = String (parseInt (yearText.text)).substr (yearText.text.length - 2);
trace ("year: " + year);
// get value of month combobox
month = monthBox.getSelectedItem ().data;
trace ("month: " + month);
// get value of date combobox
mydate = dateBox.getSelectedItem ().data;
trace ("date: " + mydate);
// get value of time combobox
time = timeBox.getSelectedIndex ();
trace ("time: " + time);
selectedTime = timeBox.getSelectedIndex ();
trace ("______________________________");
getData ();
} else {
feedback = "Please use 4 figures";
}
}
}
The combobox labels are jan-dec and the data is 01-12

the problem is that if i put an incorrect month it doesnt put out the feedback msg, it just goes straight to the getdata function

Assign Month To A Variable.
It seems real simple but I just can't figure it out....I need to check for the current date and then assign a variable to that date....for example, I would find out that June is equivalent to 5 and then assign b = 5 ....this way I can check back with the variable b to see if we are in June....any help would be great...

Calendar UI Month Button
I am using the calendar UI component from Flash UI Components Set 2. It is now free at macromedia.com Yee haaa!! I am trying to invoke other commands when I select the next month button. How is this done?

This has to be simple, right!

Can someone show me this:

Make it when you select the next month button it traces the word " HI".

Event That Happens On The Last Saturday Of The Month
Hi, am searching for some code to announce an upcoming event for the week.

eg. an event that happens on the last Saturday of the month
or the 1st and 3rd Sundays of the month

Calendar - Month Navigation
I have created a calendar using a class. The navigation works correctly for going forward and backwards. The problem is when the number of days for the next or previous month don't match the current number of days it doesn't highlight the current date correctly.

Simple Date (month) Question...
hi...i know i've seen this question in here before (somewhere), but can't seem to find it now that i need it.

here's the deal...

my month is coming back 1 month behind (so it reads as 7 instead of 8)...i know why, but i can't figure out how to add +1 to it...i'm new to the whole variable thing in flash, so if anyone can help i'd appreciate it

thanks

Duplicating MC Question. It Bothered Me For A Month.
Why the duplicated movie clip always on the top?
I made some picture in the topest layer but when I add a script to dupicate other movie clip, the duplicated MC must cover my picture.
Do you know how to slove this Q?

Thank you for reading my post.

Getting The Number Of Days In A Month, Dynamically.
I am trying to make a dynamic calendar where you can change the year and month dynamically, but I can't get the amount of days in a month dynamically. Does anyone know how I can go about doing this?

Thanx, Zach

Copyright © 2005-08 www.BigResource.com, All rights reserved