Reputation: 169
I've search for similar but mine has none of the problems started in others- no naming using protected functions or rogue {}
.
So can you help- what's wrong?
All for Row 19 (private function display2
)
col: 2 Error: Syntax error: expecting identifier before leftbrace.
col: 2 Error: Syntax error: expecting leftparen before leftbrace.
col: 2 Error: Syntax error: expecting identifier before leftbrace.
col: 2 Error: Syntax error: expecting rightparen before leftbrace.
{
package
{
import flash.accessibility.AccessibilityImplementation;
import flash.display.Bitmap;
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.display.Sprite;
/**
* ...
* @author Michael
*/
public class Start extends Sprite {
[Embed(source="../lib/Start.jpg")]
private var StartClass:Class
private function display2():void
{
addChild(StartClass());
myTextBox.text = "Jabble. Click to Scroll Down (下にスクロールする]をクリック). Press Enter to Instructions alternate between English and Japanese (translations). Press H for the help web page or put http://wp.me/P3FUQl-n in your web browser. Beneath is the Board and to the right is the Box. Click and Drag Tiles to move it and double click it set it on a square space on the Board or Box and click the Box to change its mode. Jabble- 英語と日本語(訳)との間で交互に指示。を押して、ヘルプWebページのHまたはWebブラウザでhttp://wp.me/P3FUQl-nを置く。下には、理事会で、右側のボックスである。クリックして、それを移動するにはタイルをドラッグし、ダブル会またはボックス上の正方形のスペースには、それを設定してクリックし、そのモードを変更するには、ボックスをクリックしてください" ;
myTextBox.width = Box.width;
myTextBox.height = Box.height;
myTextBox.multiline = true;
myTextBox.wordWrap = true;
myTextBox.background = true;
myTextBox.border = true;
var format:TextFormat = new TextFormat();
format.font = "Verdana";
format.color = 0xFF0000;
format.size = 10;
myTextBox.defaultTextFormat = format;
addChild(myTextBox);
myTextBox.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownScroll);
}
}
}
Upvotes: 1
Views: 253
Reputation: 15213
You have made a few mistakes there.
First of all you are adding a class without using the new
before it.
It needs to be addChild(new StartClass())
instead of addChild(StartClass())
.
And seconly, you haven't declared the variable myTextBox
.
Probably something like var myTextBox:TextField = new TextField();
.
Upvotes: 1