# Random BlendMode

**URL:** <https://forum.kirupa.com/t/random-blendmode/301735>\
**Category:** Uncategorized\
**Created:** [December 14, 2009, 10:14pm UTC](https://forum.kirupa.com/t/random-blendmode/301735 "2009-12-14T22:14:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [December 14, 2009, 10:14pm UTC](https://forum.kirupa.com/t/random-blendmode/301735/1 "2009-12-14T22:14:14Z")

</div>

Hey - ive been trying to get a random blendMode choice for some particles im implementing … thing is - i cant work force a string value into the code for a random selection from an array where I have the types as Strings - maybe thats the reason? … anyway if someone could give me a hand - thatd be fab!  
ps, it’s in a class - so Im importing flash.display.BlendMode;

```auto

var blend:Array = new Array("DARKEN","MULITPLY","DIFFERENCE","HARDLIGHT","INVERT","LIGHTEN","SCREEN","OVERLAY");
var num:uint = Math.random()*blend.length;
var typ:String = "BlendMode."+blend[num];
mc.blendMode = typ;
//

```

…If I manually type in one, ie. mc.blendMode = BlendMode.MULTIPLY; … it works ::::  
Thanks!!!
