Skip to main content
Participant
Jun 8, 2024 4:30 PM UTC
Answered

ArgumentError: Error #2068: Invalid sound. at flash.media::Sound/play() at animacion2_copia_fla::M

import flash.media.Sound;
import flash.media.SoundChannel;
button_9.addEventListener(MouseEvent.CLICK, resumeSound);
var sonido1: Sound = new Sound(); 
var soundChannel: SoundChannel;
function resumeSound(event: MouseEvent): void {
if (!soundChannel) {
soundChannel = sonido1.play();
}}

Pueden ayudarme? nose porque sucede este error

se supone que la dar click en el boton deberia seguir reproduciendo el audio pero no lo hace nose que estoy haciendo mal,  Estoy trabajando en adobe animate 2023 

    This topic is closed to new replies. Start a new post to keep the conversation going.
    JoãoCésar17023019
    JoãoCésar17023019Correct answer
    Community Expert
    Jun 8, 2024 5:10 PM UTC

    este es actionScript del sonido 

    cuando le doy a aceptar para guadar cambios me aparece este mesaje es normla? 

     

     


    Hi.

    Adding to k's answer, the sound declaration should be something like:

    var sd:sonido1 = new sonido1();


    In your case, you're using sonido1 as the variable name but you should use as the class name.

    Regards,
    JC

    8 replies

    kglad
    Community Expert
    Community Expert
    Jun 8, 2024 4:42 PM UTC

    do you have a sound in your library that has a class assigned?  if so use it, not new Sound();

    Translate
    Participant
    Jun 8, 2024 4:58 PM UTC

    si el sonido es: sonido1 

    pero no se reproduce al dar click en el boton 

    Translate
    Participant
    Jun 8, 2024 5:02 PM UTC

    este es actionScript del sonido 

    cuando le doy a aceptar para guadar cambios me aparece este mesaje es normla? 

     

     

    Translate