A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How to pass Datechooser value (date) to dynamic text field?

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    70

    Question How to pass Datechooser value (date) to dynamic text field?

    Hello and Happy New Year,

    I am using the nice AS3 form mailer from Blanius (Koolexchange).
    I added a dynamic text "date_txt" and the component Datechooser, but I do not know how to send the chosen date to the date_txt dynamic text field.

    Any help with detailed instructions is very much appreciated, sorry but I do not know AS. I use KM7.
    Best regards
    joejac

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Create an event that fires when a date is chosen then access the data:

    Actionscript Code:
    //where dc1 is a datechooser
    dc1.addEventListener("change",dateSet);

    function dateSet(e:Event){
        trace(dc1.selectedMonth+"/"+dc1.selectedDay+"/"+dc1.selectedYear);
        }

    so for your usage you would use

    Actionscript Code:
    //where dc1 is a datechooser
    dc1.addEventListener("change",dateSet);

    function dateSet(e:Event){
        date_txt.text=dc1.selectedMonth+"/"+dc1.selectedDay+"/"+dc1.selectedYear;
        }

Tags for this Thread

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