dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Can anyone help? Want Input Text to control goto action

  1. #1
    www.travisbakerdesign.com
    Join Date
    Dec 2005
    Posts
    42

    Can anyone help? Want Input Text to control goto action

    I am going to provide an input field which I want to control where the playhead goes.

    The input field will ask for a specific date in a specific format. i.e...dd/mm

    and when the user enters 05/23 (or May 23rd) and presses a button,

    I want the playhead to gotoAndPlay("05/23");

    Can anyone help me please? i know it has something to do with setting and getting properties, but I can't figure it out.

    Thanks !!!

    -Travie_B

  2. #2
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    here is a sample i made really quick. I just did the "5/23" to show how it works.

    this is in mx2004 format

  3. #3
    www.travisbakerdesign.com
    Join Date
    Dec 2005
    Posts
    42
    Thats great, only I want the 5/23 to be defined by the users input , not defined within the code. You see, I have almost a full years worth of dates assigned as names of frames...and the users input needs to be pulled from the input box as the goto frame name.

    Thanks for any help you can give me.

  4. #4

  5. #5
    www.travisbakerdesign.com
    Join Date
    Dec 2005
    Posts
    42

    I hope this helps

    Sure- basically what I am trying to do is make a calculator that will determine dates for certain events. By the user inputting a specific launch date, I will then use different buttons to send them to a specific date a certain distance from the launch date. The buttons will be labeled to determine exact details as to what type of campaign they will launching, and therefore what date the playhead will land on.

    So far, I have created almost half the frames of the avilable dates. The reason I took this approach is that only working days will be taken into account. If the user inputs a date that does not appear as a label on the timeline, they will be sent to a frame which tells them that the date is not a working day. Obviously, this will only work for the coming year, and wil need to be revised in 2007.

    Thanks again!!!
    Attached Files Attached Files

  6. #6
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Hi
    Maybe this...
    As an example:
    code:
    stop();
    findDate = "";
    btn.onPress = function() {
    if (findDate == "01/04" || "January 4th" || "Jan 4th") {
    gotoAndStop("01/04");
    findDate = "";
    }
    if (findDate == "01/05" || "January 5th" || "Jan 5th") {
    gotoAndStop("01/05");
    findDate = "";
    }
    if (findDate == "01/06" || "January 6th" || "Jan 6th") {
    gotoAndStop("01/06");
    findDate = "";
    /////etc////etc////etc
    }
    };


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