A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Array kookiness

Hybrid View

  1. #1
    Junior Member
    Join Date
    May 2002
    Posts
    11
    Anyone see why this should return the character "T" instead of "Thu"? The original dynamic text elemnt has plenty of room to render 3 characters.

    onClipEvent (load) {
    myDay = new Date();
    dayname = ["Sun", "Mon", "Tue", "Wen", "Thu", "Fri", "Sat"];
    datenum = myDay.getDay();
    code2 = dayname[datenum];
    }

  2. #2
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    onClipEvent (load) {
    myDay = new Date();
    dayname = new Array("Sun", "Mon", "Tue", "Wen", "Thu", "Fri", "Sat");
    datenum = myDay.getDay();
    code2 = dayname[datenum];
    }

    Use that.

  3. #3
    Junior Member
    Join Date
    May 2002
    Posts
    11

    Arrays

    that does the same thing (I tried it last night) returning only "T" the notation I am using is just cleaner but equal to the long format new array call.

  4. #4
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    I just tried the code I gave above and it worked. Gave me Thu

  5. #5
    Junior Member
    Join Date
    May 2002
    Posts
    11

    Stuck

    Here is the file I built.

    It's exactly as far as I can tell like the above example and in the format my flash book says the array and getDate commands should work. Maybe someone can look at it and run it there to see if it does for you what it does for me?

    http://aequa.willenskraft.com/Files/status.zip

    HTML Code:
    <img border="0" src="http://aequa.willenskraft.com/images/coding/puzzler.gif" width="408" height="202">

  6. #6
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    In your embedded fonts fot that text field, you only have certian letters loading. Change that to all.

  7. #7
    Junior Member
    Join Date
    May 2002
    Posts
    11
    Wow it's always something silly like that thanks!!!

    I have noticed that Flash MX inherits the last active property (fonts, text char type, etc...) into the next work phase is there any way to turn this off so it just uses the apps defaults?

  8. #8
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    I don't know but if you found out, please tell me. I would like to turn that off too.

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