// stops all currently running animations when clicked default { touch_start(integer num_detected) { llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if(perm & PERMISSION_TRIGGER_ANIMATION) { list anims = llGetAnimationList(llGetPermissionsKey()); // get list of animations integer len = llGetListLength(anims); integer i; llSay(0, "Stopping " + (string)len + llGetSubString(" animations",0,-1 - (len == 1)));//strip the "s" when there is only 1 to stop. for (i = 0; i < len; ++i) llStopAnimation(llList2Key(anims, i)); llSay(0, "Done"); } } }