Mouse Event Nightmare....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lalalandgirl
    New Member
    • Feb 2008
    • 1

    Mouse Event Nightmare....

    Hi All,

    I'm really hoping someone can help me with this problem.

    I keep getting an 1120 error message:access of undefined property message on this code. I know I'm missing something but what? It has to do with the line

    sound.addEventL istener(Event.C OMPLETE, onComplete);

    I don't get it.....please help.

    var sound:Sound = new Sound();
    var soundReq:URLReq uest = new URLRequest("ns-1.mp3");
    var soundControl:So undChannel = new SoundChannel();
    sound.load(soun dReq);

    sound.addEventL istener(Event.C OMPLETE, onComplete);

    function onCompete(event :Event):void
    {
    button1_btn.add EventListener(M ouseEvent.ROLL_ OVER, play);
    button1_btn.add EventListener(M ouseEvent.ROLL_ OUT, stop);
    }

    function playSound(event :MouseEvent):vo id
    {
    soundControl = sound.play();
    }

    function stopSound(event :MouseEvent):vo id
    {
    soundControl.st op();
    }
Working...