07.14.07

Flash CS3 / Flex 2 Error #1084

Posted in errors, Flash, Flex at 6:51 pm by Curtis J. Morley

ActionScript Error #1084: Syntax error: expecting rightbrace before end of program.

Error 1084 is the general error number for syntax errors. ActionScript Error #1084 can be any number of errors. I will keep this one up to date with all the variations I find and how to fix them.

AS3 Error 1084: Syntax error: expecting rightbrace before end of program

This is a very easy one. This error just means that you are most likely missing a right brace. Or you have nested code improperly.

Bad Code:

package com.cjm
{
class CoolClass {
function CoolClass () {
trace("Something cool")
}
}

Good Code:

package com.cjm
{
class CoolClass {
function CoolClass () {
trace("Something cool")
}
}
}

Please make note of the third bracket at the end of the good code.

ActionScript Error #1084: Syntax error: expecting colon before semicolon.

You will most likely get this error if you are using a ternary statement and you forget to use a colon, forgot the last part of your ternary, or you replace the colon with a semicolon. This is illustrated in the following example:

Bad Code:

me.myType == "keys" ? trace(keys);

or

me.myType == "keys" ? trace(keys) ; trace(defs);

Good Code:

me.myType == "keys" ? trace(keys) : trace(defs);

Flash/Flex Error #1084: Syntax error: expecting identifier before leftbrace.

Description:
This Flash/Flex Error is reported when you left out the name of your class. The 'identifier' that it is looking for is the name of your class.

Fix:
You will see in the code below that you just need to add in the name of your class and the error will go away.

Bad Code:

package com.cjm.somepackage {
public class {
}
}

Good Code:

package com.cjm.somepackage {
public class MyClass {
}
}

Flex/Flash Error #1084: Syntax error: expecting leftparen before colon.
or
Flex/Flash Error #1084: Syntax error: expecting rightparen before colon.

Description:
These AS3 Errors are reported when you the order of the parenthesis and colon are not in the proper place or the parenthesis is missing.

Fix:
The AS3 code below demonstrates the placement error. Properly order the items and the error will disappear. Also, make sure that a parenthesis is not missing. The 'Bad Code' gives an example of leftParen and then right paren in the order.

Bad Code:

public function ScrambleSpelling:void (s:String)
or
public function ScrambleSpelling(s:String:void

Good Code:

public function ScrambleSpelling (s:String):void

Flex/Flash Error #1084: Syntax error: expecting rightparen before semicolon.

Description:
This AS3 Error is reported most often when the parenthesis is missing.

Fix:
Make sure that a parenthesis is not missing. The 'Bad Code' gives an example of leftParen and then right paren in the order.

Bad Code:

tempArray.push((middle.splice(middle.length-1) * Math.random());
or
tempArray.push(middle.splice(middle.length-1) * Math.random();

Good Code:

tempArray.push(middle.splice(middle.length-1) * Math.random());

Flex/Flash Error #1084: Syntax error: expecting identifier before 1084.

Description:
This AS3 Error is reported when you have begun a package, class, function/method or variable with a numeric character rather than an Alpha character, _(underscore), or $(dollar sign).  In the Flash Authoring environment it won't allow you to add numerics as the first character in an instance name or in the linkage but with code it just gives this crazy error.

Fix:
Make sure to name your package, class, function/method or variable with a Alpha character, _(underscore), or $(dollar sign).

Bad Code:

package 1084_error
{
class 1084_error {
function 1084_error () {
var 1084_error:int = 123;
}
}
}

Good Code:

package error_1084
{
class error_1084 {
function error_1084 () {
var error_1084:int = 123;
}
}
}

P.S.  It is probably not a good idea to give everything the same name as in the examples above.

AS3 Error #1084 will rear it's many heads according to the particular syntax error at the moment. I will post every variation of this error that I can find.

Once again Happy Flashing

70 Comments »

  1. Magnus said,

    August 7, 2007 at 3:18 am

    Hi,

    I don’t use Flash CS3 but a person I know does and they apparently got Error #1084: Syntax error: expecting rightbrace before semicolon. And that was for the code below, specifically for line two. I know this code works in my version of Flash I was wondering whether you could point out where this code could be incorrect for AS3…

    for (var i=0; i

  2. Curtis J. Morley said,

    August 13, 2007 at 3:54 pm

    The code is not incorrect just incomplete. The example you have is just the beginning of a complete block. Something like this:

    for (var i=0; i<=20; i++){ trace(i) } This will produce the output 0 through 20 in the output window. If you have more code for me to look at I would be happy to help. Thanks, Curtis

  3. ekion said,

    January 9, 2008 at 12:45 pm

    Hi mate,
    I’ve a new kind of this error :

    ” 1084 : Syntax error : expecting rightparen before colon ”

    Do not understant really ^^

  4. Curtis J. Morley said,

    January 15, 2008 at 9:10 pm

    ekion,

    I have put up some new examples that handle the case that you are talking about. Hope this helps. I like your site and look forward to seeing the redesign.

    Thanks,

    Curtis J. Morley

  5. curtismorley.com » New Scenarios of AS3 Error #1084 said,

    January 15, 2008 at 9:32 pm

    […] I’ve added 3 new scenarios to AS3 error 1084. […]

  6. curtismorley.com » Flex / Flash ActionScript Error #1095 said,

    January 18, 2008 at 4:12 pm

    […] you out when you improperly use single quotes.  You will most likely get AS3 syntax error 1083 and syntax error 1084 after this this one.  These can most likely be ignored and will go away once the 1095 Error is […]

  7. John Rivas said,

    January 20, 2008 at 1:17 am

    1084: Syntax error: expecting identifier before this.

  8. John Rivas said,

    January 20, 2008 at 1:19 am

    Sorry forgot to post syntax:

    var this[‘n’+i]:Sprite = new Sprite();

  9. curtismorley.com » Search Engine Optimization Example said,

    June 2, 2008 at 4:54 pm

    […] AS3 Error 1084 – #1,2 hit on Google […]

  10. zach seikel said,

    June 27, 2008 at 11:08 am

    i got one that said :

    1084: Syntax error: expecting rightparen before dot.

    here is my code:

    function startGame(event.MouseEvent) {
    gotoAndStop(“playgame”);
    }
    stop();

  11. zach seikel said,

    June 27, 2008 at 1:57 pm

    ok i fixed that one but now i have an error that looks like this:

    1084: Syntax error: expecting identifier before playgame.

    the source is:
    event.”playgame”.parent.gotoAndStop(“playgame”);

    here is my code:

    function startGame(event:MouseEvent){
    event.”playgame”.parent.gotoAndStop(“playgame”);
    }

    stop();

    any help?

  12. Curtis J. Morley said,

    June 27, 2008 at 6:07 pm

    Zach,

    Try this code

    function startGame (e:MouseEvent)
    {
    gotoAndStop(“playgame”);
    }

    The difference is the semicolon in place of the dot. The semicolon “Types” the parameter being passed instead of trying to access a method/parameter of a method.

    You would call this function with an evenListener like I have below.

    SomeObject_mc.addEventListener(MouseEvent.CLICK, startGame)

    Hopefully this helps you solve Flash Error1084

    Happy Flashing,
    Curtis J. Morley

  13. Aaron said,

    June 28, 2008 at 8:32 am

    So I have a video clip in a fla, an as file named MainTimeline that I use for the document class in the fla. But I am getting a error 1084: expecting identifier before 1: package 1_fla

    I am just missing something I am not seeing or did I do something wrong?

    here is the code in the as file (no code at all in the fla):
    package 1_fla
    {
    import flash.display.*;

    dynamic public class MainTimeline extends MovieClip
    {

    public function MainTimeline()
    {
    addFrameScript(1796, frame1797, 1797, frame1798, 1798, frame1799);
    return;
    }// end function

    function frame1798()
    {
    stop();
    return;
    }// end function

    function frame1799()
    {
    stop();
    return;
    }// end function

    function frame1797()
    {
    ExternalInterface.call(“nextPage”, null);
    return;
    }// end function

    } // end class
    } // end package

  14. Curtis J. Morley said,

    June 28, 2008 at 3:54 pm

    Aaron,

    Thanks for submitting this comment. I have added the solution to the list of errors in the main post because of your bug. This one is actually a simple yet very misleading one. The reason it pops up this error is because you started your package name with a number.

    package 1084_error{
    }

    In Flash you cannot start any name with a number or else you will get an error. I am surprised that Adobe assigned this error to this problem. The solution is to simple start with Alpha characters, $(dollar sign) or _(underscore).

    package error_1084{
    }

  15. Adam said,

    July 2, 2008 at 8:50 am

    Error1084: Syntax error: expecting in before colon.

  16. curtismorley.com » New info on Error Flex/Flash Error #1084: Syntax error: expecting identifier before 1084. said,

    July 3, 2008 at 11:03 am

    […] to Aaron I have added another solution to AS3 Error 1084 that deals with using numeric characters.  Check out the fix for ActionScript Error […]

  17. Curtis J. Morley said,

    July 3, 2008 at 9:46 pm

    Adam,

    It looks like the last part of your comments didn’t make it. I would be happy to help with more info.

    Thanks,
    Curtis J. Morley

  18. sat said,

    August 2, 2008 at 2:58 am

    please i have this problem

    1084 syntax error
    expecting colon before 67

    this is my code

    package
    {
    import flash.system.*;
    import mx.core.*;
    import mx.managers.*;

    public class _Player_mx_managers_SystemManager extends SystemManager implements IFlexModuleFactory
    {

    public function _Player_mx_managers_SystemManager()
    {
    return;
    }// end function

    override public function info() : Object
    {
    return {currentDomain:ApplicationDomain.currentDomain, backgroundAlpha:”0″, backgroundColor:”white”, creationComplete:”init()”, fonts:{Frutiger 67BoldCn:{regular:true, bold:false, italic:false, boldItalic:false}, Tahoma:{regular:true, bold:true, italic:false, boldItalic:false}}, horizontalScrollPolicy:”off”, layout:”absolute”, mainClassName:”Player”, minHeight:”330″, minWidth:”490″, mixins:[“_Player_FlexInit”, “_alertButtonStyleStyle”, “_ControlBarStyle”, “_ScrollBarStyle”, “_activeTabStyleStyle”, “_textAreaHScrollBarStyleStyle”, “_ToolTipStyle”, “_VideoDisplayStyle”, “_ProgressBarStyle”, “_comboDropDownStyle”, “_ContainerStyle”, “_textAreaVScrollBarStyleStyle”, “_globalStyle”, “_windowStatusStyle”, “_windowStylesStyle”, “_PanelStyle”, “_activeButtonStyleStyle”, “_HSliderStyle”, “_errorTipStyle”, “_richTextEditorTextAreaStyleStyle”, “_CursorManagerStyle”, “_todayStyleStyle”, “_dateFieldPopupStyle”, “_plainStyle”, “_dataGridStylesStyle”, “_ApplicationStyle”, “_SWFLoaderStyle”, “_headerDateTextStyle”, “_ButtonStyle”, “_opaquePanelStyle”, “_weekDayStyleStyle”, “_headerDragProxyStyleStyle”, “_ThumbnailWatcherSetupUtil”, “_MainLayoutWatcherSetupUtil”, “_ThumbnailDisplayWatcherSetupUtil”, “_VideoPlayerWatcherSetupUtil”, “_FeedTabWatcherSetupUtil”, “_ItemDetailsWatcherSetupUtil”], pageTitle:”Preview Player”, resize:”resizeHandler()”};
    }// end function

    override public function create(… args) : Object
    {
    var _loc_2:String;
    var _loc_3:Class;
    var _loc_4:Object;
    if (args.length == 0 || args[0] is String)
    {
    _loc_2 = null;
    if (args.length == 0)
    {
    _loc_2 = “Player”;
    }
    else
    {
    _loc_2 = String(args[0]);
    }// end else if
    _loc_3 = Class(getDefinitionByName(_loc_2));
    if (_loc_3 != null)
    {
    _loc_4 = new _loc_3;
    if (_loc_4 is IFlexModule)
    {
    IFlexModule(_loc_4).moduleFactory = this;
    }// end if
    return _loc_4;
    }
    else
    {
    return null;
    }// end else if
    }
    else
    {
    }// end else if
    return super.create.apply(this, args);
    }// end function

    }
    }

  19. Alex said,

    August 27, 2008 at 9:18 am

    Thanks for the blogs homie, you’ve helped a great deal a number of times.

    Kudos and take care.

  20. Brigs said,

    September 16, 2008 at 10:01 pm

    Hi Curtis,

    I’m back with a question regarding Internet Explorer 6.0, 7.0. This is where my web page falls over as a result of using a float.

    Adobe.com gave me a description and a solution (below) but making the container wider and leaving the width blank, upsets the design. Any ideas, appreciate any help?

    Cheers, Brigs

    Problem

    If a container (including the body) is not wide enough to display both a float and the static content that follows it side by side, the static content will drop below the float instead of wrapping around it.

    Solution

    Wrap content in a fixed-width container large enough to accommodate the content, or remove the width from the static block.

  21. joss said,

    September 22, 2008 at 8:41 am

    Hi Curtis,

    this is a question with Flex (As3.0) I imagine the same would apply in flash.
    I am reading in an xml document (using an HTTPService). the result is in e4x.

    however, the xml I am trying to read in comes from Excel and Excel oikes to format attributes thus prefix:attributeName e.g. ss:ExpandedColumnCount.

    If you try to get the attribute using myData.ElementName.@ss:ExpandedColumnCount
    you get an error because Flex does not like the colon there. it is then expecting a class name.
    this would work:
    myData.ElementName.@ExpandedColumnCount
    if that were what teh attribute was called in teh xml.
    Obvioulsy i can edit the xml to remove the colons but then it can no longer be opened and edited in Excel.

    any suggestiosn as to how I might get Flex to ignore the colon when looking at attribute names.

    TIA
    joss

  22. Mr. T said,

    October 9, 2008 at 10:47 am

    1084: Syntax error: expecting rightparen before semicolon.
    1084: Syntax error: expecting rightbrace before leftbrace. here is the code if (x <0 || x> 600 || y <0 || y> 400 {

  23. Mr. T said,

    October 9, 2008 at 11:02 am

    I fixed
    1084: Syntax error: expecting rightbrace before leftbrace.
    but can’t get rid of:
    1084: Syntax error: expecting rightparen before semicolon.
    heres is new code
    if (x <0 || x<600 || y <0 || y<400
    I can get rid of 1084: Syntax error: expecting rightparen before semicolon.
    by doing this
    code if (x <0) || (x<600) || (y <0) || (y<400)
    but the it says lot of other stuff

  24. a. p. said,

    October 26, 2008 at 11:57 am

    Ok, I am getting this error:

    1084: Syntax error: expecting identifier before dot.

  25. a. p. said,

    October 26, 2008 at 11:58 am

    I dont know why it didnt put the rest of my message…but here is the code I have (“music” being the source):

    music.addEventListener(MouseEvent.ROLL_OVER,musicOver);
    music.addEventListener(MouseEvent.ROLL_OUT,musicOut);
    music.addEventListener(MouseEvent.CLICK,musicClick);

    function musicOver(event:MouseEvent):void{
    music.gotoAndPlay(“Over”);
    }
    function musicOut(event:MouseEvent):void{
    music.gotoAndPlay(“Out”);
    }
    function.musicClick(event:MouseEvent):void{
    music.gotoAndPlay(“Click”);
    }

  26. a. p. said,

    October 26, 2008 at 11:59 am

    the “Click” part is the one that is getting the error

  27. Curtis J. Morley said,

    October 27, 2008 at 1:47 pm

    a.p.,

    No worries. You have a dot between function and musicClick. Just replace the dot with a space and you should be fine.

    Thanks,
    CJM

  28. James said,

    November 23, 2008 at 11:51 am

    Hey, I have the same issue as John Rivas from January…

    —————————-
    John Rivas said,

    January 20, 2008 at 1:17 am

    1084: Syntax error: expecting identifier before this.

    John Rivas said,

    January 20, 2008 at 1:19 am

    Sorry forgot to post syntax:

    var this[‘n’+i]:Sprite = new Sprite();
    —————————-

    I’m using a custom class with the following syntax:
    MyGlobal.this[“ns”+[currentIndex]+”text”] = somevariable;

    … and I’m receiving the “1084: Syntax error: expecting identifier before this.” error…

  29. Rushita said,

    November 30, 2008 at 12:27 pm

    I am getting this error in the swf file which is external file created in flash (AS 2.0). I am using this swf in the flex 3.0.

    Is it due to version difference of action script?

    I have only two file in flex project, mxml file and swf file. Can you please tell me what is the problem?

  30. David said,

    December 11, 2008 at 4:32 am

    Hi

    I’ve got what I think is another one:

    1086: Syntax error: expecting semicolon before :.

    Here is the line in the code:

    var counter:String = days + “:” + hrs “:” + min “:” + sec;

  31. Marie said,

    December 30, 2008 at 2:29 pm

    I have a new one…1084:syntax error: expecting identifer before assign.

    no idea what it means.

    code:

    for each (var stationTemp in stations) {
    [stationTemp + “transform”] = stationTemp.transform.colorTransform;<–line that throws the error
    }

    I’ve used code similar to this before with no problems.

  32. t said,

    January 2, 2009 at 10:00 pm

    I am getting this error:

    1084: Syntax error: expecting identifier before dot.

    The source is:

    private function ldr_complete( _e:Event ):void
    {
    trace( “slideshow_editor.ldr_complete( ” + _e.type +” )” );
    state = new XML( _e.target.data );
    init_ddt_stage.dd_sel1();
    }

    Here is the error code:

    private function init_ddt_stage.ddt_sel2()
    {
    ddt_stage.dd_sel1.rowCount = 3;
    ddt_stage.dd_sel1.rowHeight = 120;
    ddt_stage.dd_sel1.columnWidth = 120;
    ddt_stage.dd_sel1.height = (120 * 3) + 16;
    ddt_stage.dd_sel1.direction = ScrollBarDirection.VERTICAL;
    }

    Error line is:

    private function init_ddt_stage.ddt_sel2()

    Tell me how to solve this problem..

  33. Curtis J. Morley said,

    January 5, 2009 at 6:45 pm

    Takeo,

    The issue is that you are trying to dynamically assign the function name. Or in other words you have a “dot” in your function name. In Flash there is no direct way to assign a function dynamically. To get rid of the error get rid of the dot.

    Something like:
    private function ddt_sel2()

    Thanks,

    Curtis

  34. curtismorley.com » AS3 Error #1126: Function does not have a body. said,

    January 12, 2009 at 10:38 am

    […] ActionScript Error 1084: Syntax error: expecting colon before leftparen. This error is a psuedo error in this case because once AS3 Error 1126 is reslved this error will also disappear. […]

  35. Henry said,

    January 21, 2009 at 3:33 am

    Hi

    stage.addEventListener(MouseEvent.MOUSE_MOVE, MouseF);
    }

    Please let me know if this is right i’m geting error 1084 & 1083 please help

  36. Rez said,

    January 21, 2009 at 6:21 am

    I’m also getting the error 1084: expecting right parenthesis before dot — the error is with the function line — “function scrollText(MouseEvent.ROLL_OVER):void {” … I probably have other errors, but this one is hanging me up :\

    Here’s the code:

    pnr.visible = false;

    var onit:Boolean;

    var pnrbtn:MovieClip = new MovieClip();
    stage.addChild(pnrbtn);
    pnrbtn.addChild(pnr);

    pnrbtn.addEventListener( MouseEvent.ROLL_OVER, scrollText );

    function scrollText(MouseEvent.ROLL_OVER):void {
    var mc = e.target;
    if (mc.onit == true ) {
    mc.nextFrame();
    } else {
    mc.prevFrame();
    }
    }

    thanks for any help you can provide, and btw, love the blog, a real lifesaver.

  37. Rez said,

    January 23, 2009 at 4:04 pm

    :O well, upon refresh, it appears you can delete both these comments, as my previous one with the question in it is there again — wtg firefox.

  38. Nooby said,

    January 27, 2009 at 7:47 pm

    Great site… thank you. The AS3 editor bites the big one. I wish they would invest is it so noobies can code without doing back flips through fire hoops.

  39. Carolina said,

    February 28, 2009 at 10:08 am

    Hi, I’m haveing too much problems with flash.

    I’m receiving this errors, please if someone could help me I’ll appreciate it.

    Templnit line 11 | 1084: Syntax error: expecting identifier before 22598.

  40. nirav said,

    March 7, 2009 at 12:32 pm

    1084 syntax error…plz help

    package 22038_fla
    {
    import flash.display.*;

    dynamic public class mc_icon_loader_18 extends MovieClip
    {

    public function mc_icon_loader_18()
    {
    addFrameScript(0, frame1, 99, frame100);
    return;
    }// end function

    function frame100()
    {
    stop();
    return;
    }// end function

    function frame1()
    {
    stop();
    return;
    }// end function

    }
    }

  41. Bobby said,

    April 11, 2009 at 8:08 pm

    I got Snytax error: 1084 “expecting right paren before next page and my code that’s giving me problems is:

    button_mc.addEventListener(MouseEvent.CLICK nextpage);

    function nextpage(event:MouseEvent):void
    {
    nextFrame();
    }

    It would be great if you could help! o>< 🙂

  42. Ed said,

    May 22, 2009 at 10:43 am

    hey there i get the following errors:

    Id1084: Syntax error: expecting colon before assign
    and
    Id 1084: Syntax error: expecting rightbrace before semicolon.

    regarding the first 2 lines of this code:

    vid=new Video(640, 480);
    cam=Camera.getCamera();
    cam.setMode(640,480,30);
    vid.attachCamera(cam);
    addChild(vid);

    i’m running it in adobe flex builder, and it’s driving me nuts( i have very little experience with code)

    thnks you in advance for your time, patience and help,
    e

  43. Wayne said,

    June 15, 2009 at 11:30 pm

    1084: Syntax error: expecting colon before dot.

    is produced when using the following:

    function homeFunt(event:MouseEvent);void{
    pageWindow_mc.gotoAndPlay(“home”);
    }

    I have read a hundred tutorials and none used a colon so I have no idea. Also, if I change the dot to a colon like this:

    function homeFunt(event:MouseEvent);void{
    pageWindow_mc:gotoAndPlay(“home”);
    }

    which I assumed the error was describing, I get a new error:

    1084: Syntax error: expecting rightbrace before semicolon.

    I have several AS3 books and did this exactly as they describe and get this error.

    I am new to AS3 but I have written code before. The first code looks fine but produces this error whereas the second code looks wrong.

    This function is being used on one movieclip being tracked as a button that will control playback for a seperate movieclip within the same file. Both clips are on the stage.

    Last, why does the movieclip listed above not process the stop(); commands I put in it? I broke the movie clip into layers, each layer displays something different and using the actions layer I put a stop command where each layer should stop playing. It does not. It continues to play endlessly.

  44. Wayne said,

    June 15, 2009 at 11:48 pm

    Nevermind. I found the error.

    function homeFunt(event:MouseEvent);void{
    pageWindow_mc.gotoAndPlay(”home”);
    }

    should be:

    function homeFunt(event:MouseEvent):void{
    pageWindow_mc.gotoAndPlay(”home”);
    }

    pay close attention to the ; just before the void. It should be a : instead. Silly me. This also fixed the movie playing when it shouldn’t for some odd reason.

  45. Mrs. Shane said,

    August 7, 2009 at 7:39 pm

    my coding is probably more complex then your sample. can you tell me what’s wrong below? How do I fix?

    //Sprite 247
    // Frame 0
    // Action tag #0

    do
    {
    var  = 867;
    for (;;)
    {
    if (867){
    }
     =  634;
    continue;
    }
    if (921){
    }
     =  – 699;
    continue;
    }
    if (617){
    }
     if (167);
    continue;
    }
    if ( == 449)
    {
     =  + 7;
    continue;
    }
    if ( == 979)
    {
     =  – 393;
    if (“”)
    {
     =  – 72;
    }
    continue;
    }
    if ( == 233)
    {
     =  – 231;
    if (true)
    {
     =  + 615;
    }
    continue;
    }
    if ( == 456)
    {
     =  + 523;
    continue;
    }
    var __local0;
    if ( == 222)
    {
     =  + 418;
    continue;
    __local0 = eval(true);
    }
    else
    {
    __local0 = true;
    }
    if ( == 361)
    {
     =  + 95;
    continue;
    }
    if ( == 5)
    {
     =  + 44;
    if (__local0)
    {
     =  + 752;
    }
    continue;
    }
    if ( == 640)
    {
     =  – 635;
    continue;
    }
    if ( == 49)
    {
     =  + 752;
    continue;
    }
    if ( == 514)
    {
     =  + 5;
    continue;
    }
    if ( == 558)
    {
     =  + 363;
    var undefined = !undefined;
    continue;
    }
    if ( == 519)
    {
     =  + 39;
    continue;
    }
    if ( == 538)
    {
     =  – 19;
    continue;
    }
    if ( == 355)
    {
     =  + 6;
    continue;
    }
    if ( == 586)
    {
     =  – 72;
    continue;
    }
    if ( == 2)
    {
     =  + 615;
    continue;
    }
    if ( == 588)
    {
     =  – 233;
    if (1)
    {
     =  + 6;
    }
    continue;
    }
    if ( == 450)
    {
     =  + 138;
    continue;
    }
    if ( != 157)
    {
    break;
    }
     =  + 293;
    }
    if ( == 801)
    {
     =  – 217;
    continue;
    }
    }
    while ( != 584);
     =  – 584;

    adobe flash is telling me there are 12 errors in this script.

  46. travis said,

    August 31, 2009 at 9:28 am

    having problems converting code from 2.0 to 3.0 and keep getting the 1084 error. was hoping someone could help me out with the code thanks.

    stage.addEventListener(Event.ENTER_FRAME,myEnterFrame,false,0,true);
    function myEnterFrame(e:Event):void {

    if(this.mouseY200) {
    myVar=true;
    }
    if(this.mouseX550 and myVar==true) {
    imgBar.nextFrame();
    imgBar.nextFrame();
    }
    if(this.mouseX>50 && this.mouseX<550 && myVar==true) {
    imgBar.stop();
    }

    }

    this is the error code i get
    1084: Syntax error: expecting rightparen before and.

  47. sparton058 said,

    September 1, 2009 at 7:52 pm

    ok… here is my “error”

    expecting rightbrac before duplicateMovieClip

    and heres the code

    {
    “”duplicateMovieClip ( “snow” , “snow” add i , i )
    scale = random (60) + 10
    setProperty (“snow” add i, _x, random(450))
    setProperty (“snow” add i, _xscale, scale)
    setProperty (“snow” add i, Yscale, scale)
    snowparticles++
    i++
    }

    please…please help

  48. samira said,

    September 27, 2009 at 3:06 am

    1087:syntax error :extra character found after of end program?
    whay the question?

  49. samira said,

    September 27, 2009 at 3:09 am

    1087:syntax error:extra characters found after end of program?
    whay the question?

  50. Marcus said,

    October 13, 2009 at 9:24 am

    btExit.buttonMode=true;
    btExit.addEventListener (MouseEvent.MOUSE_DOWN, Orange.exe);

    function Orange.exe(event:MouseEvent) :void
    {
    fscommand (“quit”);
    }

  51. mito said,

    October 27, 2009 at 2:18 pm

    1084: Syntax error: wxpecting identifier before function. PLEASE HELP

    Source: function videoOne(event:MouseEvent):void{

    here is my code:

    stop();
    OneV.addEventListener(MouseEvent.CLICKvideoOne).
    TwoV.addEventListener(MouseEvent.CLICK.videoTwo).
    ThreeV.addEventListener(MouseEvent.CLICK.videoThree).

    function videoOne(event:MouseEvent):void{
    pubPlayer.source = “flvs/01.flv”;
    }
    function videoTwo(event:MouseEvent):void{
    pubPlayer.source = “flvs/02.flv”;
    }
    function videoThree(event:MouseEvent):void{
    pubPlayer.source = “flvs/03.flv”;
    }

  52. Fatih GÜNGÖR said,

    October 30, 2009 at 2:06 pm

    _loc_2.this.menuActions[this.menu.indexOf(event.target)]();

    1084: Syntax error: expecting identifier before this.

    why why why .. i cant find.??

    please….

  53. Fatih GÜNGÖR said,

    October 30, 2009 at 2:09 pm

    Sooryy

    Full Code..

    var _loc_2:* = this.menuActions;
    _loc_2.this.menuActions[this.menu.indexOf(event.target)]();
    return;

    Full Code…

    second line giving error…

    1084: Syntax error: expecting identifier before this.

  54. Ash said,

    November 15, 2009 at 3:44 am

    Hi i seem to have a n error on the second line, missing a parenthesis after the two?? how the hell?! please can u help. thank you in advance 🙂

    b1.onRelease=function(){
    if(_root.page2_mc.currentframe –2) _root.page2_mc.gotoAndPlay(3);
    if(_root.page3_mc.currentframe ==2) _root.page2_mc.gotoAndPlay(3);
    _root.goto1_mc.gotoAndPlay(2)
    }

  55. Satiesh said,

    November 17, 2009 at 10:01 am

    hey guys..
    i did a test rn with this but there aRE 2 ERRORS IN IT..
    First was

    Syntax error: expecting colon before leftparen. source: gotoAndStop(“page1”);

    second is Syntax error : expecting identifier before rightbrace. }

    stop();

    function button1_clicked(e:MouseEvent);void{
    gotoAndStop(“page1”);
    }

    function button2_clicked(e:MouseEvent):void{
    gotoAndStop(“page2”);
    }
    function button3_clicked(e:MouseEvent):void{
    gotoAndStop(“page3”);
    }
    function button4_clicked(e:MouseEvent):void{
    gotoAndStop(“page4”);
    }

  56. satieh said,

    November 17, 2009 at 7:26 pm

    hi curtis,
    im having some problem with my codes..
    the syntax error was expecting colon before leftparen and the second erroe was expecting identifier before rightbrace,

    stop();

    function button1_clicked(e:MouseEvent);void{
    gotoAndStop(“page1”);
    }

    function button2_clicked(e:MouseEvent):void{
    gotoAndStop(“page2”);
    }
    function button3_clicked(e:MouseEvent):void{
    gotoAndStop(“page3”);
    }
    function button4_clicked(e:MouseEvent):void{
    gotoAndStop(“page4”);
    }

  57. loretha said,

    November 23, 2009 at 7:07 pm

    How can I fix that??

    1024: Syntax error: expecting identifier before new

    import com.google.maps.*;
    import com.google.maps.overlays.*;
    import com.google.maps.controls.*;

    var map:Map = new Map();
    map.key = “ABQIAAAACURfLzvHY3KuOjDVDQ3HJRQxv7oB1dQSsca9X52d2JXqp7iQjxRGk_J8WGeJbhiBq-p5dgfjG8EFJA”;
    map.setSize(new Point(stage.stageWidth, stage.stageHeight));
    map.addEventListener(MapEvent.MAP_READY, onMapReady);
    this.addChild(map);

    function onMapReady(e:Event):void
    {
    map.addControl(new ZoomControl());
    map.addControl(new MapTypeControl());
    this.map.setCenter(new LatLng (21.93690277951596, -100.0294017791748),14, MapType.NORMAL_MAP_TYPE);
    var m:Marker = new Marker(new Latlng(21.93690277951596, -100.0294017791748)), new MarkerOptions(icon:new marker());

    map.addOverlay(m);
    }

  58. dvir said,

    January 1, 2010 at 12:16 am

    hi
    i have a problem with Error 1084
    ActionScript Error #1084: Syntax error: expecting rightparene before dot
    t.y so much
    my code

    import flash.events.MouseEvent;
    var getIsrael:URLRequest = new URLRequest(“http://www.israelknights.com”);

    k.addEventListener(MouseEvent.CLICK,kClick);

    function kClick(event.MouseEvent):void{
    navigateToURL(getIsrael);
    }

  59. Steve Moniak said,

    January 14, 2010 at 2:54 pm

    Thanks in advance for your help your help

    How do I fix this, says:

    1086: Syntax error: expecting semicolon before leftparen.

  60. Josh said,

    January 22, 2010 at 7:18 am

    Hello,
    I can’t this works ..I still got error:

    1084: Syntax error: expecting rightbrace before toString.

    Code:

    {
    _loc_1.indexPlusOne.text = 0.toString() + ((_loc_2 + 1)).toString();
    }

    Any help is aprreciate it^^

    Josh.

  61. John said,

    March 10, 2010 at 6:42 am

    Hi…

    I am really new to Flex, I mean I am just 2 weeks doing Flex. I had encountered some difficulties…

    I had a button and the click event will call a function that returns a value of type string.

    Below is the code;
    click=”editState()”

    This event cannot be raised as this function requires a string value to pass and executes the function.

    Below is the function code;
    private function editState(passedValue:String):void {
    //code goes here
    }

    Now, what I want to do is to capture a label.text value and put it in the call function under click event but how am I supposed to do that? I tried putting like editState(‘label.text’). Sorry, I am very new… Please advice

    –John–

  62. Marcus Wilkerson said,

    April 8, 2010 at 7:09 am

    How do I correct this code:
    Scene 1, Layer ‘as_roots’ Fr 1084: Syntax error: expecting identifier before end of program.

  63. Ahmad said,

    April 10, 2010 at 5:44 am

    Hello,

    I am new to AS3 and CS3, I am trying to learn how to put together a flash file similar to another one I found, not my own, so I only have the swf file. I was able to get my version almost working, but now I am getting this error:

    Location:
    tempInit, line 1 I am trying to figure why I keep getting this error

    Description:
    1084: Syntax Error: expecting identifier before 6.

    Source:
    import 6_fla.blue_Auto_Loop_136

    Any ideas?

    -Thanks

  64. Moha said,

    May 22, 2010 at 8:00 am

    Having an error with that code:

    The code:

    {
    ball:x += ((ball.x + tx) – ball.x) * 0.3;
    ball:y += ((ball.y – ty) – ball.y) * 0.3;
    }

    The Error “Scene 1, Layer ‘Actions’, Frame 1, Line 21 1084: Syntax error: expecting rightbrace before semicolon.”

    N.B. “Ball.x”,.. is line no. 21

  65. Gabriel said,

    July 18, 2010 at 11:03 pm

    stop();
    stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
    function keyPressed(vent:KeyboardEvent):void
    {
    **** switch(vent:Number)
    {
    case Keyboard.RIGHT : jixagupho_mc.x += 2
    break;
    case Keyboard.LEFT : jixagupho_mc.y -= 2
    break;
    default :
    break
    }
    }

    pretty simple stuff here guys, in my AS3.0, keyCode doesn’t turn blue here for some reason and the error is noted at the starred line

  66. Deadgunner said,

    November 11, 2010 at 8:48 am

    hey
    Ive got Flash CS3 and made this short code

    on(keyPress””)
    {
    loadMovieNum(“Instruction.swf”,0);
    }

    ive not got a clue about whats wrong with my code but it keeps flaging up

    1084:syntax error:expecting rightparen before on(keyPress “”)

    please have a look at it

    Thanks

    =)

  67. Kristen3094 said,

    December 8, 2010 at 5:01 pm

    I am very new to Flash, in fact, I’m still taking the course in college. My code my look completely wrong, but I don’t understand what I’m doing wrong…. I keep getting this 1084 error (2 of them) What am I doing wrong?

    stop();
    function jumpPage (event:MouseEvent):void {
    switch (event.currentTarget) {
    case home_btn:
    gotoAndStop(“home”);
    break;
    case menu_btn:
    gotoAndStop(“menu”);
    break;
    case gallery_btn:
    gotoAndStop(“gallery”);
    break;
    case events_btn:
    gotoAndStop(“events”);
    break;
    case facebook_btn:
    gotoAndStop(“facebook”);
    break;

    home_btn.addEventListener(MouseEvent.CLICK,
    jumpPage);
    menu_btn.addEventListener(MouseEvent.CLICK,
    jumpPage);
    gallery_btn.addEventListener(MouseEvent.CLICK,
    jumpPage);
    events_btn.addEventListener(MouseEvent.CLICK,
    jumpPage);
    facebook_btn.addEventListener(MouseEvent.CLICK,
    jumpPage);

    If anyone happens to know, my email is alivexgo@gmail.com and i’d GREATLY appreciate the help!

  68. bamccarren said,

    February 22, 2011 at 11:14 am

    I am new to using flash and have created a site using flash 175. Everything was working beautifully until I received anerror in my preloader actions code.

    Error reads: 1046: Type was not found or was not a compile-time constant:button

    It is saying the error is on this line of code “percent = Math.round ( loaded * 100 );”

    Here is my full code:

    var loaded:Number;
    var percent:Number;
    bar.addEventListener( Event.ENTER_FRAME, load_progress );

    function load_progress(e:Event):void
    {
    loaded = stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal ;
    percent = Math.round ( loaded * 100 );
    }

    bar.scaleX = loaded;
    loader_info.text = “Loading… ” + percent + “%”;

    if( percent == 100 )
    {
    bar.removeEventListener( Event.ENTER_FRAME, load_progress );
    play();
    }

    Any help you can provide ASAP would be tremendous! Thank you so much.

  69. lizzy said,

    March 30, 2011 at 1:11 pm

    I keep getting this error:
    1086: Syntax error: expecting semicolon before rightparen.

    It claims it’s on Line 6, but I have no line 6 – Here is Action Script:
    FlightDeckInfo_Button.addEventListener (MouseEvent.CLICK, funcName);
    function funcName(e:MouseEvent){
    var urlVar:URLRequest = new URLRequest(“SiteInfo.htm”);
    navigateToURL(request, “dashboard”);
    }

    I am using Flash CS5 and AS3, publish settings are for AS3 . . I tried adding a semicolon before last right paren and it doesnt fix it

    Can u save me? I am ready to throw PC out window … 😉

  70. Erin said,

    August 15, 2011 at 11:15 pm

    I keep getting this error: 1084: Syntax Error: expecting rightparen before dot.

    function wronganswer3(event:MouseEvent):void {
    event.target.stopDrag();
    if (q3answer3_mc.hitTestObject(answerspot_mc)) {
    }function loselife(MouseEvent.MOUSE_UP):void{
    q3answer2_mc.x= 224;
    q3answer2_mc.y= 259;
    }
    }
    }

Leave a Comment