繁体   English   中英

AS3的语法是什么? 新 <object> [];

[英]What is this AS3 syntax? new <object>[];

我正在尝试在旧的Flex 3.6项目中使用SoundAS库。 但是,在尝试使用它时,出现了一些语法错误。

Description Resource    Path    Location    Type
1084: Syntax error: expecting identifier before if. SoundManager.as /treefortress/sound line 362    Flex Problem
1084: Syntax error: expecting identifier before if. SoundManager.as /treefortress/sound line 377    Flex Problem
1084: Syntax error: expecting identifier before if. SoundManager.as /treefortress/sound line 440    Flex Problem
1084: Syntax error: expecting identifier before if. SoundManager.as /treefortress/sound line 443    Flex Problem
1084: Syntax error: expecting identifier before return. SoundManager.as /treefortress/sound line 438    Flex Problem
1084: Syntax error: expecting identifier before rightbrace. SoundManager.as /treefortress/sound line 371    Flex Problem
1084: Syntax error: expecting identifier before rightbrace. SoundManager.as /treefortress/sound line 372    Flex Problem
1084: Syntax error: expecting identifier before rightbrace. SoundManager.as /treefortress/sound line 430    Flex Problem
1084: Syntax error: expecting identifier before var.    SoundManager.as /treefortress/sound line 389    Flex Problem
1084: Syntax error: expecting identifier before var.    SoundManager.as /treefortress/sound line 407    Flex Problem
1084: Syntax error: expecting identifier before var.    SoundManager.as /treefortress/sound line 426    Flex Problem
1084: Syntax error: expecting identifier before var.    SoundManager.as /treefortress/sound line 433    Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447    Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447    Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447    Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447    Flex Problem
1084: Syntax error: expecting rightbrace before end of program. SoundManager.as /treefortress/sound line 447    Flex Problem
1084: Syntax error: expecting rightbrace before for.    SoundManager.as /treefortress/sound line 408    Flex Problem
1084: Syntax error: expecting rightbrace before if. SoundManager.as /treefortress/sound line 390    Flex Problem
1084: Syntax error: expecting rightbrace before leftbrace.  SoundManager.as /treefortress/sound line 362    Flex Problem
1084: Syntax error: expecting rightbrace before leftbrace.  SoundManager.as /treefortress/sound line 377    Flex Problem
1084: Syntax error: expecting rightbrace before leftbrace.  SoundManager.as /treefortress/sound line 440    Flex Problem
1084: Syntax error: expecting rightbrace before leftbrace.  SoundManager.as /treefortress/sound line 443    Flex Problem
1084: Syntax error: expecting rightbrace before loadCompleted.  SoundManager.as /treefortress/sound line 427    Flex Problem
1084: Syntax error: expecting rightbrace before loadFailed. SoundManager.as /treefortress/sound line 434    Flex Problem
1084: Syntax error: expecting rightbrace before semicolon.  SoundManager.as /treefortress/sound line 363    Flex Problem
1084: Syntax error: expecting rightbrace before semicolon.  SoundManager.as /treefortress/sound line 383    Flex Problem
1084: Syntax error: expecting rightbrace before semicolon.  SoundManager.as /treefortress/sound line 393    Flex Problem
1084: Syntax error: expecting rightbrace before semicolon.  SoundManager.as /treefortress/sound line 418    Flex Problem
1084: Syntax error: expecting rightbrace before semicolon.  SoundManager.as /treefortress/sound line 446    Flex Problem
1100: Syntax error: XML does not have matching begin and end tags.  SoundManager.as /treefortress/sound line 447    Flex Problem
1100: Syntax error: XML does not have matching begin and end tags.  SoundManager.as /treefortress/sound line 447    Flex Problem
1100: Syntax error: XML does not have matching begin and end tags.  SoundManager.as /treefortress/sound line 447    Flex Problem

在SoundManager.as中查看,报告的语法错误不是实际的问题。 相反,所有错误似乎都是由使用诸如new <Object>[];类的东西引起的new <Object>[]; ...例如, if(!groups){ groups = new <SoundManager>[]; } if(!groups){ groups = new <SoundManager>[]; }在第350行。

我不熟悉所使用的语法...它想做什么,为什么它不能在Flash Builder 4.7中工作,如何使它工作?

是的,@ AndreyPopov是正确的。 此变量groupsSoundManager类型的Vector var groups:Vector.<SoundManager>相应的if语句if to groups实例为null ,如果是,则创建一个新实例。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM