ActionScript Error #1093: Syntax error.
Update 2/25/2008
Description:
This is one of the least descriptive descriptions that Flash/Flex will provide you. It can be given for a number of reasons. Some that I have run into I have not found the reason for, but instead I just rewrite the entire line of code that it reports. One reason that I have found that is duplicate-able is copying code from the web and pasting it into Flash. Most especially code with quotes.
Fix 1:
Delete the line of rogue line of code and retype it from scratch.
Again I had this error and even after commenting the line of code out entirely I still received this error. Once more I deleted the code and retyped and it worked just fine. Below is the line of code commented out. Don’t beat your head on this one. Just delete and retype. I believe that this error has something to do with the copy and paste functionality within the IDE.
Bad/Good Code 1: (this code actually works after being retyped)
/*//stage.removeEventListener(Event.ENTER_FRAME, moveCar);*/
Fix 2:
Delete the quotes from the code that you copied from the web and replace them with regular quotes.
Bad Code 2:
this.thePlayer.videoSource = “main_video.flv“;
Good code 2:
this.thePlayer.videoSource = “main_video.flv”;
Fix 3:
Delete the #(pound symbol) before the color value.
Bad Code 3:
graphics.lineStyle(1, #FFFFFF);
Good code 3:
graphics.lineStyle(1, 0xFFFFFF);
Thanks to grildcheese who left a comment about Fix3 above.
Fix 4:
Do not use #include in ActionScript 3 instead use import.
Bad Code 4:
package
{
#include “myClass.as”
Bad Code 4:
package
{
import myClass;
I will continue to post reasons for AS3 error 1093 as I find them and hopefully it will help you out.
As Always, Happy Flashing