PDA

View Full Version : swf name problem .....


flashdev
03-26-2003, 05:33 AM
I want to get the swf name .
Using movieClip._url returns the name with full path .
I need the name only (pure) without its path ,
How can I achieve this ?

tost
03-26-2003, 06:24 AM
try Movieclip._name

flashdev
03-26-2003, 08:35 AM
movieClip._name returns the instance name of the movieClip .
I got the solution :
try this :
this._url.substring(this._url.lastIndexOf("/")+1,this._url.length)
or this detailed :
url = "http://betaruce.port5.com/flash_swf/wave_7.swf";
abc = url.split("/");
trace(abc[abc.length-1]);
// Output: wave_7.swf

farafiro
03-26-2003, 09:31 AM
nice one Dev, but see this, very cool too
http://proto.layer51.com/d.aspx?f=115