Flash CS3 / Flex 2 Error #1084

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 thoughts on “Flash CS3 / Flex 2 Error #1084

  1. 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;
    }
    }
    }

  2. 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 … 😉

  3. 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.

  4. 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!

  5. 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

    =)

  6. 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

  7. 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

  8. 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

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

  10. 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–

  11. 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.

  12. 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);
    }

  13. 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);
    }

  14. 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”);
    }

  15. 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”);
    }

  16. 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)
    }

  17. 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.

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

    1084: Syntax error: expecting identifier before this.

    why why why .. i cant find.??

    please….

  19. 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”;
    }

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

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

  21. 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

  22. 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.

  23. 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.

  24. 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.

  25. 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.

  26. 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

  27. 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>< 🙂

  28. 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

    }
    }

  29. 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.

  30. 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.

  31. :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.

  32. 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.

  33. Hi

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

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

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

  35. 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

  36. 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..

  37. 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.

  38. 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;

  39. 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?

  40. 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…

  41. 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”);
    }

  42. 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

  43. 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 {

  44. 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

  45. 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.

  46. 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

    }
    }

  47. Pingback: curtismorley.com » New info on Error Flex/Flash Error #1084: Syntax error: expecting identifier before 1084.

  48. 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{
    }

  49. 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

  50. 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

  51. 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?

  52. i got one that said :

    1084: Syntax error: expecting rightparen before dot.

    here is my code:

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

  53. Pingback: curtismorley.com » Search Engine Optimization Example

  54. Pingback: curtismorley.com » Flex / Flash ActionScript Error #1095

  55. Pingback: curtismorley.com » New Scenarios of AS3 Error #1084

  56. 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

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

    ” 1084 : Syntax error : expecting rightparen before colon ”

    Do not understant really ^^

  58. 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

  59. 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

Comments are closed.