# Theortically this should work

**URL:** https://forum.kirupa.com/t/theortically-this-should-work/305000
**Category:** Uncategorized
**Created:** [February 17, 2010, 8:54pm UTC](https://forum.kirupa.com/t/theortically-this-should-work/305000 "2010-02-17T20:54:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![PDidee](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pdidee/32/3438_2.png) [@PDidee](https://forum.kirupa.com/u/PDidee)
#### Post date: [February 17, 2010, 8:54pm UTC](https://forum.kirupa.com/t/theortically-this-should-work/305000/1 "2010-02-17T20:54:32Z")

</div>

So I’m modifying some actionscript and currently I have two bits of scrolling content and two movieclips that I want to remain stationary while scrolling the content. It works for one but not the other. This is an example of the AS:

onEnterFrame = function () {  
// Scroll content  
scroll\_mc.\_x += Math.ceil((destX-scroll\_mc.\_x)/3);  
scrollRatio = scroll\_mc[toScroll].\_height/scrollBar.\_height;  
ratio = (scroll\_mc[toScroll].\_height-scrollBar.\_height)/(scrollBar.\_height-scrollBttn.\_height+20);  
// Check scroll height / show & hide scroll button  
if (scroll\_mc[toScroll].\_height\>scrollBar.\_height) {  
destScroll = ((-scrollBttn.\_y+scroll\_mc.originY)\*ratio)+scroll\_mc.originY;  
scroll\_mc.\_y += Math.round((destScroll-scroll\_mc.\_y)/scrollTween);  
scrollBttn.\_visible = true;  
} else {  
scrollBttn.\_visible = false;  
}

```
    // Keep large image & header stationary while scrolling text
if (toScroll == "item_mc") {
	scroll_mc.header_mc._y = -scroll_mc._y+originY+scroll_mc.header_mc.originY+scroll_mc.item_mc._y;
	
}else{

if (toScroll == "article_mc") {
	scroll_mc.holder_mc._y = -scroll_mc._y+originY+scroll_mc.holder_mc.originY+scroll_mc.article_mc._y;

}

}

```

};

The one for “holder\_mc” works fine. "header\_mc does not. Zip file is attached. Basically I want the words “the crew” to stay where they are when scrolling the content on the first page.

Thanks for any of your help.  
PDidee
