Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-13-2008, 08:15 PM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default How to use new Folder in AS to get files in a folder?

I've tried, but I can't get it to work. May I have some sample code? It will only work as a SWFKit script. Thanks!

Last edited by motionman95; 12-13-2008 at 09:56 PM.
Reply With Quote
  #2 (permalink)  
Old 12-14-2008, 10:30 AM
Junior Member
 
Join Date: Apr 2008
Posts: 29
Default

sorry for my bad english!
in Folder.as,there is no such a property named files,but there is a methed of the same name.
as follwing:
import SWFKit.*;
var f = new Folder("c:\\windows");
Global.trace(f.files());
it can be worked!!
Reply With Quote
  #3 (permalink)  
Old 12-14-2008, 11:10 PM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default

Thanks it worked! I have a question, though. Is there a way to only get the name of the file?

Instead of C:\WINDOWS\blahblah.blah just blahblah.blah?
Reply With Quote
  #4 (permalink)  
Old 12-15-2008, 12:12 AM
Junior Member
 
Join Date: Apr 2008
Posts: 29
Default

var f = new Folder("c:\\windows");
Global.trace(f.files("blahblah.blah"));
Reply With Quote
  #5 (permalink)  
Old 12-16-2008, 08:58 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

Quote:
Originally Posted by motionman95 View Post
Thanks it worked! I have a question, though. Is there a way to only get the name of the file?

Instead of C:\WINDOWS\blahblah.blah just blahblah.blah?
You can use the "name" property of the File object. It does exactly what you want.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:30 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.