A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: easy for someone

  1. #1
    Member
    Join Date
    Oct 2002
    Location
    England
    Posts
    80

    easy for someone

    I'm attaching a movieclip to the stage and then setting certain variables to create a rondom feel. I want flash to randomly select NORMAL or MIRRORED. The effect is just a horizontal flip of the original movieclip. I know this is easy for someone, please help.

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    you can horizontally flip a movie clip with,

    instanceNameOfClip._xscale *= -1;

    so you could have a random chance of the clip being flipped using,

    if (Math.random() < 0.5) { // 50% chance
    instanceNameOfClip._xscale *= -1;
    }

    hope this helps

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