我已将我的脚本更新为下面提到的内容,但我仍然收到相同的语法错误......有什么建议吗?
<fx:Script>
<![CDATA[
try {
URL url = new URL("http://www.rwolfc.com/App/TRY.txt"){;
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String str;
while ((str = in.readLine()) != null) {
}
in.close();
} catch (MalformedURLException e) {
} catch (IOException e) {
}
]]>
</fx:Script>
但是当我使用它时,我在 flex 中得到以下错误:
1071: Syntax error: expected a definition keyword (such as function) after attribute String, not str.
1073: Syntax error: expecting a catch or finally clause.
1084: Syntax error: expecting rightbrace before leftbrace.
帮助!!??!!