random flash movie

Out of context: Reply #2

  • Started
  • Last post
  • 6 Responses
  • versa0

    say you have 8 "random" MC choices:

    here's one approach...there are other ways...

    depth=0;
    choice = Math.floor ((Math.random() * 8) + 1);
    switch (choice)
    {
    case 1 :
    this.attachMovie ("foo1MC", "fooMC", depth++);
    break;

    case 2 :
    this.attachMovie ("foo2MC", "fooMC", depth++);
    break;

    case 3 :
    this.attachMovie ("foo3MC", "fooMC", depth++);
    break;

    case 4 :
    this.attachMovie ("foo4MC", "fooMC", depth++);
    break;

    case 5 :
    this.attachMovie ("foo5MC", "quoteMC", depth++);
    break;

    case 6 :
    this.attachMovie ("foo6MC", "fooMC", depth++);
    break;

    case 7 :
    this.attachMovie ("foo7MC", "fooMC", depth++);
    break;

    case 8 :
    this.attachMovie ("foo8MC", "fooMC", depth++);
    break;

    default:
    trace ("no case tested true")
    }

View thread