A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Coding problem is an array the way?

Threaded View

  1. #1
    Senior Member Jaffasoft's Avatar
    Join Date
    Apr 2001
    Location
    On Travel
    Posts
    1,588

    Coding problem is an array the way?

    I'm not sure how to do this.

    How can I set an array and push "RED" into it and when it get's to 'x' amount of RED's say RED,RED it traces something but if it's interupted and it goes RED,RED,BLACK it doesn't.

    Is this to confusing already!

    It's a casino betting sytem basically once there is 7 RED straight I want to make a bet $5 on Black and if the RED comes out again then double the bet to $10 etc on and on but once it wins then change it back until another straight seven off any color comes out straight again.

    I have the random number selecting 0 through to 36 and a ZERO what it does is trace("RED"); or trace("BLACK");

    I'm so far thinking if I put something like this in there? But i haven't got anywhere near the making betting code yet. Any help would be great for a start. It's only to simulate making the bets using this betting theory to see the results it's not to make a game just testing the code so that it runs and traces results money count etc for a few hundred spins or enter frames in this case
    .

    display = new Array();
    display.push("RED");
    if(display.Array == RED,RED){
    trace("two reds");
    }
    Last edited by Jaffasoft; 04-20-2006 at 06:01 AM. Reason: Why is this stupid reason thing here for?

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