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




XML Calendar



I created a basic events page that pulls all the info from an xml. What I need to know is how can I have flash go to the next event automatically once the date for the previous event has passed.AS:
Code:
prev_btn._x = news_txt._x;next_btn._x = news_txt._x+news_txt._width;//mon = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Oct", "Nov", "Dec"];weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];now = new Date ();nDay = weekdays[now.getDay ()];nMonth = mon[now.getMonth ()];nDate = now.getDate ();//function loadXML (loaded) { if (loaded) { xmlNode = this.firstChild; news = []; description = []; day = []; date = []; time = []; month = []; venue = []; total = xmlNode.childNodes.length; for (i=0; i<total; i++) { day[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; month[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; date[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue; news[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue; time[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue; venue[i] = xmlNode.childNodes[i].childNodes[5].firstChild.nodeValue; description[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue; duplicateMovieClip (picture.container, "pic"+i, i); } firstnews (); } else { content = "file not loaded!"; }}xmlData = new XML ();xmlData.ignoreWhite = true;xmlData.onLoad = loadXML;xmlData.load ("news.xml");///////////////////////////////////// listen = new Object ();listen.onKeyDown = function () { if (Key.getCode () == Key.LEFT) { prevnews (); } else if (Key.getCode () == Key.RIGHT) { nextnews (); }};Key.addListener (listen);prev_btn.onRelease = function () { prevnews ();};next_btn.onRelease = function () { nextnews ();};///////////////////////////////////// p = 0;this.onEnterFrame = function () { if (month[p] == undefined) { this.pos_txt.htmlText = ""; this.news_txt.htmlText = "No Events at this time"; } if (news_txt.length>=160) { scroll_mc._visible = true; } else { scroll_mc._visible = false; } filesize = picture["pic"+p].getBytesTotal (); loaded = picture["pic"+p].getBytesLoaded (); this.preloader._visible = true; if (loaded != filesize) { this.preloader.preload_bar._xscale = 100*loaded/filesize; } else { this.preloader._visible = false; if (picture["pic"+p]._alpha<100) { picture["pic"+p]._alpha += 10; } }};function txt_content (p) { this.news_txt.htmlText = "Date: <FONT COLOR='#DB02DB'>"+day[p]+", "+month[p]+" "+date[p]+"</FONT><br>"+"Time: <FONT COLOR='#DB02DB'>"+time[p]+"</FONT><br>"+"Location: <FONT COLOR='#DB02DB'>"+news[p]+"</FONT><br><br><FONT COLOR='#ffffff'>"+description[p]+"<br>Or go to</FONT> <FONT COLOR='#DB02DB'><u><a href='http://"+venue[p]+"'target='_blank'>"+venue[p]+"</a></u></FONT><br>";}function date_hider () { var todaysdate = (nMonth+nDate); var gigdate = (month[p]+date[p]); if (nMonth>month[p]) { if (nDate>date[p]) { nextnews (); } }}function firstnews () { p = 0; if (loaded == filesize) { txt_content (p); date_hider (); } picture_num ();}function nextnews () { if (p<(total-1)) { p++; if (loaded == filesize) { txt_content (p); } picture_num (); }}function prevnews () { picture_num (); if (p>0) { p--; txt_content (p); } picture_num ();}function picture_num () { current_pos = p+1; pos_txt.text = current_pos+" / "+total;}
XML:
Code:
<newsblock><news> <day>Fri</day> <month>Apr</month> <date>20</date> <location>Painter’s</location> <times>10-2</times> <venuesite>www.paintersrestaurant.com</venuesite> <details><![CDATA[Call for more info 631-286-6264]]></details></news><news> <day>Fri</day> <month>Jun</month> <date>15</date> <location>Meritage</location> <times>10 - 1</times> <venuesite>eatoutlongisland.com/fullrestview.asp?key=427</venuesite> <details><![CDATA[Call for more info 631-286-3300]]></details></news></newsblock>



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-22-2007, 04:04 AM


View Complete Forum Thread with Replies

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

How To Insert A Flash Calendar In My Website, Flash Calendar
My boss want to add a flash calendar in our company website, but I don't know how to do, Anybody who can help me? Or recommend one?

