Flash CS3 / Flex AS3 Error #1086

ActionScript Error: 1086: Syntax error: expecting semicolon before mult

Description:
This is a very easy and straightforward error with a horrible description. It actually has nothing to do with a semicolon at all. All this error means is that you forgot a ‘.’ in your import before the ‘*’.

Fix:
Add the Dot

Bad Code:

import flash.events*;

Good Code:

import flash.events.*;

Hopefully the confusing description for this ActionScript Error didn’t cause you to pull your hair out.

As Always Happy Flashing

Flash Error #1086: Syntax error: expecting semicolon before dot.

Description:
Another reason for the Flex / Flash Error #1086 is because a function/method call is typed.  It is very important to type a function but do not type the call to the function.

Fix:
Remove the typing at the end of the method call.

Bad Code:

resource.readXml (requestId, onResourceXmlLoadSuccess, onResourceXmlLoadFail):void;

Good Code:

   resource.readXml (requestId, onResourceXmlLoadSuccess, onResourceXmlLoadFail);

Happy Flashing

7 thoughts on “Flash CS3 / Flex AS3 Error #1086

  1. Here’s one:

    private const SOME_CONST:Point(50,50);
    // 1086: Syntax error: expecting semicolon before leftparen.

    private const SOME_CONST:Point = new Point(50,50);
    // correct

  2. This error occured when I have a folder like ‘first-second’.

    When I change this folder’s name to fistsecond, it works fine.

  3. Also double check the css files.
    I had:
    com.skins..something
    instead
    com.skins.something

    Very annoying error

  4. may also happen if you have action script running on a frame which is within a motion tween.

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

Comments are closed.