Hello,
I started one flash class but ended up leaving school, migraines, computers, no good. I’m trying to learn more of flash on my own while taking my own breaks from staring at the screen, ANYWAY, I found tutorials on this site and i’m trying to build a site for my friend. I want to use the sliding pages menu and the tutorials are helping me to learn more about flash at the same time. I got through all of it fine then it asked me to copy and paste code that isn’t working. Maybe I’m doing something wrong. I’m not sure. I right clicked on the keyframe then I clicked actions and then I pasted in this code. I’d REALLY appreciate your help.
Thank you,
Holly
var currentPosition:Number = contentHold.content1._x;
var startFlag:Boolean = false;
menuSlide = function (input:MovieClip) {
if (startFlag == false) {
startFlag = true;
var finalDestination:Number = input._x;
var distanceMoved:Number = 0;
var distanceToMove:Number = Math.abs(finalDestination-currentPosition);
var finalSpeed:Number = .3;
var currentSpeed:Number = 0;
var dir:Number = 1;
if (currentPosition<=finalDestination) {
dir = -1;
} else if (currentPosition>finalDestination) {
dir = 1;
}
this.onEnterFrame = function() {
currentSpeed = Math.round((distanceToMove-distanceMoved+1)finalSpeed);
distanceMoved += currentSpeed;
contentHold._x += dircurrentSpeed;
if (Math.abs(distanceMoved-distanceToMove)<=1) {
contentHold._x = maskMovie._x-currentPosition+dir*distanceToMove;
currentPosition = input._x;
startFlag = false;
delete this.onEnterFrame;
}
};
}
};
b1.onRelease = function() {
menuSlide(contentHold.content1);
};
b2.onRelease = function() {
menuSlide(contentHold.content2);
};
b3.onRelease = function() {
menuSlide(contentHold.content3);
};
b4.onRelease = function() {
menuSlide(contentHold.content4);
};
b5.onRelease = function() {
menuSlide(contentHold.content5);
};
I keep getting this when I test the movie:
Error Scene=Scene 1, layer=action, frame=1:Line 5: Syntax error.
Error Scene=Scene 1, layer=action, frame=1:Line 7: Syntax error.
Error Scene=Scene 1, layer=action, frame=1:Line 14: Syntax error.
Total ActionScript Errors: 3 Reported Errors: 3