Our demands:
1.can change the background(our website color is blue)
2.can using scripts JSP, can select data from our database

Calendar
I posted this on the Newbies help, but no replies have come.


This is what i have posted:
(with a few things emmited)

I am making a countdown, and a calendar... I have a script to display how many days are left...so there is no problem with the countdown.

What I want to do with the calendar is this:
there are two months of the calendar displayed.
Say October and November, if a certain day is passed then i want it to be marked off on the calandar. Does anybody know how i could do this. I am using flash 5.


and

I was thinking...
Is there a way i could set each date [number] as a graphic (or possibly dynamic text)... and then do some kind of statement that says something like:
Forgive me horrible programming skills.

if
currentdate is not = calendar date
then calendardate = calendardatecrossed

If somebody could add intelligence to my Actionscript i would be grateful.



Could somebody help me?

Calendar
I have come up with a calendar (after ripping apart some from here) and was wondering if it is possible to have a text appear for each month. If so how? Much Thanks

14 Day Calendar
Does anybody have some good ideas how to make a dynamic 14 day calendar???

I made a script that list the next 14 days, but is there an easy way to make the DAYS NAMES POP UP? (all I can think of is some HUGE scripting using a million 'if thens'.

And what hapeens at the end of the month??? I am incrementing the days by 1-13 (THAT WONT WORK NEAR THE END OF THE MONTH!!)

GOTO http://www.AUCTIONILLINOIS.com to see what I've got so far and see my dilema...

help. tv

Calendar
hi all,
i would like to have a calendar in flash.

like the ordinary ones.

"Months, Date, and year.."

like our daily big calendar..

thnks

Please Help Me With This Calendar
I have created 9 MCs, from 2002 up to 2011. Each of them has two frames and the second frame is a bit brigther than the first one, both frames have a stop command. Depending on the actual year the frames ought to change from frame 1 to frame 2. (if it is the year 2005 the MC 2005 should change to frame 2 ...)

Each of the MCs has the following script (only the years and the names vary):

onClipEvent (load) {
myDate.getFullYear();
if (myDate == 2002) {
tellTarget ("2002") {
gotoAndPlay(2);
}
}
}

In the first frame of the movie (it actually only has one frame) I put this script:

myDate = new Date();

But all the MCs stay in the first frame!

Please answer if you know what is wrong or if you have a better way to do it!
If you need any further information, just ask and I will try to answer as soon as possible!

Thank you in advance!

Calendar
Hi all,

I need a funtion.

This may give me the day of the week when I introduce as parameter the year, the month and the day of the month.

Thanks all

Help With The Calendar?
I'm having troubles getting my head around the calendar component in MX. I'm trying to make it so that it's possible to keep it updated via a text file ( I know NOTHING about PHP, ASP or the like) basically, I'm trying to use the calendar a bit like a diary so that my clients could feasibly check my availability for work - and not so they can book me online - But my diary can change often so I need it so that it is easy enough to change. With my poor lack of knowledge of Flash( Although I am picking up bits - especially from these forums here)is this an easyish task or would it be better not to use flash at all? Answers on a postcard please!

I have read almost all the other threads on this subject but couldn't really make to much sense of them.....

Calendar
Hi there!
Does anyone know of any site that has implemented a Flash calendar?
I guess it would be very difficult to make one, but are there any sites you guy know of that accomodate a online flash calendar?

Calendar
I'm attempting to make a form in Flash MX, and would like to use a date/calendar script that would automatically update the users day of the week shown for a variable.

Can anyone help or direct me where to go?

Thanks

Calendar Like This?
Hello,

I need to find a FLA file that has a map of america, like the one found at the link below.

http://reservations.ihotelier.com/bluegreen/flash.cfm

Please let me know where I can find one?

Thanks for the help.

Calendar
I have a calendar (for flash 5 player unfortunately) that's basically layed out so that each month is 5 frames ahead of the previous month in the timeline. What I'd like to do is check the users system clock and change the frame to the correct month in the timeline based upon the data that's brought back from the system clock so that I don't have to go into the flash file every month to change it.

Can anyone help? I don't think that I'm too far off, but who knows -- I may be. This is the script that I've attempted to hack (as I'm definitely not a developer) and it's not working.

