3
votes

So I add this line to my .FLA file in the first frame's script:

import mx.core.UIComponent;

I receive this error:

1093: Syntax error.

in UIComponent.as line 54. Double click on that in the Compiler Errors panel and I see:

#include "../core/ComponentVersion.as"

OK, the syntax error is likely in ComponentVersion.as ... except it really, really shoud not be. And if I load that file into the Flash editor and syntax check it has no errors. However, if I copy the sole non-comment line of that file (static var version:String = "2.0.2.127"; ) into UIComponent in place of the #include, it works????

Now I get this error:

5007: An ActionScript file must have at least one externally visible definition.

Excuse me? This is a class definition file suppled with Flash!

Any clues would be gratefully received.

I'm using Flash CS4 (10.0.2).

1
Odd since #include went out with ActionScript 2John Giotta
As you might guess, I'm much more familiar with AS 2 than 3. But ... why does CS4 come with an obsolete version of UIComponent? I'm going to try a reinstall with total wipeout between, and see if that resolves it.CarlF
I would be sure your publish settings is set to AS3. Sounds trivial, but I'm the first to tell I'd overlook it easily.John Giotta
Why are you using mx.core.UIComponent? Are you importing the Flex SDK? Flash Pro has it's own version of UIComponent: fl.core.UIComponent.merv
The mx libraries are not supplied with flash. So what is it you are trying to do?The_asMan

1 Answers

4
votes

Unless you are intentionally trying to import the Flex SDK, you should be using the UIComponent class from the library included in Flash Pro, fl.core.UIComponent, and not the Flex counterpart, mx.core.UIComponent.