This content has been marked as final. Show 4 replies
in your fla library right click on your sound, click linkage, tick export for actionscript and type a name in the id field that you will use in your actionscript to reference your sound (say sound1).
you can then use:
Thanks for your response - though unfortunately I can' t get it to work.
I've tried moving the first part of the script to just outside the hitTest, and also to the top of the page, but with no success.
It doesn't give me any errors when I publish it which is strange, and suggest it is working - but still no sound.
Just tried to trace "play", and it does indeed occur when my player is hit.
Why wouldn't it actually play the sound? I've given it the linkage name "beenHit" and given S the same name.
post the code you used.