Action Script paradox

Out of context: Reply #3

  • Started
  • Last post
  • 5 Responses
  • CyBrainX0

    I am publishing for Flash MX/AS1

    I got rid of the output error when I removed the () after the "onSoundComplete": alarmSound.onSoundComplete = repeatAlarm;

    It still doesn't execute the function though.

    Here is the code now with the function preceeding it.

    function repeatAlarm() {
    trace("This should theoretically work.");
    alarmSound2 = new Sound();
    alarmSound2.attachSound("gong2...
    alarmSound2.start();
    delete alarmSound2;
    }
    if ((myDate.getHours() == 12) && (myDate.getMinutes() == 47) && (myDate.getSeconds() == 0)) {
    alarmSound = new Sound();
    alarmSound.attachSound("alarm");
    alarmSound.start();
    alarmSound.onSoundComplete = repeatAlarm;
    }

View thread