================= problemI can't find a solution fora. randomly set shape_1 _2 or _3 to shape_selectb. set the remaining two shape_x to something different than shape_select and different from each other (using the shape_all list)

I was used to be working with Director Shockwave Lingo

Have a look at www.chato.nl/ipad and hit the blue balloon (second screen) to see the progress

Hope someone can help me on this one! (arrays/lists are not easy in C2 for me yet) TNx!

You can either,a:set a global to"red,blue,purple,yellow,orange", then pick a token in that string with getToken(int(random(5)),",").... comma is the delimiter.B: Use the system expression choose, like choose(red,blue,purple,yellow,orange)

Dont use shape_1, shape_2 and shape_3 but an arrayElse you will have to rewrite the whole thing for each[code]global text shape_all = "shape_red:shape_blue:shape_purple:shape_yellow:shape_green:shape_orange"global shapeCount = 3 // number of shape you want+System: on start of layout -> Array: set size to shapeCount,1,1 + Array: foreach X elements -> Array: set value at (self.CurX) to "empty"+On What you want Local text tmp = "" // copy to keep the original intact +repeat shapeCount times -> System: set tmp to shape_all -> Array: set value at loopindex to (tokenat(tmp,floor(random(tokencount(tmp,":"))),":")) -> System: set tmp to replace(tmp,Array.At(loopindex),"") -> System: set tmp to replace(tmp,"::",":") -> System: set tmp to (left(tmp,0,1) = ",") ? right(tmp,len(tmp)-1) : tmp -> System: set tmp to (right(tmp,len(tmp-1),1) = ",") ? left(tmp,len(tmp)-1) : tmp[/code]

The four last actions are used to delete the token from the tmp string. This way you don't pick it again.[code] -> System: set tmp to replace(tmp,Array.At(loopindex),"")[/code]Delete the token leaving the colons1:2:3 -> ":2:3" or "1::3" or "1:2:"

[code] -> System: set tmp to replace(tmp,"::",":")[/code] Check if there's two colons side to side and delete one1:2:3 -> ":2:3" or "1:3" or "1:2:"

[code] -> System: set tmp to (left(tmp,0,1) = ",") ? right(tmp,len(tmp)-1) : tmp[/code] Check if the first character is a colon and delete it1:2:3 -> "2:3" or "1:3" or "1:2:"

[code] -> System: set tmp to (right(tmp,len(tmp-1),1) = ",") ? left(tmp,len(tmp)-1) : tmp[/code] Check if there's a colon on the last character is a colon and delete it1:2:3 -> "2:3" or "1:3" or "1:2"Yann2012-02-29 00:43:38