dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: getHours Problem

  1. #1
    Go create something, anything. Cnic's Avatar
    Join Date
    Feb 2005
    Location
    USA - IL
    Posts
    146

    getHours Problem

    whats up with this?

    hours = getHours();
    trace(hours);

    comes back "undefined" everytime.

    Please tell me im just stupid and not doing something right. I swear, every time I search for this, this is how its done... I know I can read... I promise I can.

    HELP....

    Please.
    "All Men are created equal, but A.M.B.I.T.I.O.N, or lack of it, soon seperates them"

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    var aate = new Date();
    var hours:Number = a.getHours();
    trace(hours);
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Go create something, anything. Cnic's Avatar
    Join Date
    Feb 2005
    Location
    USA - IL
    Posts
    146
    I havent tried that yet.... but assuming that works... why, why would that work rather than what I had before???

    .

    Thanks by the way cancer.
    "All Men are created equal, but A.M.B.I.T.I.O.N, or lack of it, soon seperates them"

  4. #4
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    1. You have to declare a new Date object. getHours() is a method of the Date class.
    2. Then you need to datatype the variable hours. You can use Number, uint or int.

    That's it.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

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