views:

170

answers:

1

Hello coders,

Super simple example:

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)

What do you expect path1 to be ? E: ? No its E:SWF SecurityAcess Current PathAccess SWF URL.swf and i have no idea why.

+1  A: 

In this situation you should use forward-slash instead of back-slash in your path. AS3 will treat them as the same when you're trying to load a file.

Then you can split using Path.split("/");

teehoo