Skip to main content
Participating Frequently
January 8, 2014
Question

Help me please

  • January 8, 2014
  • 1 reply
  • 359 views

Im trying to make a game and i want to make a button that silent one sound of the other button and if i press the other button it silent the first button sound this is my code:

import flash.events.MouseEvent;

import flash.media.SoundMixer;

CephalopodMostrar.addEventListener(MouseEvent.MOUSE_DOWN, PruebaCephalopod);

IceFlowMostrar.addEventListener(MouseEvent.MOUSE_DOWN, PruebaIceflow);

function PruebaCephalopod(Event:MouseEvent):void{

          CephalopodMostrar.gotoAndStop(2);

          IceFlowMostrar.gotoAndStop(1);

}

function PruebaIceflow(Event:MouseEvent):void{

          IceFlowMostrar.gotoAndStop(2);

          CephalopodMostrar.gotoAndStop(1);

}

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
January 8, 2014

What do those functions have to do with stopping sounds - how dowes changing frames start/stop the sounds?

You should use the Sound class so that you can have coded control of the sounds you are playing.