in

Quark Forums

Suggestions on how to do a "count down the days" o

Last post 01-21-2008 10:23 PM by Matthias Guenther (Quark). 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 01-16-2008 3:11 PM

    Suggestions on how to do a "count down the days" o

    Hi all,
    I want to put in a "count down" object in a web page I'm doing to indicate the user has xx number of days to register for an event. Since we had a clock QID example a while ago, is this something that could be modified to do days?
    Could you point me in a direction to start with and I'll see if I can figure it out? (Not good at code but I'll give it a try!)
    Any help would be greatly appreciated.

    Thanks,
    Kathy
  • 01-16-2008 3:16 PM In reply to

    Suggestions on how to do a "count down the days" o

    Hi, Kathy,

    how are you planning to set the date for the event?
    Inside the SWF? Or by asking a webserver?

    Thanks
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 01-16-2008 5:51 PM In reply to

    Suggestions on how to do a "count down the days" o

    Matthias,
    Now you can understand why I need help! Since I don't know how to set a date on a web server, I guess I'd want to do it inside the SWF.
    Thanks for the help.
    Kathy
  • 01-16-2008 7:59 PM In reply to

    Suggestions on how to do a "count down the days" o

    Hi, Kathy,

    ok, I will try some things.

    One last question before I jump into it: As months during the year have 30 or 31 days (ignore Feb), would it matter if the accuracy of your countdown might be off by one day in case the count down wraps over a month?

    So it would be accurate if you have May 10 and your deadline is May 20, but it might be off one day if the deadline is June 20? I guess it would, hm. Would make it easier though.

    Thanks
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 01-17-2008 10:50 AM In reply to

    Suggestions on how to do a "count down the days" o

    Matthias,
    I guess I could probably simplify this and say that what I need is to have the counter start at a specific number -- say 100 and count down from there each 24 hour period.
    Then we wouldn't have to deal with which months have extra days. I could control the days remaining at any time by changing the start number of the object.
    Sorry I didn't think of this sooner. (Told you I'm not a programmer! )
    Thanks for all of your help,
    Kathy
  • 01-17-2008 4:23 PM In reply to

    Suggestions on how to do a "count down the days" o

    Hi,Kathy,

    sorry for all the qeustions beforehand but normally creating the Interactive Layout is not the diffiuclt thing but thinking of how to do it and what issues might arise.

    k_ahrendt:
    I could control the days remaining at any time by changing the start number of the object.

    Will the SWF never be restarted? So you start it once on a computer and it keeps running? Or do you put in the web somewhere?

    See, the issue is, if the SWF keeps running, then count down is easy. If it is in a web browser, so reloaded every day, then I need to put some calculation in there that looks at "oh, today is Jan 17, so 99 days more to go". Get my dilemma? ;-)

    I'll try something, stay tuned.

    Thanks
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

  • 01-17-2008 8:12 PM In reply to

    Suggestions on how to do a "count down the days" o

    I do see the dilemma. Guess that's why I haven't been very successful in getting some of these things done by myself. I don't know the right questions to ask!

    My plan is to put this SWF into a webpage on our website so when someone looked at the page a banner at the top would say something like:
    You have {SWF Number} days left to register.
    At 12:01 each day the number would decrement until it got to 0. The actual number I need to start with is 66 (it will be posted on February 15) and end on April 20.

    I had hoped that I wouldn't have to update the page each day and I appreciate all of your effort in this. If this type of thing would be better handled using other tools let me know. I can switch tactics if that would be better.

    Thanks,
    Kathy
  • 01-17-2008 8:58 PM In reply to

    Suggestions on how to do a "count down the days" o

    Hi, Kathy,

    hard coded date, great! Big Smile
    Done. That was now easy: QXP here.

    I was thinking too big, I thought you wanted a generic solution where you could put in any deadline in the next 10 years.

    So, last question before I send it to you:
    Is today 94 days left or 95? Or in other words, on April 20 do you want to see 0 or 1 days left?

    You can change it yourself in line 3. Here's how (and what restrictions this example has):
    - Deadline is hardcoded (April 20).
    - If running continuously (e.g. on a dedicated machine), deadline doesn’t update automatically at midnight. A refresh will update the date.
    - The SWF will give funny results if used before Jan 1st or after Apr 20th.
    - On April 20 the countdown shows zero. If you want it to be ‘1’, change line 3 of script to ‘rest=1’.

    You can change the layout completely, just do not delete the middle (empty) box, where the days appear. You can change font and box though.

    Regards
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

    Filed under:
  • 01-18-2008 3:52 PM In reply to

    Suggestions on how to do a "count down the days" o

    Hi Matthias,
    Sorry for the delay in reply... life got in the way.

    You picked correctly in selecting 0 for April 20. That will work fine.
    I will try it out tonight and let you know how it goes

    THANKS so much for your work on this. I really appreciate it.
    Kathy
  • 01-21-2008 10:23 PM In reply to

    Suggestions on how to do a "count down the days" o

    Hi, Kathy and all,

    my ambition didn't let me rest. ;-)

    I created a flexible solution which should work correctly with any date, that is not more than 1 year away.

    Try it, the design is minimal, however the scripts should work and show some more advanced scripting. If you do not like or want to know about scripting, just fill in the right deadline date in the first lines of the 'Initialize' script and ignore the rest.

    Delete everything except for the two empty boxes, which you can format in any way (font size, color, box shape, box design). Just don't delete them.

    Here's the SWF:
    Click here for DAYS LEFT until March 26.

    Here's the source (QXP).

    Enjoy!
    Matthias


    P.S.: Yeah, it is not perfect yet, leap years need to be corrected manually and roll overs have a disadvantage that if you miss the deadline by one day it starts calculating again (for next year's date). Feel free to improve Big Smile
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling frequently, answering your post might sometimes take longer)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need help? Contact Quark's support: http://support.quark.com/contact_us.html


    Please don't install the newest update 10.7.3 of Mac OS X Lion yet.
    For details please see here: http://goo.gl/AzKeR

Page 1 of 1 (10 items)
Powered by Community Server (Commercial Edition), by Telligent Systems