27.1.11

Using Classes

To make a long story short, I went through a whole lot of mess to get the errors off of the main Jump.as document and nothing I tried worked until now. This is the final error-free version of the Jump.as file.


package body  {

import flash.display.MovieClip

public class Jump extends MovieClip {
   public var STEP_AMOUNT:Number = 60
private var RedPressed:Boolean =  false
private var BluePressed:Boolean = false
private var YellowPressed:Boolean = false
private var OrangePressed:Boolean = false
}


Red.addEventListener(MouseEvent.CLICK, RedLeft);
Red.SetStepAmount(STEP_AMOUNT)


Blue.addEventListener(MouseEvent.CLICK, BlueRight);
Blue.SetStepAmount(STEP_AMOUNT);


Yellow.addEventListener(MouseEvent.CLICK, YellowDown);
Yellow.SetStepAmount(STEP_AMOUNT);


Orange.addEventListener(MouseEvent.CLICK, OrangeUp);
Orange.SetStepAmount(STEP_AMOUNT);
}

And now that those errors are taken care of I can worry about THESE:

C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\YellowDown.as, Line 6 1071: Syntax error: expected a definition keyword (such as function) after attribute private, not static.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\YellowDown.as, Line 8 1084: Syntax error: expecting rightbrace before semicolon.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\YellowDown.as, Line 21 1084: Syntax error: expecting leftparen before isNaN.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\OrangeUp.as, Line 6 1071: Syntax error: expected a definition keyword (such as function) after attribute private, not static.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\OrangeUp.as, Line 8 1084: Syntax error: expecting rightbrace before semicolon.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\OrangeUp.as, Line 21 1084: Syntax error: expecting leftparen before isNaN.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\BlueRight.as, Line 6 1071: Syntax error: expected a definition keyword (such as function) after attribute private, not static.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\BlueRight.as, Line 8 1084: Syntax error: expecting rightbrace before semicolon.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\BlueRight.as, Line 21 1084: Syntax error: expecting leftparen before isNaN.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\RedLeft.as, Line 6 1071: Syntax error: expected a definition keyword (such as function) after attribute private, not static.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\RedLeft.as, Line 8 1084: Syntax error: expecting rightbrace before semicolon.
C:\Users\Owner\Documents\Flash Projects\FlashBlog\Jump\SwitchToExternal\body\RedLeft.as, Line 21 1084: Syntax error: expecting leftparen before isNaN.



No comments:

Post a Comment