Re: [Flashcoders] Adding n days to dateField.selectedDate
On 14/04/2008 01:34, Gabino Travassos wrote: If I want 283 days in the future I add 1208129349 + (283 days *24 hours*60 minutes*60second) = 1232580549 and I convert that to whatever date format I want. Gabino's right, and the Date class makes it easy : var d:Date=new Date(2008,3,14); d.time+=(8640*283); // 283 days, in milliseconds trace(d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate()); // 2009/1/21 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Adding n days to dateField.selectedDate
Hi Alan I found the easiest way to work with dates to keep from having to do this all the time is to start with unix date time, do calculations on it, and then convert it back to whatever format you want. For example, today is 1208129349, which is that many seconds past the Unix epoch start time, which is January 1, 1970. (http://en.wikipedia.org/wiki/Unix_time) If I want 283 days in the future I add 1208129349 + (283 days *24 hours*60 minutes*60second) = 1232580549 and I convert that to whatever date format I want. It saves the hassle of having to count months and end of years and all that. Luck - Original Message - From: "Alan Neilsen" <[EMAIL PROTECTED]> To: Sent: Sunday, April 13, 2008 5:10 PM Subject: [Flashcoders] Adding n days to dateField.selectedDate I am building a cattle birthing calculator. Can anyone help me with the code to add a certain number of days (usually around 283) to the output of a dateField.selectedDate (breeding date) so the result can be put into a string and output to a text field such as, "The estimated birthing date is 7/7/2008." Currently my output can show spurious dates like the 13/33/2008, and I assume there is an easy way of adding days and ending up with a real date. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Adding n days to dateField.selectedDate
I am building a cattle birthing calculator. Can anyone help me with the code to add a certain number of days (usually around 283) to the output of a dateField.selectedDate (breeding date) so the result can be put into a string and output to a text field such as, "The estimated birthing date is 7/7/2008." Currently my output can show spurious dates like the 13/33/2008, and I assume there is an easy way of adding days and ending up with a real date. This message is for the named persons use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or; lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of any such entity. # This e-mail message has been scanned for Viruses and Content and cleared by NetIQ MailMarshal and Goulburn Ovens Institute of TAFE # ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] TweenLite, AS2 and negative _xscale
- Original Message - From: "Paul Andrews" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Sunday, April 13, 2008 10:24 PM Subject: [Flashcoders] TweenLite, AS2 and negative _xscale My first outing with TweenLite (AS2). I've been donated a walk cycle for a project and it sits nicely in a MovieClip. The walk-cycle is facing left, so I can animate the MovieClip right to left using TweenLite. Perfect. Problem is that going the other way, I've tried flipping the MovieClip so that it points the to the right by negating the _xscale property. Works perfectly until I try and animate the flipped MovieClip with TweenLite. It dissapears. Remove the negation and it's fine. Leave the MC untweened and it just plays in situ, as expected with the negative _xscale. Doesn't matter if I flip the horizontal using the ide or do it in actionscript. I could flip every frame of the walk cycle inside the MC but that's tedious and leaves me with a clean-up operation. Anyone done this with TweenLite, or should I give up on TweenLite with a MC with a negative _xscale? Just to say that I've solved the problem by nesting the flipped walk cycle MovieClip in another MovieClip. Happiness. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] mm_jsapi.h and DLLs and JSFL
Google is your friend: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=4603.html - Original Message - From: "Keith" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Saturday, April 12, 2008 10:53 PM Subject: [Flashcoders] mm_jsapi.h and DLLs and JSFL I'm trying to learn more about writting a DLL for JSFL I'm reading the Flash CS3 docs and it has an example C code with a "mm_jsapi.h" header file include in their sample code. -However, I cannot find this "mm_jsapi.h" file in the Adobe CS3 installation. -I searched Adobe's site looking for info on the "mm_jsapi.h" file with no luck. Does Adobe have an SDK on DLLs for JSFL? Any and all help pointing me in the right direction is appreciated! -- Keith H -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] TweenLite, AS2 and negative _xscale
My first outing with TweenLite (AS2). I've been donated a walk cycle for a project and it sits nicely in a MovieClip. The walk-cycle is facing left, so I can animate the MovieClip right to left using TweenLite. Perfect. Problem is that going the other way, I've tried flipping the MovieClip so that it points the to the right by negating the _xscale property. Works perfectly until I try and animate the flipped MovieClip with TweenLite. It dissapears. Remove the negation and it's fine. Leave the MC untweened and it just plays in situ, as expected with the negative _xscale. Doesn't matter if I flip the horizontal using the ide or do it in actionscript. I could flip every frame of the walk cycle inside the MC but that's tedious and leaves me with a clean-up operation. Anyone done this with TweenLite, or should I give up on TweenLite with a MC with a negative _xscale? I must have done something pretty stupid. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders