Random sound event

hello people,\r\ri am trying to write a script that generates a random sound. i like to make it a framescript but i am not sure how to do this, so i appended it to a movieclip (see below) but this doesn’t work… does anyone have an idea why? also, does anyone know how to turn this into a framescript?\r\rTIA, meesje\r\r–\ronClipEvent (enterFrame) {\r randy = random(5);\r if (randy=1) {\r s = new Sound();\r s.attachSound(“coolsound”);\r s.start();\r }\r}

if (randy=1) {\r\rshould be\r\rif (randy==1) {\r\ryou forgot the second equals sign.\r:) \rjeremy

hey thanks! it works!happy happy =) here\r\rnow i have tried to put the below in a framscript, but it’s no go… did i forget something?\r–\rrandy = random(5);\rif (randy=1) {\rs = new Sound();\rs.attachSound(“coolsound”);\rs.start();\r\ralso is there any way to set the sync property of that sound\ri mean: event, start, stop stream?\r\ror alternative scripted ways to layer sound upon sound?\rideas are very welcome\r\rthanks, meesje

if you want to sync sounds you need to use director. even when using streaming flash doesn’t do sound well.\rmaybe in MX there are more sound object options.\r:) \rjeremy

thanks jeremy\r\rstill, do have any idea why the below doesn’t work in a framescript?\r\rrandy = random(5);\rif (randy==1) {\rs = new Sound();\rs.attachSound(“coolsound”);\rs.start(); }\r

BTW sync properties (event, start, stop stream) are typically set in flash not in director (last time i used it, which was version 7)… in flash it is set in the sound panel but there has got to be a way to set these through actionscript as well… i hope