Skip to main content
Participant
Juni 8, 2024 4:30 PM UTC
Beantwortet

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 

    Dieses Thema wurde für Antworten geschlossen.
    JoãoCésar17023019
    Community Expert
    Juni 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 Antworten

    kglad
    Community Expert
    Community Expert
    Juni 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();

    Übersetzen
    Participant
    Juni 8, 2024 4:58 PM UTC

    si el sonido es: sonido1 

    pero no se reproduce al dar click en el boton 

    Übersetzen
    Participant
    Juni 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? 

     

     

    Übersetzen