Array probs

Hope someone can help - it’s probably simple but I can’t get my head around it!! I have taken this script from a tutorial which uses a scrollbar and buttons to control a number of sections created by an array. I have an empty movie clip called ‘content_mc’ on the main stage, linked to which is a movie clip with the identifier ‘section’.

The tutorial doesn’t explain and I can’t figure out how to actually add different content into the 5 sections.

// set up gutter info
gutterLeft = scrollbarGutter_mc._x+1;
gutterRight = scrollbarGutter_mc._x+(scrollbarGutter_mc._width-_root.scrollbar_mc._width)-1;

// create an array for attaching new sections on our timeline
section = new Array(5);
max = _root.section.length;
itemDepth = 1;

for (i=0; i<max; i++) {
// attach new item
root.content_mc.attachMovie(“section”, "section"+i, itemDepth);
curItem = content_mc[“section_”+i];
// put the MC in an array
_root.section* = curItem;
if (i == 0) {
curItem._x = 0;
} else {
curItem._x = content_mc._width+1;
}
itemDepth++;
}

// set the info about the content
contentRight = content_mc._x;
contentLeft = 712-content_mc._width;

// calculate the current percentage of the scrollbar
function scrollBarFunc() {
var percent = (scrollbar_mc._x-gutterLeft)/(gutterRight-gutterLeft);
content_mc._x = percent*(contentLeft-contentRight)+contentRight;
updateAfterEvent();
}

// jump the scrollbar to an area on the gutter that equals the beginning of each section
function contentFunc() {
// is the difference between the goal and the position small?
if (Math.abs(scrollBarGoal-scrollbar_mc._x)<1 || !topNav) {
// if so, position everything where it needs to be and stop
scrollbar_mc._x = scrollBarGoal;
content_mc._x = contentGoal;
// transfer power by turning scrollbar actions off
onEnterFrame = null;
} else {
// otherwise move scrollbar and adjust content
scrollbar_mc._x += (scrollBarGoal-scrollbar_mc._x)/6;
scrollBarFunc();
}
}

function moveContent(s) {
// transfer power - turn topNav actions on
topNav = true;
// where should the content go
contentGoal = contentRight-section[s]._x;
// make sure it’s not off the screen!
if (contentGoal<contentLeft) {
contentGoal = contentLeft;
}
// what percent is that goal?
var percent = -(contentGoal-contentRight)/(contentRight-contentLeft);
// apply that percent to the gutter size to determine the scrollbar’s goal
scrollBarGoal = percent*(gutterRight-gutterLeft)+gutterLeft;
// set up a loop to move the content and scrollbar
onEnterFrame = contentFunc;
}

// don’t use the hand icon
scrollbar_mc.useHandCursor = false;

// handle press event
scrollbar_mc.onPress = function() {
this.startDrag(false, _root.gutterLeft, this._y, _root.gutterRight, this._y);
// transfer power - turn topNav actions off
topNav = false;
dragging = true;
this.onMouseMove = function() {
_root.scrollBarFunc();
updateAfterEvent();
};
};

// handle release event
scrollbar_mc.onRelease = scrollbar_mc.onReleaseOutside=function () {
this.onMouseMove = undefined;
this.stopDrag();
dragging = false;
xSpeed = (newxpos-oldxpos)*RATIO;
};

// set initial variables
FRICTION = .9;
RATIO = .5;
dragging = false;

// handle onEnterFrame event
scrollbar_mc.onEnterFrame = function() {
if (!dragging && !topNav) {
oldxpos = this._x;
newxpos = oldxpos+xSpeed;
xSpeed *= FRICTION;
if (newxpos>gutterRight || newxpos<gutterLeft) {
xSpeed *= -FRICTION;
newxpos = oldxpos;
}
this._x = newxpos;
_root.scrollBarFunc();
} else {
oldxpos = newxpos;
newxpos = this._x;
}
};

Am getting unexpected file format when trying to open the FLA. :frowning: