A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 31

Thread: Calendar

  1. #1
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632

    Calendar

    I tried to make a calendar in Koolmoves.

    What I've go so far is a working calendar using xml data for input.

    Since I don't know actionscript very well, I hope someone who does can take a look at it. The code could probably be a lot easier and better. Some things I'm wondering about...

    - Is it allowed to use strings as an index for an array.
    - Is it possible to create gradient fills using actionscript.

    I used a lot of movieclips. Could the mx drawing commands make things easier ?

    Wilbert

    http://www.geboortegrond.nl/koolmove.../calendar.html

  2. #2
    Relaxing tmoore935's Avatar
    Join Date
    Oct 2001
    Location
    colorado, usa
    Posts
    1,713
    This is actualy another useful item that one could attach a logo or name to that a PC user would use. This does not answer your question but I have been trying to learn ways in making apps with flash technology. (and I do have a reason for this). Have not looked at the fun file yet because It will not let me download, and someone else needs to answer the action script questions. I like this.
    Any programming language is at its best before it is implemented and used.

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    Although I don't think it is possdible, could be wrong here, to create gradients with the color object existing gradients are effected.

    this is the MM example for using the color object;

    Code:
     // Create a color object called   myColor   for the target   myMovie 
     myColor = new Color(myMovie); 
     // Create a color transform object called   myColorTransfrom   using 
     // the generic Object object 
     myColorTransform = new Object(); 
     // Set the values for   myColorTransform 
     myColorTransform = { ra: '50', rb: '244', ga: '40', gb: '112', ba: '12', bb: '90', aa: '40', ab: '70'}; 
     // Associate the color transform object with the Color object 
     // created for   myMovie 
    myColor.setTransform(myColorTransform);

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Posts
    289
    That's neat!

  5. #5
    Senior Member
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    379

    Re: Calendar

    Very nice Wilbert - I like it.
    If you don't know Actionscript very well, you have done a great job! Did you work it out yourself or get the code from somewhere?
    Is it allowed to use strings as an index for an array.
    Sort of - you can use a structure known as an associative array - although you cant use the array methods to manipulate it, you use array syntax to access it.

    myObject = new Object();
    myObject["fName"] = "Hilary";
    myObject["lName"] = "Bridel";

    You can access it like this:
    for (i in myObject){
    txt1+= i + " | "+myObject[i]+"\n";
    }
    Is it possible to create gradient fills using actionscript.
    The MX drawing API does gradiant fill, but is not implemented yet....

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    Yeah, The Flash 5 Color Object is in there already but no gradient fills from it.

  7. #7
    Senior Member
    Join Date
    Jun 2001
    Posts
    289
    Gradients - If you use literals as parameters, it can sneak through. If you use variables for the parameters, turn them into expressions (eg, multiply by 1), which works in some cases. Be prepared to be a bit frustrated until you find the klurge that works for you. Once it works it stays working. You may have to use the (also not implemented?) matrix approach, which can also sneak through

    Addendum:

    Now I am sorry I posted this, just in case you get bogged in it. Please ignore!
    Last edited by OwenAus; 12-19-2002 at 02:01 AM.

  8. #8
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Most of the code I worked out myself. I didn't have another calendar script as an example. I like thinking about things as how to calculate the places where to put the days for each month. However for how to use events and xml I used your examples.

    I do have some scripting experience in php but lack a good actionscript documentation. The string as index is a good example. I tried it and it worked but couldn't find out if it was allowed.

    By the way. If I draw two objects in koolmoves and place them on the same coordinates they are sometimes a pixel off. How accurate is koolmoves internally ? I know it has something to do with decimals (sub pixels ?).
    Does this only occur when drawing objects manually or also when drawing with actionscript ?

    Wilbert

  9. #9
    Senior Member
    Join Date
    Sep 2002
    Posts
    106

    Link

    Is it possible to link a certain
    datebutton to a website ?
    www.flashflow.be

  10. #10
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    I hope this will do ? !
    Attached Files Attached Files

  11. #11
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    By the way. If I draw two objects in koolmoves and place them on the same coordinates they are sometimes a pixel off. How accurate is koolmoves internally ? I know it has something to do with decimals (sub pixels ?).
    Does this only occur when drawing objects manually or also when drawing with actionscript ?

    -> KoolMoves is floating point accurate internally. SWF is accurate to 1/20 pixel. I will need an example. This problem should not arise if using actionscript.

  12. #12
    KAW
    Join Date
    Jan 2007
    Posts
    32
    Is it possible to add control to the calendar dates.
    e.g when you click on a date it returns the date in a variable for use in a dynamic text box.

    And also error checking i.e. only dates which fall on the weekend can be selected.

    I´m looking to incorporate this in the contact form.

    Has anyone done anything similar or am i better off purchasing a flash calendar off the net somewhere.? Is also possible to incorporate these in koolmoves?

    Thanks
    Kevin

  13. #13
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    I got confused by the first thread in this posting in which Wilbert said that he didn't know action scripting very well. Then I looked at the date which is 2002.

  14. #14
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Me too.... I was very confused and was looking very hard at the user name to make sure someone wasn't posing as Wilbert.... LOL four years he's learned alot eh?

  15. #15
    I C SERVERS Makulaf's Avatar
    Join Date
    Dec 2003
    Location
    Fredericksburg, VA
    Posts
    506
    lol same here took me a few looks
    ~~Drew~~
    New Tutorial Site Coming
    Soon
    http://board.flashkit.com/board/show....php?p=4118485

  16. #16
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by blanius
    LOL four years he's learned alot eh?
    I like to think I have
    If you look at my join date it says Dec 2002. The post was also from that month so I was a newbie back then

    But to answer the questions of TTP World...
    You can incorporate external movies without changing them but not use a .fla source file. It's possible to modify the code of my calendar. If I understand you correctly, you don't want the whole xml part to list events but only need a date picker ?

    Wilbert

  17. #17
    KAW
    Join Date
    Jan 2007
    Posts
    32
    Yes I want a date picker is whatI was trying to say.

    Oh and sorry for picking up on an old thread, I didnt want to start another one uneccessarily lol.

    Thing is I´m not sure what code to use

    Kevin.

  18. #18
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    date picker would be useful component.

  19. #19
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Here's a modified version of the original calender.
    Maybe it helps.
    Attached Files Attached Files

  20. #20
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    seems I can only select a Saturday

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