# Simulated Download creates error

**URL:** <https://forum.kirupa.com/t/simulated-download-creates-error/306818>\
**Category:** flash\
**Created:** [March 22, 2010, 11:39pm UTC](https://forum.kirupa.com/t/simulated-download-creates-error/306818 "2010-03-22T23:39:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [March 22, 2010, 11:39pm UTC](https://forum.kirupa.com/t/simulated-download-creates-error/306818/1 "2010-03-22T23:39:21Z")

</div>

```auto

Error when "simulating download":

ArgumentError: Error #2068: Invalid sound.
    at flash.media::Sound/play()
    at actionscript::Click()[C:\Users\FH\Documents\Flash\Interface\actionscript\Click.as:11]
    at gne_c2_m0_t1_p1_fla::MainTimeline/pressedBeginButton()[gne_c2_m0_t1_p1_fla.MainTimeline::frame1:38]

Click.as:

package actionscript {
    
    import flash.media.Sound;
    import flash.media.SoundChannel;

    public class Click extends Sound {
        
        private var sound:SoundChannel;

        public function Click():void {
            sound = play();
        }
    }
}

TIMELINE CODE RECEIVING ERROR:

function pressedBeginButton(event:MouseEvent) {
    // Remove listeners
    beginButton.removeEventListener(MouseEvent.CLICK, pressedBeginButton);
    beginButton.removeEventListener(MouseEvent.MOUSE_OVER, buttonRollOver);
    beginButton.removeEventListener(MouseEvent.MOUSE_OUT, buttonRollOut);
    // Remove button
    removeChild(beginButton);
    // Play click sound
    var clickChannel = new Click();
    // Load next page
    if (Interface._ui != null) {
        Interface._ui.loadPageFromButton();
    }
}

```

I’m guessing this has something to do with the delay in loading assets, since it’s happening with some timeline code. Anyone know what’s going on here?
