# Loaded swf corrupting main timeline

**URL:** <https://forum.kirupa.com/t/loaded-swf-corrupting-main-timeline/199242>\
**Category:** Uncategorized\
**Created:** [August 31, 2006, 9:55pm UTC](https://forum.kirupa.com/t/loaded-swf-corrupting-main-timeline/199242 "2006-08-31T21:55:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rumoroso](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@rumoroso](https://forum.kirupa.com/u/rumoroso)\
**Post date:** [August 31, 2006, 9:55pm UTC](https://forum.kirupa.com/t/loaded-swf-corrupting-main-timeline/199242/1 "2006-08-31T21:55:05Z")

</div>

for some reason, this swf, when loaded, is making my main timeline replay the intro of the site… not sure exactly why, but I think something in the script is interacting with the \_root  
hmmm… any thoughs?

```auto
_global.slideDuration = 2*1000;
function btnAction(btnName){
	btnName.onRollOver = function(){
		this.gotoAndStop(2);
	}
	btnName.onRollOut = function(){
		btnName.gotoAndStop(1);
	}

}
// APPLY TO BTNS
_global.pressPages = this;
for(i=1; i<15;i++){
	var btn = this["btn"+i];
//	trace(btn);
	btnAction(btn);
}
// GO TO FRAME ACTIONS
btn1.onRelease = function(){
	pressPages.gotoAndStop(1);
	mask.gotoAndPlay(2);
}
btn2.onRelease = function(){
	pressPages.gotoAndStop(2);
	mask.gotoAndPlay(2);
}
btn3.onRelease = function(){
	pressPages.gotoAndStop(3);
	mask.gotoAndPlay(2);
}

```

on and the btn function above is rewritten for each btn… any way around this?
