/ Published in: ActionScript 3
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 var COUNT:int = 10; var a:Array = new Array( COUNT ); //Vector.<Number> = Vector.<Number>( new Array( COUNT )); //a.fixed = true; var writeTo:Object; var i:int; while ( i < COUNT ) { writeTo = a[ i ]; //testing that we indeed have access to the index a[ i ] = Math.random(); writeTo = a[ i++ ]; } while ( i >= 0 ) { a.pop(); //if a is a Vector, this will throw a run-time error i--; }
Comments
                    Subscribe to comments
                
                