Highlighted

Errors in compilation

New Here ,
Oct 02, 2006

Copy link to clipboard

Copied

I'm a newbie in Flash.
I met some compilation errors and hope one can help.

I used Flash 8 professional.
My FLA file involves a few AS files e.g. btn_Down.as. <--- Please see the code attached
When I compiled, all the errors are concerning "ActionScript 2.0 class scripts may only define class or interface constructs."
Please help. Thanks.

Here are the errors:

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 3: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.val = 1;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 4: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.ovr(_root.Val);

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 6: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageWidth = 1320;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 7: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageHeight = 938;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 8: ActionScript 2.0 class scripts may only define class or interface constructs.
var cnt:Number = 0;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 10: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioX:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 11: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioY:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 13: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.mouseSensor = true;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 14: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.goDest = false;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 39: ActionScript 2.0 class scripts may only define class or interface constructs.
};

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 3: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.val = 1;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 4: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.ovr(_root.Val);

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 6: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageWidth = 1060;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 7: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageHeight = 480;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 8: ActionScript 2.0 class scripts may only define class or interface constructs.
var cnt:Number = 0;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 10: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioX:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 11: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioY:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 13: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.mouseSensor = true;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 14: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.goDest = false;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 39: ActionScript 2.0 class scripts may only define class or interface constructs.
};

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 3: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.val = 1;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 4: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.ovr(_root.Val);

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 6: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageWidth = 1320;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 7: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageHeight = 938;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 8: ActionScript 2.0 class scripts may only define class or interface constructs.
var cnt:Number = 0;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 10: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioX:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 11: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioY:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 13: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.mouseSensor = true;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 14: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.goDest = false;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 39: ActionScript 2.0 class scripts may only define class or interface constructs.
};
TOPICS
ActionScript

Views

607

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Errors in compilation

New Here ,
Oct 02, 2006

Copy link to clipboard

Copied

I'm a newbie in Flash.
I met some compilation errors and hope one can help.

I used Flash 8 professional.
My FLA file involves a few AS files e.g. btn_Down.as. <--- Please see the code attached
When I compiled, all the errors are concerning "ActionScript 2.0 class scripts may only define class or interface constructs."
Please help. Thanks.

Here are the errors:

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 3: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.val = 1;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 4: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.ovr(_root.Val);

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 6: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageWidth = 1320;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 7: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageHeight = 938;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 8: ActionScript 2.0 class scripts may only define class or interface constructs.
var cnt:Number = 0;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 10: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioX:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 11: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioY:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 13: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.mouseSensor = true;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 14: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.goDest = false;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Down.as: Line 39: ActionScript 2.0 class scripts may only define class or interface constructs.
};

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 3: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.val = 1;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 4: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.ovr(_root.Val);

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 6: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageWidth = 1060;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 7: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageHeight = 480;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 8: ActionScript 2.0 class scripts may only define class or interface constructs.
var cnt:Number = 0;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 10: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioX:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 11: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioY:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 13: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.mouseSensor = true;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 14: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.goDest = false;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_As.as: Line 39: ActionScript 2.0 class scripts may only define class or interface constructs.
};

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 3: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.val = 1;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 4: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.ovr(_root.Val);

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 6: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageWidth = 1320;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 7: ActionScript 2.0 class scripts may only define class or interface constructs.
var pageHeight = 938;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 8: ActionScript 2.0 class scripts may only define class or interface constructs.
var cnt:Number = 0;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 10: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioX:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 11: ActionScript 2.0 class scripts may only define class or interface constructs.
var ratioY:Number = 0.12;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 13: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.mouseSensor = true;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 14: ActionScript 2.0 class scripts may only define class or interface constructs.
_root.goDest = false;

**Error** C:\Documents and Settings\billy\桌面\flash_test\btn_Cust.as: Line 39: ActionScript 2.0 class scripts may only define class or interface constructs.
};
TOPICS
ActionScript

Views

608

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 02, 2006 0
LEGEND ,
Oct 02, 2006

Copy link to clipboard

Copied


"billywhy" <webforumsuser@macromedia.com> wrote in message
news:efsrl8$sdh$1@forums.macromedia.com...
> I'm a newbie in Flash.
> I met some compilation errors and hope one can help.
>
> I used Flash 8 professional.
> My FLA file involves a few AS files e.g. btn_Down.as. <--- Please see the
> code
> attached
> When I compiled, all the errors are concerning "ActionScript 2.0 class
> scripts
> may only define class or interface constructs."
> Please help. Thanks.

How are you *including* the AS files?


Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2006 0
Adobe Community Professional ,
Oct 02, 2006

Copy link to clipboard

Copied

do you have a btn_Down class? or are you using an include statement to load your as file?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2006 0
New Here ,
Jun 24, 2019

Copy link to clipboard

Copied

Randomly out of nowhere the type tool stops working. It's not a particular set of steps that trigger it but anything randomly makes the type tool freeze. I have to restart the application all over again to make it work - which is as annoying as it sounds.

Please provide some help or support regarding this.

Thanks,

L

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 24, 2019 0
Adobe Community Professional ,
Jun 25, 2019

Copy link to clipboard

Copied

Hi, try uninstalling and installing Adobe XD again.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 25, 2019 1
Adobe Employee ,
Jun 26, 2019

Copy link to clipboard

Copied

Let us know if the above solution worked, or if you still need assistance.

Thanks,

Preran

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 26, 2019 0
Community Beginner ,
Dec 05, 2019

Copy link to clipboard

Copied

I'm having this same problem. I tried to reinstall and it didn't work.

The issue is really annoying, it's happening repeatedly and I have to close and reopen XD over and over. =/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 05, 2019 0
Community Beginner ,
Dec 08, 2019

Copy link to clipboard

Copied

Preran, I don't understand. The issue on type tool I and lipi_artist were talking about is in Adobe XD. The conversation was moved to a Flash discussion from 2006? I tried to understand the conversation to see if there is a relation and don't see how to use it on solving type issue on XD.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 08, 2019 0
New Here ,
Oct 02, 2006

Copy link to clipboard

Copied

Attached is my btn_Down.as file.
I used an include statement to load it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2006 0
Adobe Community Professional ,
Oct 02, 2006

Copy link to clipboard

Copied

show your include statement. (and you can't attach files here.)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2006 0
New Here ,
Oct 02, 2006

Copy link to clipboard

Copied

#include "btn_Down.as"

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2006 0