08.21.07

Flash CS3 / Flex AS3 Error #1086

Posted in Flash, Flex, errors, quicktip at 8:43 pm by Curtis J. Morley

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

4 Comments »

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

    June 2, 2008 at 5:03 pm

    [...] AS3 Error 1086 - #1,2 hit on Google [...]

  2. butterbrot said,

    August 5, 2009 at 1:51 pm

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

  3. Wilson Edgar said,

    January 23, 2010 at 5:34 am

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

    Very annoying error

  4. Anny Odar said,

    March 8, 2010 at 7:31 pm

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

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

Leave a Comment