Posted By

alptugan on 10/29/10


Tagged

String as3 actionscript3


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

sexyflash
thastyle
elkraneo


Get Filename from url path and Remove extension


 / Published in: ActionScript 3
 

URL: http://www.alptugan.com

  1. private function removeExtAndGetFileName($url:String):String
  2. {
  3. var extRemoved : String = $url.slice($url.lastIndexOf("/")+1,$url.lastIndexOf("."));
  4. return extRemoved;
  5.  
  6. //trace(removeExtAndGetFileName("http://www.mydomain.com/images/myFilename.jpg"));
  7. // OUTPUT: myFilename
  8. }

Report this snippet  

You need to login to post a comment.