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