Search code examples
actionscript-3flash

Actionscript error: syntax error, unexpected '<'


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?


Solution

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