# Loading into same window and stopping music

**URL:** <https://forum.kirupa.com/t/loading-into-same-window-and-stopping-music/234890>\
**Category:** flash\
**Created:** [August 7, 2007, 12:02am UTC](https://forum.kirupa.com/t/loading-into-same-window-and-stopping-music/234890 "2007-08-07T00:02:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drdave](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@drdave](https://forum.kirupa.com/u/drdave)\
**Post date:** [August 7, 2007, 12:02am UTC](https://forum.kirupa.com/t/loading-into-same-window-and-stopping-music/234890/1 "2007-08-07T00:02:13Z")

</div>

Hi

I have a full flash website and trying to load an html page with flash embedded into the same window when visitors click a link.

And at the same time I want to stop the sound that’s playing the music in the background instead of letting it play since this html/flash video page will have it’s own music.

I tried but cannot get it to work.

Here is the action I used but got errors…

plasmabutton.onPress = function() {  
loadMovieNum(“plasma.swf”, 1);  
};

**Error** Symbol=page4, layer=Layer 10, frame=1:Line 1: Statement must appear within on/onClipEvent handler  
plasmabutton.onPress = function() {

Total ActionScript Errors: 1 Reported Errors: 1

Any help?

Thanks  
Dave
