dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Help with simple randomizer?

Hybrid View

  1. #1
    Member
    Join Date
    Feb 2002
    Posts
    45

    Help with simple randomizer?

    Hi, I know how to do normal frame randomizer but can't figure out how to do it with objects.
    Thats what I'm trying to do: There are 4 pillars(p1MC, p2MC, p3MC, p4MC) and 1 button. Once the mouse is over the button 1 of the pillars(random) has to change alpha to 0. I'm sure that won't take too much time for some pro's to answer this. Please help

    Thanks!

  2. #2
    caithness massiv
    Join Date
    May 2000
    Location
    denver
    Posts
    1,672
    pillars = [p1MC, p2MC, p3MC, p4MC];
    randomPillar = random (pillars.length);
    lastPillar._alpha = 100;
    pillars[randomPillar]._alpha = 0;
    lastPillar = pillars[randomPillar];
    trace (pillars[randomPillar]);
    Last edited by agent vivid; 04-16-2003 at 07:19 PM.

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