In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: Array bug

Get Adobe Flash player
by Quasimondo 23 Feb 2011
  • Forked from makc3d's Array bug
  • Diff: 4
  • Related works: 1
  • Talk

    9re at 23 Feb 2011 13:10
    this crashed my flash player WIN 10,2,154,12 debug=NO which is embeded in Chrome
    makc3d at 23 Feb 2011 16:02
    hangs here, too. probably because of line 10, trace (..., a). at that point a is supposed to be very big array
    9re at 23 Feb 2011 20:11
    @makc3d at the time i saw this i didn't have any time to inspect which part causes the hang but you are right!
    Embed
// forked from makc3d's Array bug
package {
    import com.actionscriptbible.Example;
    public class FlashTest extends Example {
        public function FlashTest() {
            // http://juick.com/valyard/1230690
            var a:Array = ["bla"];
            trace( a is Array, a );
            a[ int.MAX_VALUE ] = "bla2";
            trace( a is Array, a );
            trace( a.length ); // 0
            a.push(1, 2, 3);
            trace( a.length ); // 0
            trace( a[0] ); // 3
            trace( a[ uint.MAX_VALUE ] ); // "bla2"
        }
    }
}