currentDate = new Date();

hours = (currentDate)/1000/60/60;
hoursRound = Math.floor(hours);

// -- September -- //

if (hoursRound == 9) {
hoursRound = 5;
}

// -- October -- //
if (hoursRound == 10) {
hoursRound = 10;
}

gotoAndStop(hoursRound);

stop();


Thanks much!

Calendar?
I was wondering how i would be able to set up a calendar for a project. Or if you can guide me to any tutorials. Thanks!

Calendar
Im trying to put a calendar and event section on my website. i want something like in the attached pic. Is there any like this in the movies section. any help would be great!

thanx!
austin

Help Me In Calendar Please
Hey guy does any one know how to hav events entered in the calendar dates
say for my birthday is on 28th march and friendship day is on august 9th

i want to enter the event so that one the user clicks on the 28 th march a box should appear showing it is "Essa's Birthday Today" and when the user to august 9th it show a box It id "Friendship Day Today".

I will give u the movie i created or edited please modify it for me

regards,
Essa

Calendar...
Right guys, same project that I need the external gallery for, but basically, i've got a calendar I want to use (attached) It links to the dates so they are highlighted when there is an event, but the problem is, the event doesn't display when you click on it. I have attached the calendar file to this post, any help or ideas much appreciated.

Cheers

Xml Calendar
I created a basic events page that pulls all the info from an xml. What I need to know is how can I have flash go to the next event automatically once the date for the previous event has passed.
AS:

