Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ActionScript 3 Problem

Name: Anonymous 2012-03-08 2:09

so yeah basically, im having this problem where i stuffed a bunch of arrays into one array, and i have to have the arrays shuffled in that one. the issue is that when i regularly call the function "sequence(combinations);" it tells me that the property is undefined when it isnt. i stuffed in a void, and it works but doesnt return anything and the program works as if combinations were never in array in the first place. help would be appreciated.







        public var i:int;
        public var l:int = combinations.length;
        public var lite:Object; //temporary storage for swapping
       
       
       
       
        public var combinations:Array = ["high_card", "one_pair", "two_pair", "three_kind", "straight", "straightkick", "straightlose", "straighttie", "flush", "flushlose", "flushtie", "fullhouse", "four_kind", "sflush", "royalflush"];
       
        public static var debug_cards:Array = ["combinations"];
       
       
   
        public var high_card:Array = [[[3, 4], [4, 5]], [[4, 4], [2, 8]], [[4, 13], [1, 4]], [[4, 4], [2, 10]], [[4, 10], [1, 4]], [[1, 6], [3, 7], [3, 9], [2, 2], [1, 12]]];
        public var one_pair:Array = [[[3, 4], [4, 4]], [[4, 4], [2, 9]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 10], [1, 4]], [[1, 6], [3, 7], [3, 9], [2, 10], [1, 11]]];
        public var two_pair:Array = [[[3, 4], [4, 4]], [[4, 4], [2, 9]], [[4, 10], [1, 4]], [[4, 4], [2, 2]], [[4, 10], [2, 3]], [[1, 6], [3, 7], [3, 10], [2, 11], [1, 11]]];
        public var three_kind:Array = [[[3, 4], [4, 3]], [[4, 4], [2, 9]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 10], [1, 4]], [[1, 6], [3, 7], [3, 9], [2, 9], [1, 2]]];
        public var straight:Array = [[[3, 4], [4, 3]], [[4, 4], [2, 10]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 10], [2, 10]], [[1, 6], [3, 7], [3, 5], [2, 9], [1, 9]]];
        public var straightkick:Array = [[[3, 4], [4, 1]], [[4, 4], [2, 3]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 4], [2, 10]], [[1, 6], [3, 7], [3, 5], [2, 4], [1, 3]]];
        public var straightlose:Array = [[[3, 4], [4, 3]], [[4, 9], [2, 9]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 4], [2, 10]], [[1, 6], [3, 7], [3, 5], [2, 9], [1, 9]]];
        public var straighttie:Array = [[[3, 4], [4, 3]], [[4, 4], [2, 3]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 4], [2, 10]], [[1, 6], [3, 7], [3, 5], [2, 9], [1, 9]]];
        public var flush:Array = [[[4, 8], [4, 6]], [[4, 4], [4, 5]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 10], [1, 4]], [[4, 7], [4, 9], [4, 11], [2, 12], [2, 13]]];
        public var flushlose:Array = [[[4, 2], [4, 3]], [[4, 4], [4, 5]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 10], [1, 4]], [[4, 7], [4, 9], [4, 11], [2, 12], [2, 13]]];
        public var flushtie:Array = [[[3, 2], [3, 3]], [[4, 2], [4, 3]], [[2, 3], [1, 2]], [[2, 2], [2, 3]], [[1, 2], [1, 3]], [[4, 7], [4, 9], [4, 11], [4, 12], [4, 13]]];
        public var fullhouse:Array = [[[4, 4], [4, 4]], [[4, 4], [2, 9]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 10], [1, 4]], [[3, 6], [4, 4], [3, 5], [2, 9], [1, 9]]];
        public var four_kind:Array = [[[4, 4], [4, 4]], [[4, 4], [2, 9]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[4, 10], [1, 4]], [[3, 6], [4, 4], [3, 4], [2, 3], [1, 9]]];
        public var sflush:Array = [[[4, 4], [4, 5]], [[4, 3], [2, 9]], [[4, 10], [1, 4]], [[4, 4], [2, 10]], [[3, 10], [1, 4]], [[4, 2], [4, 3], [3, 7], [2, 8], [4, 1]]];
        public var royalflush:Array = [[[2, 4], [2, 3]], [[2, 4], [2, 9]], [[2, 10], [2, 4]], [[2, 4], [2, 10]], [[2, 10], [2, 11]], [[4, 10], [4, 11], [4, 12], [4, 13], [4, 1]]];
       
       
        public function seq():void {
           
        sequence.apply(null, combinations);
           
        }
       
       
       
       
        public function sequence (comb:Array):Array {
           
            for (l - 1; l > 0; l--) {
               
                i = Math.floor(Math.random() * l);
               
                lite = comb[i];
                comb[i] = comb[l];
                comb[l] = lite;
               
                trace(comb);
            }
           
           
         return comb;   
           
        }

Name: Anonymous 2012-03-08 5:40

bump is anyone willing to assist?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List