我试图在旧的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>[];
之类的东西引起的...例如,第350行的if(!groups){ groups = new <SoundManager>[]; }
。
我不熟悉使用的语法...它尝试做什么,为什么它在Flash Builder 4.7中不起作用,我怎样才能使它工作?
答案 0 :(得分:0)
是的,@安德烈波波夫是对的。此变量groups
是Vector
类型的SoundManager
。 var groups:Vector.<SoundManager>
各个if语句if
到组实例是null
,如果是,则创建一个新实例。