A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 33 of 33

Thread: Calendar Component

  1. #21
    do a right click and save as. Your browser is trying to read the file instead of dl it. You might have to rename it .fla if you dl it like that also.
    [Edited by amonteiro on 03-20-2002 at 05:02 PM]

  2. #22
    Senior Member
    Join Date
    Sep 2000
    Posts
    298
    Squareball2: hey man I am not trying to change the point of this thread but how do you make the code in your posts look like that?

  3. #23
    Senior Member
    Join Date
    Mar 2002
    Posts
    334
    Code:
    Like This???
    Just use [*code] [*/code]
    (remove the *s)


  4. #24
    Senior Member
    Join Date
    Sep 2000
    Posts
    298
    Thanks much!

    Code:
     I think it works

  5. #25
    Junior Member
    Join Date
    Mar 2002
    Posts
    6

    date filtering..

    I have got the calendar working so that you can click on dates and it grabs the data from a php script and displays it on the fly.

    However, like other people in this thread, I want to be able to make only dates with info selectable. I have written a php script that outputs the days that have info for a given month+year as follows: &day0=28&day1=29

    However, how can I utilize this script and its returned variables to set the selectable dates??

  6. #26
    I've been trying to do that for a few days now and it seems to be working now. My file isn't well documented or anything and niether is it fully completed, so I'm going to give you an overview of what it does. My code is in the main timeline as well as in the component.
    http://www.kore-web.com/amonteir/port/cal.zip
    To see the code
    1. right click the component on the stage and say edit in place
    2. right click the next month arrow and do edit in place
    3. click on frame 1 in the actions layer. I have commented there with "//my code" to show what I have written.
    4. where it says reload the array you need to write some code to load your data from the database.

    Play around with it, its a little hard to explain. I'm still working on it and will post something as soon as I finish it.
    [Edited by amonteiro on 03-26-2002 at 12:44 PM]

  7. #27
    Junior Member
    Join Date
    Mar 2002
    Posts
    6
    The problem isnt that I cant do the datefiltering (I have that working properly when I create the array in actionscript), its that I cant get information from a PHP file into an array in flash and use it.. I've tried so many different things but it doesnt seem to work..

  8. #28
    Senior Member
    Join Date
    Jul 2000
    Posts
    218
    Create a PHP script that creates a delimited text string, and load it in Flash. Here's some code that sends a string from a text file:

    Code:
    
    // This script will read each line of a text file and include each line in an array
    
    $lines = file("data.txt");
    foreach ($lines as $value)
    {
    	print trim($value).",";
    }
    
    
    // And this would be the text file 'data.txt':
    &data=var1,var2,var3&loaded=1
    Flash then picks up the string and associates it with variable 'data'. Here's the actionscript to create the array out of the variable 'data':

    Code:
    // Create a Flash array object
    mouthList1 = new Array();
    // Split the incoming data into that array object
    mouthList1 = data.split(",");
    Of course, this could also be a query result set, XML, whatever.

    Now, my problem:

    I'd like to be able to make selectable days execute an asfunction. They need to be HTML encoded for this. I can't seem to get at the text fields. Why can't I get to these fields?
    [Edited by mbritton on 07-01-2002 at 01:18 AM]

  9. #29
    If you're still out there....I was looking at your calendar.fla and wondering - how could you set it up so that certain days are shown in bold or a different color if there are events attached to those dates?

  10. #30
    Senior Member
    Join Date
    Jul 2000
    Posts
    218
    Code:
    // On _root:
    
    	dateFilter = new Object();
    	dateFilter.isSelectable = function(comp, dt) {
    		var day=dt.getDate();
    		var month=dt.getMonth();
    		var year=dt.getFullYear();
    		for (var i in calDay) {
    			if (day==calDay[i] && (month==calMonth[i]-1) && year==calYear[i]) return true;
    		}
    		return false;
    	}
    	cal.setDateFilter(dateFilter);
    
    // ...makes all other date fields unselectable.

  11. #31
    I came into this thread late and I was interested in looking at your code at http://www.kore-web.com/amonteir/port/cal.zip.

    However, I get a page cannot be found error. Is that code still available somewhere else?

    What I'm looking to do is if there is a date that has an event attached to it, show that date in the calendar in a different color. That way someone looking at the calendar would know right away what dates have events.

  12. #32
    Junior Member
    Join Date
    Nov 2000
    Posts
    5

    running out of time....please help!

    losing my mind over this...

    trying to configure the calendar component similar to the day-selection here, but to display the whole month's events. so for march it would show all dates w/events in the text box, and each time you click on the arrow to go to another month, the corresponding month's events would pop up in the text box. can anyone help?

    much appreciated!

  13. #33
    Senior Member
    Join Date
    Apr 2001
    Posts
    109

    Calendar actions/Definitions

    I was wondering if someone could point me to a dictionary or refrence for the calander component actions? I do not have the UI installed and do not have the deffinitions in the FLash MX. Is there a website that has them, I looked all over Macromedias site and havn't found jsut the deffinitions, just alot of stuff about it.

    Basicly I want to show/highlight the dates that have events loaded from an database (PHP/SQL).

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