簡體   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