0

超级简单的例子:

var Path:String="E:\SWF Security\Acess Current Path\Access SWF URL.swf" 

var Path1:Array = Path.split("\\") // Split using the backslash as delimiter (No limit the number of returned tokens) 

trace(Path1)

你期望 path1 是什么?乙:?没有它的 E:SWF SecurityAcess 当前 PathAccess SWF URL.swf 我不知道为什么。

4

1 回答 1

1

在这种情况下,您应该在路径中使用正斜杠而不是反斜杠。当您尝试加载文件时,AS3 会将它们视为相同。

然后你可以使用 Path.split("/"); 分割。

于 2010-04-21T16:41:03.680 回答