Code:
prev_btn._x = news_txt._x;
next_btn._x = news_txt._x+news_txt._width;
//
mon = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Oct", "Nov", "Dec"];
weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
now = new Date ();
nDay = weekdays[now.getDay ()];
nMonth = mon[now.getMonth ()];
nDate = now.getDate ();
//
function loadXML (loaded) {
if (loaded) {
xmlNode = this.firstChild;
news = [];
description = [];
day = [];
date = [];
time = [];
month = [];
venue = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
day[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
month[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
date[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
news[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
time[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
venue[i] = xmlNode.childNodes[i].childNodes[5].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue;
duplicateMovieClip (picture.container, "pic"+i, i);
}
firstnews ();
} else {
content = "file not loaded!";
}
}
xmlData = new XML ();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load ("news.xml");
/////////////////////////////////////
listen = new Object ();
listen.onKeyDown = function () {
if (Key.getCode () == Key.LEFT) {
prevnews ();
} else if (Key.getCode () == Key.RIGHT) {
nextnews ();
}
};
Key.addListener (listen);
prev_btn.onRelease = function () {
prevnews ();
};
next_btn.onRelease = function () {
nextnews ();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function () {
if (month[p] == undefined) {
this.pos_txt.htmlText = "";
this.news_txt.htmlText = "No Events at this time";
}
if (news_txt.length>=160) {
scroll_mc._visible = true;
} else {
scroll_mc._visible = false;
}
filesize = picture["pic"+p].getBytesTotal ();
loaded = picture["pic"+p].getBytesLoaded ();
this.preloader._visible = true;
if (loaded != filesize) {
this.preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
this.preloader._visible = false;
if (picture["pic"+p]._alpha<100) {
picture["pic"+p]._alpha += 10;
}
}
};
function txt_content (p) {
this.news_txt.htmlText = "Date: <FONT COLOR='#DB02DB'>"+day[p]+", "+month[p]+" "+date[p]+"</FONT><br>"+"Time: <FONT COLOR='#DB02DB'>"+time[p]+"</FONT><br>"+"Location: <FONT COLOR='#DB02DB'>"+news[p]+"</FONT><br><br><FONT COLOR='#ffffff'>"+description[p]+"<br>Or go to</FONT> <FONT COLOR='#DB02DB'><u><a href='http://"+venue[p]+"'target='_blank'>"+venue[p]+"</a></u></FONT><br>";
}
function date_hider () {
var todaysdate = (nMonth+nDate);
var gigdate = (month[p]+date[p]);
if (nMonth>month[p]) {
if (nDate>date[p]) {
nextnews ();
}
}
}
function firstnews () {
p = 0;
if (loaded == filesize) {
txt_content (p);
date_hider ();
}
picture_num ();
}
function nextnews () {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
txt_content (p);
}
picture_num ();
}
}
function prevnews () {
picture_num ();
if (p>0) {
p--;
txt_content (p);
}
picture_num ();
}
function picture_num () {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
XML:

Code:
<newsblock>
<news>
<day>Fri</day>
<month>Apr</month>
<date>20</date>
<location>Painter’s</location>
<times>10-2</times>
<venuesite>www.paintersrestaurant.com</venuesite>
<details><![CDATA[Call for more info 631-286-6264]]></details>
</news>
<news>
<day>Fri</day>
<month>Jun</month>
<date>15</date>
<location>Meritage</location>
<times>10 - 1</times>
<venuesite>eatoutlongisland.com/fullrestview.asp?key=427</venuesite>
<details><![CDATA[Call for more info 631-286-3300]]></details>
</news>
</newsblock>

Calendar
anyone have a lead on a free flash/xml calendar. One that is not just dates but is large enough to have event titles on the calendar but somwhere around 500 -600px in width?

[F9] Calendar
Hey,

I am trying to do a calendar in Flash. I have a logo for each event, a grid and a background for the calendar. I want to put it on a website where users can click the logo for the event and have a box popup (while the rest of the calendar dims) with text that specifies the time, etc. I do not want a popup window though, I want a flash application that has a white box with text and maybe an image or a link on it. Then I want users to be able to close the box and see the calendar normal again. I know this is detailed and will probably involve some actionscript that I will need to learn to code, but I really want to do this. I don't have much experience with Flash, but I do have Flash 8 and CS3 Design Premium, the Fireworks CS3 trial, and Fw 8. Is there a tutorial or can y'all give me some tips on how to do this?

Thanks

~Ocean~

Calendar
hi
I'm trying to make a calendar
can you help me?

PHP Calendar...
I purchased a PHP calendar and instead of copying the html code and creating a separate page for my calendar I would like to place the calendar straight into my flash movie.

I have 3 files calendar-data.php, calendar-admin.php, & calendar swf.

What script or code do I need to get to get this calendar to load on the Calendar tab on this site www.brooklynalumnaedst.org

I have been reading and searching for away to get this accomplished. I am a newbie to flash but I do have some basic knowledge of actionscript. Can someone please tell me how to get this accomplished.

THANKS

XML Calendar For AS2?
Hey!

I've got a calendar written in AS1 - Looks cool, works fine... but haven't converted it to AS2.

Does anyone know of a good tutorial/source for a calendar in AS2?

Xml Calendar
How do i make a xml calendar

Calendar
Hello

I'd like to add a calendar on a frame.

Does anyone know a calendar application loadable on flash?

Or can I do that?

Thanks

Calendar
Hello i am working on AS3 in FlexBuilder, to make a calender i have created a buttons(30) in a loop, and if i click on any of the button, it should display the date interms of words or the no on which i have pressed.
Suppose if i click on 5, it should display "today is 5".

Can anyone answer this?

Calendar Help
I am working on an online calendar using extrenl text files and I would like to make it so when the calendar is opened, the date that pops up corresponds to the actual day it is. Does anyone know how to do this?

Calendar 2
I have been given a task to create a calendar for example the flash one..

I need to be able to view events for certain days and add events to the calendar,,,

Just a simple example would be great on how to retrive stuff from a text file even, If there is any tutorials or someone is willing to let me have a look at thier code it would be cool

Cheers . . . .<

Calendar Mx
Here is a calendar that someone gave me i added some of my own features to it and it does everything i want it to except i would like the current day to pop up automatic not on click. but still leave the click function in there so that you are able to click on other dates in future or past. I cant seem to get it to work right it always makes an error. here is the fla if anyone has any ideas.

Need AS Help With Calendar...
hello all,

just a quick question....i found the .fla for this calendar (see attachment), the only problem is that i want it to load as part of an external .swf.

most of it loads in, except the highlighted dates (the XML info).

i think it's a _root function i have to fit in there somewhere to make it work properly, i just don't know where.

any help is appreciated.......

thanks,
s.

MX Calendar
Hi all - coming to you guys for help again!

Have a look at the attached .fla -

Do any of you know where I could get a tut or .fla that could gve this kind of design that allows for each date to be a button that can link to say a .txt file with events for that day?

I am still working on AS so the code might well be in the attached .fla! - if so could some kind soul point me in the right direction?

Many thx - look forward to hearing from you.

Cello

XML Calendar In AS2?
Hey!

I've got a calendar written in AS1 - Looks cool, works fine... but haven't converted it to AS2.

Does anyone know of a good tutorial/source for a calendar in AS2?

Calendar
Hi,
I need some pointers on dynamically generating a calendar?
Thanks in advance

AS3 Calendar
Hey all,
Anyone know where I can find either a tutorial or a component for a flash calendar done in AS3? FlashLoaded's calendar component is pretty much perfect but it doesn't support AS3.

Thanks in advance.

[AS3] Calendar
I had a hard time finding a script for a calendar in actionscript 3, so I borrowed a couple techniques from Andrei Firoiu's script in actionscript 2. It's nothing major, just displays a calendar. Have fun.


Code:
////////////////////////////////////////////
// created by marcusJones - 11.19.2007 //
// based on the script by Andrei Firoiu. //
// do whatever you want with it. //
////////////////////////////////////////////


package {
import flash.display.MovieClip;
import flash.events.Event;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;

public class Calendar extends MovieClip{
var calendar:MovieClip = new MovieClip();
var monthsOfYear:Array = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "Octomber", "November", "December");
var daysOfWeek:Array = new Array("Sunday", "Monday", "Tuesday", "Wennesday", "Thursday", "Friday", "Saturday");
var daysOfMonths:Array = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var currentDate:Date = new Date();
var myDate:Date = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);//provided by Andrei Firoiu
var month_mc:MovieClip = new MovieClip();
var day_mc:MovieClip;
var days_mc:MovieClip = new MovieClip();
var daysNo:Number;
var startDay:Number;
var i:Number;

public function Calendar(){
publishMonth();
publishDays();

calendar.x = 20;
calendar.y = 20;
this.addChild(calendar);
}

public function publishMonth(){
var month_txt:TextField = new TextField();
month_txt.text = monthsOfYear[currentDate.getMonth()] + " " + currentDate.fullYear;
month_txt.autoSize = TextFieldAutoSize.LEFT;

var month_tf = new TextFormat();
month_tf.font = "HelveticaNeue Condensed";
month_tf.color = 0x000000;
month_tf.size = 20;
month_txt.setTextFormat(month_tf);month_mc.x = 30;
month_mc.y = 0;
month_mc.addChild(month_txt);
calendar.addChild(month_mc);
}

public function publishDays(){
daysNo = (currentDate.getFullYear()%4 == 0 && currentDate.getMonth() == 1 ? 29 : daysOfMonths[currentDate.getMonth()]);//provided by Andrei Firoiu
startDay = myDate.getDay();
var row:Number = 0;

for (i = 1; i < daysNo+1; i++){
day_mc = new MovieClip();
day_mc.name = "days"+i;
days_mc.addChild(day_mc);
//provided by Andrei Firoiu\
day_mc.x = startDay*25;
day_mc.y = (row+1)*20;
loadDays();
startDay++;
if(startDay >= 7){
startDay = 0;
row++;
}
////////////////////////////
}
days_mc.x = -80;
days_mc.y = 20;
calendar.addChild(days_mc);
}

public function loadDays(){
var dayLabel:String = i.toString();
var holder:MovieClip = new MovieClip();
holder.name = dayLabel;
day_mc.addChild(holder);

var label_txt:TextField = new TextField();
label_txt.name = dayLabel+"_txt";
label_txt.autoSize = TextFieldAutoSize.RIGHT;
label_txt.text = dayLabel;
label_txt.mouseEnabled = false;

var day_tf = new TextFormat();
day_tf.font = "HelveticaNeue Condensed";
day_tf.color = 0x000000;
day_tf.size = 15;
label_txt.setTextFormat(day_tf);
holder.addChild(label_txt);
}
}
}

AS3 Calendar Help
I have an AS3 calendar (files attached) that functions for the most part. Currently when you click on a day of the month, it traces that day. I would like to be able to pass that day to a text box on the stage. Also, there is a "hit" movie clip behind the numbers for the days that acts as a highlight, the alpha is set to 0 until you click on it. Right now it highlights every time you click, I only want it to highlight one day at a time. If you click on a day, it stays highlighted until you click on a different one. Does anyone have any direction for me?

Thanks.

Calendar
I want to design a calendar, such that it contains 5 rows and 6 columns, and the number is present on the each button, and if i click on the button, it should display the number in text.
Example if i click on 20th button, it should display "Twenty".

How to do this in ActionScript3.0 using FlexBuilder3.0.
Any one have idea, pls post to me.

Please Help Me With Calendar
1st at all sorry for bad english
i nedd some help with calendar in flash
from falsh components i drag DateChooser and give him instance date, then drag label and give in. lbl. i have calendar.xml file, but i don't know how to connect DC with LBL via xml. Can anybody help me???

Calendar
Does anyone know how to create a calendar where by if you hover or click on a certain date it tells you what's happening on that date.

Also, you should be able to check the dates of the next few month.

Any help is very much appreciated

Calendar
Does anyone know how to create a calendar where by if you hover or click on a certain date it tells you what's happening on that date.

Also, you should be able to check the dates of the next few month.

Any help is very much appreciated

Calendar Mx
Here is a calendar that someone gave me i added some of my own features to it and it does everything i want it to except i would like the current day to pop up automatic not on click. but still leave the click function in there so that you are able to click on other dates in future or past. I cant seem to get it to work right it always makes an error. here is the fla if anyone has any ideas.

Calendar Swf
I am making a calendar flash movie, but I have struck a problem. When I click on a day the corresponding text appears below, but when another day is clicked the previous day's text stays and the new appears over it. Is there a way to make the previous day's text go away and the new show up when other day's are clicked?
See it at http://ryanmv17.bizhat.com/.

AS3 Calendar
I'm trying to figure out the code for an AS3 Calendar, does anyone here know how to get the day of the week the month starts on? I've seen examples on php but not in as3! any help will be appreciated thanks

Calendar
Hey guys anybody knows about a calendar which shows 12 months in one display? I.e. not the usual one which shows one month and then you hit next and get the next month but a 12 month calendar...say we're in october it shows from october 2008 till october 2009 and then if it turns november, october disappears and a new november 2009 appears

Xml Calendar
Who knows about something like this in as 2? http://ctl.mc.maricopa.edu/_resources/h ... endar.html

XML Calendar
Does anyone know of a flash 8 version of an xml calendar? When you click on a date, a dynamic text box shows the text loaded for that date through xml. thanks

Calendar Help
I have a problem (in flash!) and I need a little help. I'm working on a calendar .ap i found on the net. The current day is highlighted and all that but I'm having trouble writing a function that will target spasific days and highlight them. I can't get my head round it any help would be great cuz I'm pulling my hair out (wait a minute. I've got a shaved head!) Well then at least I'm pulling out the stubble from my head ... lol

files at.

http://www.thecodebehind.com/downloads/115.zip

page at.

http://www.thecodebehind.com/code/flash/actionscript/flash-calendar.aspx


this code inside the movie clip

Code:

Months = new Array();
Months[0] = "January";
Months[1] = "February";
Months[2] = "March";
Months[3] = "April";
Months[4] = "May";
Months[5] = "June";
Months[6] = "July";
Months[7] = "August";
Months[8] = "September";
Months[9] = "October";
Months[10] = "November";
Months[11] = "December";
Days = new Array();
Days[0] = "Monday";
Days[1] = "Tuesday";
Days[2] = "Wednesday";
Days[3] = "Thursday";
Days[4] = "Friday";
Days[5] = "Saturday";
Days[6] = "Sunday";
January = 31;
February = 28;
March = 31;
April = 30;
May = 31;
June = 30;
July = 31;
August = 31;
September = 30;
October = 31;
November = 30;
December = 31;
MonthFormat = new TextFormat();
MonthFormat.align = "center";
MonthLabel.setTextFormat(MonthFormat);
today = new Date();
todaysday = today.getDay();
currentyear = today.getYear();
currentmonth = today.getMonth();
MonthLabel.text = Months[currentmonth];
MonthLabel.text += " " + (currentyear + 1900);
MonthLabel.setTextFormat(MonthFormat);
// draw the calendar for today's date
DrawDays();
function ChangeMonth(n) {
   if (n == 1) {
      if (currentmonth < 11) {
         currentmonth += 1;
      } else {
         currentmonth = 0;
         currentyear += 1;
         // check for leap years and adjust february appropriately
         leapyear = false;
         y = (currentyear + 1900) / 4;
         y = y.toString();
         ysplit = y.split(".");
         if (ysplit.length == 1) {
            February = 29;
         } else {
            February = 28;
         }
      }
   } else {
      if (currentmonth > 0) {
         currentmonth -= 1;
      } else {
         currentmonth = 11;
         currentyear -= 1;
         // check for leap years and adjust february appropriately
         leapyear = false;
         y = (currentyear + 1900) / 4;
         y = y.toString();
         ysplit = y.split(".");
         if (ysplit.length == 1) {
            February = 29;
         } else {
            February = 28;
         }
      }
   }
   MonthLabel.text = Months[currentmonth];
   MonthLabel.text += " " + (currentyear + 1900);
   MonthLabel.setTextFormat(MonthFormat);
   DrawDays();
}
function DrawDays() {
   NewDate = new Date((currentyear + 1900), currentmonth, 0);
   FirstDay = NewDate.getDay();
   highlighttoday = false;
   n = new Date();
   if (n.getMonth() == currentmonth && n.getYear() == currentyear) {
      highlighttoday = true;
   }
   // remove old day text         
   for (i = 0; i < 42; i++) {
      this[i].DayValue.text = "";
      this[i].highLightDay.gotoAndStop(1);
      this[i].DayValue.textColor = 0x000000;
   }
   // add new day text
   counter = 1;
   // remove leading unused days
   if (FirstDay > 0) {
      for (i = 0; i < FirstDay; i++) {
         this[i]._visible = false;
      }
   }
   for (i = FirstDay; i < 42; i++) {
      if (counter <= eval(Months[currentmonth])) {
         if (n.getDate() == counter && highlighttoday == true) {
            this[i].highLightDay.gotoAndStop(2);
            this[i].DayValue.textColor = 0xCC0000;
         }
         this[i].DayValue.text = counter;
         this[i]._visible = true;
         this[i].onRelease = function() {
            eval(DayPressFunction)(this.DayValue.text, currentmonth + 1, (currentyear + 1900));
         };
      } else {
         this[i]._visible = false;
      }
      counter++;
   }
}



and this on time line

Code:

function DayPress(d:Number, m:Number, y:Number):Void {
   tfDate.text = d + m + y;
   tfEventInfo.text = "There are no events accosaited with this date.";
   break;
   if (vDate == 152006) {
      tfEventInfo.text = "It worked";
   } else if (vDate == 252006) {
      tfEventInfo.text = "It worked again";
   } else if (vDate == 352006) {
      tfEventInfo.text = "It worked again a third time";
   }
}
//
// blarh blarh blarh    ////////////////

Calendar.DayPressFunction = "_root.DayPress";


thanksInAdvance()


:wink:

Calendar Help
Hi all,
Im new to flash..
is it possible to create a 3 month calendar on flash... where shld i start
Thxz x LOT!!!

Quick Calendar
I am making a countdown, and a calendar... I have a script to display how many days are left...so there is no problem with the countdown.

What I want to do with the calendar is this:
there are two months of the calendar displayed.
Say October and November, if a certain day is passed then i want it to be marked off on the calandar. Does anybody know how i could do this. I am using flash 5.

Thanks for the help.
Todds

An Old Style Calendar?
do you remember the old calendar in the praystation page?
I think surely yes!!...cause was one of the innovations of the guru....
I was searching a tutorial or a fla to study cause i like to make my own and understand how it works...

well, I don't find it nowhere...
please help:
do you know where to find?

tnx
Al

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