# Stop(); commands not working after preloader and navigation inserted into movie!

**URL:** https://forum.kirupa.com/t/stop-commands-not-working-after-preloader-and-navigation-inserted-into-movie/290458
**Category:** Uncategorized
**Created:** [June 15, 2009, 12:03pm UTC](https://forum.kirupa.com/t/stop-commands-not-working-after-preloader-and-navigation-inserted-into-movie/290458 "2009-06-15T12:03:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mung](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mung](https://forum.kirupa.com/u/mung)
#### Post date: [June 15, 2009, 12:03pm UTC](https://forum.kirupa.com/t/stop-commands-not-working-after-preloader-and-navigation-inserted-into-movie/290458/1 "2009-06-15T12:03:50Z")

</div>

ive recently introduced myself to AS3, its starting to get a bit frustrating.  
it seems that when i put the preloader actions in the timeline, everything is fine, the stop(); commands work fine. BUT when it comes around to adding the navigation to the timeline as well (_ive tried putting the code on a separate keyframe, ive tried various styles of code_) the stop(); actions are completely ignored.

With this code below everything works fine in the movie (AS 3 for preloader):

…  
\*\*stop();

addEventListener(Event.ENTER\_FRAME, loaderF);

function loaderF(e:Event):void{  
var toLoad:Number = loaderInfo.bytesTotal;  
var loaded:Number = loaderInfo.bytesLoaded;  
var total:Number = loaded/toLoad;  
if(loaded == toLoad){  
removeEventListener(Event.ENTER\_FRAME, loaderF);  
gotoAndPlay(2);  
} else {  
preloader\_mc.preloaderFill\_mc.scaleX = total;  
preloader\_mc.percent\_txt.text = Math.floor(total\*100) + “%”;  
preloader\_mc.ofBytes\_txt.text = loaded + " bytes";  
preloader\_mc.totalBytes\_txt.text = toLoad + " bytes";  
}  
};\*\*  
…  
but when i insert this as well (AS 3 for navigation) everything seems to go down the pan:

\*\*import flash.events.MouseEvent;

//—Home Button—\

home\_btn.addEventListener(MouseEvent.CLICK, homeClick);

function homeClick(event:MouseEvent):void{  
gotoAndPlay(“framenumber/name”)  
}\*\*

I would really appreciate anyone who has a solution, as my project is on hold and I cant move forward without the ability to do this.

Thanks
