0
votes

I've been doing alot of searches but everything I've found and tried has not solved my problem. I know very little about flash programming but I have this code I need to fix and I haven't the slightest idea what to do to stop getting this syntax error:

"£RROR: _d.as, Line 7: Syntax error: expecting identifier before leftbrace." for the code:

package{
    import flash.display.*;

    dynamic public class _d extends MovieClip{

        public function _d()
        {
            return;
        }// end func

    }
}

I'm in a rush to fix this and have no ideas on how so any help would be appreciated. Also if anyone knows a better flash editior(freeware) than Sothink SWF Quicker, I'd be grateful for that assistance too.

P.S. Several files have this error, this file just had the simplest code to show

1

1 Answers

1
votes

Your code compiles for me when I set it as the document class for an AS 3.0 project in Flash CS 5. I would suggest removing the return statement as constructors in ActionScript 3.0 should not return anything.

On the subject of naming your classes, the convention in ActionScript is to use CamelCase (see MovieClip, TextField etc.). A class named _d does not, I suspect, make for very readable code (but of course you may have your own reasons for naming your classes in this way).

FlashDevelop is an excellent ActionScript 3.0 code editor, though it won't give you the timeline and graphic creation functions you get from Sothink or the Flash IDE itself.