0
votes

When I try to compile this Actionscript code code with 'as3compile.exe', I get this error :

Code:

package
{    

    public class Main extends Sprite
    {
        private var myvct:uint = 0;
        public function Start():void
        {
            myvct = new Vector.<uint>();

        }

        public function Main():void
        {
            Start();
        }
    }
}   

Output:

error: syntax error, unexpected '<'

Can anyone please tell me whats is wrong here?

1
are you sure it'a all content? It compiles fine to me. Besides you define your variable as vector when you want to assign vector to it - private var myvct:Vector.<uint>; - Paweł Audionysos
It worked compiled smoothly with : Adobe’s Flex SDK's mxmlc.exe. - Dev.K.
@Dev.K. you were likely targeting wrong (older) Flash Player version. - VC.One

1 Answers

1
votes

I used Adobe’s Flex SDK's mxmlc.exe to compile the same code. It worked smoothly.