A Flash Developer Resource Site

Results 1 to 20 of 22

Thread: Logic Bomb... Retrieving "negative" index, and wrap around an Array?

Threaded View

  1. #22
    newb of many sorts Ralgoth's Avatar
    Join Date
    Apr 2002
    Posts
    466
    haha, yeah I didn't get it right until I woke up at 6AM after the whiskey wore off. (most of my friends drunk dial/text... I give drunk coding advice)

    it ended up that you cant check if position is a negative, you have to do the modulo first. otherwise if the position is a multiple of the len then the modulo would be 0, and no longer a negative.

    the above code would return the array's length (len-(0)).

    --- edit --- whiskey goes well w/ coffee.
    Last edited by Ralgoth; 01-19-2010 at 10:33 AM.
    Search first, asked questions later.

Tags for this Thread

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