A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: 1084 errors

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    12

    1084 errors

    Hey guys,
    I am getting a couple 1084 errors I can't figure out:

    THE CODE:

    //listener for the ProgressEvent when a download of the new
    version is in progress
    function onDownloadProgress(eventrogressEvent):void {
    windowContent.bar.setProgress(event.bytesLoaded, event.bytesTotal);
    }

    THE ERROR:
    1084: Syntax error: expecting identifier before in.



    THE CODE:

    //create a window using NativeWindow, and as a content myWindow
    class
    function createWindow():void {
    if (window == null) {
    var options:NativeWindowInitOptions = new NativeWindowInitOptions();
    options.systemChrome = NativeWindowSystemChrome.STANDARD;
    options.type = NativeWindowType.NORMAL;

    window = new NativeWindow(options);
    window.x = 300;
    window.y = 200;
    window.stage.stageHeight = 230;
    window.stage.stageWidth = 450;
    window.stage.scaleMode = StageScaleMode.NO_SCALE;
    window.stage.align = StageAlign.TOP_LEFT;
    window.stage.addChild(windowContent);
    windowContent.bar.visible = false;
    }
    window.alwaysInFront = true;
    window.visible = true;
    }

    THE ERRORS:
    1084: Syntax error: expecting identifier before function.
    1084: Syntax error: expecting leftbrace before leftparen.


    I can't for the life of me figure it out. Whats wrong with my code?

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Should be:
    function onDownloadProgress(event:ProgressEvent):void {
    windowContent.bar.setProgress(event.bytesLoaded, event.bytesTotal);
    }

    1084 errors are syntax errors when you forget parenthesis etc. You need to go through your code step by step.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    12
    Hey thanks a lot for the reply.
    I cleaned it up but its still giving me errors.

    The specific line is this one:

    //listener for the ProgressEvent when a download of the new
    version is in progress -This is the specific line its referencing
    function onDownloadProgress(event:ProgressEvent):void {
    windowContent.bar.setProgress(event.bytesLoaded, event.bytesTotal);
    }

    1084: Syntax error: expecting identifier before in.

    I have rewritten it over and over and it continues to give me the same error what gives?

  4. #4
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    If that is your actual code, including line break, then the problem is that you have what should be in a comment as code.

    Use [code] or [php] tags to format code here so we don't have to guess about what you actually have.

    Try either moving the complete comment to a single commented line, or making it a multiline comment.
    Code:
    /*
    listener for the ProgressEvent when a download of the new
    version is in progress -This is the specific line its referencing
    */
    function onDownloadProgress(event:ProgressEvent):void {
      windowContent.bar.setProgress(event.bytesLoaded, event.bytesTotal);
    }

  5. #5
    Junior Member
    Join Date
    Oct 2009
    Posts
    12
    5Tons you have no idea how much you have just helped me.
    So I was copying the Actionscript from this tutorial and the code though it looked identical was actually being interpreted by Flash as a function and not commented out code. I fixed the comments and it looks perfect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center