Can Flash Dynamically Read Swf Files From A Directory? [renamed]
is there a way to have flash read swf from a directory dynamicaly. so if you add a new one it reads it and you could have a next and previouse button to dynamicly browse throught them. this way you could just upload new swf and it would automaticaly add it to the set so when you hit next at the end it would read the new one.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Can Flash Dynamically Read Swf Files From A Directory? [renamed]
is there a way to have flash read swf from a directory dynamicaly. so if you add a new one it reads it and you could have a next and previouse button to dynamicly browse throught them.
this way you could just upload new swf and it would automaticaly add it to the set so when you hit next at the end it would read the new one.
Can Flash Read The Number Of Files In A Directory?
I am currently working on a project and need to get the total number of files in a directory.
So for example, when the flash program first starts up, and if there are 5 files in the directory, it scans the number of files and returns the value 5 into a variable that I can manipulate.
Is Flash even able to do this? I've looked around, and I can't seem to find an answer.
edit: I don't know why I used the code tag....I guess it should be the question tag.
Flash READ What Files Exist Within A Directory ...Without USING SERVER SIDE SCRIPTING
Hi,
How can Flash read what files exists in a sub directory on my server without using server side scripting becasue this is going to be an online/offline product.
For example:
I need the Flash application to read what files are in a sub folder within the main folder where the swf sits on my server:
For example:
www.multimediaprogrammer.com/mainapp/pics/
Contains
1.jpg
2.jpg
I want Flash to tell me files 1.jpg and 2.jpg are in the pics folder?
MANY THANKS IN ADVANCE FOR THE HELP!!!!!
Debra
Read Name Of Files From Directory
hi:
i´m working in a project that need to use the names of the files to load .JPG into a MC, if in the directory are 5 files, the movie loads this 5 files, but if i erase 2, then the movie only loads 3, my principal question is how can i acces the names of the files in a directory?
tnx
Plutarcomp
Read All Mp3 Files In A Specified Directory And Then Play Them
I have a mp3 player that plays 3 different mp3 files and it works good enough I suppose, but what I would like to do now is make it read all mp3 files in a specified directory and then play them. That way I won't have to specify individual filenames and locations in my code.
So what I need to know is how to read the all the mp3 filenames in my target directory to an array so I can include them in my playlist.
READ Directory Structure From Flash
I am trying to figure out how to
read a directory structure from an (index)flash file
and dynamically present links to those directories (index)
named after the folders...ultimately I would like to have
some control over the presentation of the links as in being
spaced by certain pixel dimensions...x and y.....
any help here would be great ...even a shout in the right
direction of study...
PHP maybe?????????
XML perhaps.....or just html???
I have been getting a lot of help from these forums and
I am currently reading about 5 books trying to get something to
give back...thanks in advance Paul S. Mungar
Can AS3 Or XML "read" Files From A Directory?
What I want is for flash to grab files from a directory without knowing what files are there. I dont think it's possible with AS3 but I'm not too sure about XML, and if I can get it into a xml file, then i can ccess it from as3.
The concept might be confusing so an example would be if I had a mp3 player and I wanted to play files from a certain directory but not know what files were in that directory. I would assume XML can "scan" folders for files with a specified exstention and store that information in an array of somesort.
Read Directory
HI Everyone ,
I need to have a navegation that reads and display the content of a directory [.swfs], do you guys have any feedbacks on the best way to do this.
thanks.
flako
[F8] Read Directory Contents
Hello, all.
I have recently been tasked with creating a Flash movie that will read the contents of a directory(all images), and then create a randomized slideshow out of all of them. I know that I could do this by using a Perl/PHP script that generated XML for me, but I'm wondering: is there a way to do this in pure ActionScript, without any outside languages?
Thanks,
girasquid
Any Way To Read A File Directory?
I've written a script that loads slideshow images based on a provided "base" filename. For example, if I give it the name "photos/slideshowImage" it will look for photos/slideshowImage1.jpg, photos/slideshowImage2.jpg, etc. When it reaches a filename that does not exist, the script detects the failure to load and exits.
The one part I'm missing, though, is the ability to determine (BEFORE I start loading the files) how many qualifying files there are in the directory. I'd like to know this because it allows me to scale my preloader bar appropriately: if there are 5 images, then each image loading covers 1/5 of the total preloader bar width. If 3 images, then each image makes the bar move 1/3 of its width. And so on.
At present I'm manually feeding the class the number of images, but I would love to be able to test my way through a loop and find out dynamically how many images there are.
At present the only way I know to "test" is to try loading the image, which kind of defeats the purpose.
Is there any way to read a list of files in a directory, or otherwise determine which qualifying files exist, before actually trying to load them?
- Bob
Read Contents Of Directory
Hi
I want to be able to read the contents of a directory and subdirectories and output that into a XML file for offline use. I know i can use php to do this for online but i have no ideas how to do it for offline.
say i want to read the "C:images" directory i want something that will output an XML file that will look something like this:
Code:
<directory name="images">
<file name="image01.jpg" />
<file name="image02.jpg" />
<directory name="moreimages">
<file name="imageInSubdir01.jpg"/>
</directory>
</directory>
Is there anyway at all to do this for offine use? I have been trying to find out for a while now but i still can't find something to help.
If anyone knows ANYWAY of doing it PLEASE OH PLEASE let me know. I'm almost going insane trying to find out how to do it.
Read Directory Contents Using PHP
I'm trying to use the following to read the contents of the directory pics, but the only return I get in flash is "cont = Array"
anyone know what I'm doing wrong, what I want is to return a list of the files contained within a directory as a variable.
PHP Code:
<?
/*
Function directory($directory,$filters)
reads the content of $directory, takes the files that apply to $filter
and returns an array of the filenames.
You can specify which files to read, for example
$files = directory(".","jpg,gif");
gets all jpg and gif files in this directory.
$files = directory(".","all");
gets all files.
*/
function directory($dir,$filters){
$handle=opendir("./pics");
$files=array();
if ($filters == "all"){while(($file = readdir($handle))!==false){$files[] = $file;}}
if ($filters != "all"){
$filters=explode(",",$filters);
while (($file = readdir($handle))!==false) {
for ($f=0;$f<sizeof($filters);$f++):
$system=explode(".",$file);
if ($system[1] == $filters[$f]){$files[] = $file;}
endfor;
}
}
closedir($handle);
return $files;
}
$images=directory(".","jpg,swf");
print "&cont=$images";
?>
How To Read The Content Of A Directory?
Hi,
I´m trying to make an image album and i´d like to not worry about file names and the like.
I know i can name the files with numbers, for example, and use a buckle to read them one by one, but i don´t want to.
I´d like to know if it´s possible to read the content of a directory with AS.
Hope you gurus can help out.
Thanks in advance.
Read Folder Or Directory Without PHP Or ASP?
I want to make a game that requires the users to be able to put images and mp3s into the folder structure and then choose those images or mp3s from within the application...
After a half day gone with JSFL and other tries...I have concluded that you cannot read a local computer hard drive directory and print a list to flash without using php or asp or some other language...
Does anyone know of a way to something as simple as having flash read a directory of files and echoing that information to a variable or a text box or a list box....
if I could just trace the information out, that would get me going....then XML and home....
But it would seem I am finally going to find something that flash cannot do.
Can Flash Counft # Files In A Directory
hey gurus. I have a directory on the server with only .JPEG's in it. can I point some actionscript at it and count the # of files in it. is this possible?
thanks a lot!
--Dave
Get List Of Files In Directory With Flash?
Is it possible to use flash to look into a directory and give you a list of the files in the directory?
I'm making a gallery and this would be ideal, but I don't know if it's possible. Right now I'm just either storing the files names in an array, or using a naming convention with numbers after it. However, the first method requires updating a file list, and the second method requires knowing how many files are in the directory.
If anyone can tell me if this is possible or not I would really appreciate it. Thanks.
Can Flash Search A Directory For New Files?
I need to know how to access relative files in a directory so I can place them (or the file names) in a list within my flash application. My goal is to allow the user to download new XML files to a directory and have flash search the directory for new files. Flash would then display the files in a list and allow the user to "upload" them to the flash application (i.e. load the XML file that is selected). I'd appreciate any advice, especially if you can think of a better way to do it.
Flash Lists Automatically All Files From A Directory?
I have 100 self-made computer summarizings which i'd like the URL's in a .swf file for pcxperting.com.
How can i script so, that at onRelease on 'ComputerSummarizing1_btn' it automatically lists all files in the directory: ComputerSummarizings1 ?
I heard that Flash can't see the file names automatically (without having to write each file name that are in that directory, in Flash itself). Does someone has the PHP file or similar method or another alternative?
questoin 2:
at lycos.com you get free web space and if you delete the index.html file, you get the file list instead of the index.html as visitor. But at my paid web hosting i don't get this file list, instead i get error http://www.fzvastgoed.nl/pcxpert/text/
error 403 Forbidden
Yes, the directory and all subfolder/ sub files have chmod rights: 777 (full rights)
How To Read A Directory Listing From The Hard Drive
I'm trying to write a program that, when given a directory on the local HD, reads all the names of the files in that directory (so I can output them into an XML file). Can someone tell me the function calls and commands in AS needed to do this? Can't find it in my beginners AS guide...
Counting Files In A Directory And Passing The Count Back To Flash
Hi there,
Im trying to create a fully automated photo gallery - where my client only needs to upload image (jpg) to a ftp server and Flash / php takes care of the rest.
I´ve found a almost completely automated gallery that only needs to be told how many files it should read from a given directory. How do I make Flash and php read the number of files in a directory and pass that variable back to flash?
The gallery i want to use is located here: http://www.flashkit.com/movies/Scrip...7797/index.php
ANY help will be greatly accepted...
.vinterstille
Counting Files In A Directory And Passing The Count Back To Flash
Hi there,
Im trying to create a fully automated photo gallery - where my client only needs to upload image (jpg) to a ftp server and Flash / php takes care of the rest.
I´ve found a almost completely automated gallery that only needs to be told how many files it should read from a given directory. How do I make Flash and php read the number of files in a directory and pass that variable back to flash?
The gallery i want to use is located here: http://www.flashkit.com/movies/Scrip...7797/index.php
ANY help will be greatly accepted...
.vinterstille
Read Folder Directory Via PHP, And Make Clickable Links To Each File
I'd like Flash to read a directory via PHP. (That part i have done). But I want each file name in that directory to be displayed in flash, and each of those file name need to be clickable so the user can then navigate to that file in the browser.
Any ideas?
Thanks!
Scott
Read From .ini Files With Flash?
Hi, in the application I am working on my Flash movie has to read data from an .ini file.
I have always used XML in order to store data and have no experience reading from a regular text file.
I am trying to use LoadVars() in order to read the file.my problem is that LoadVars() seems to be very limited in handaling large text files. I've tried to load data from a file and then trace it like this:
PHP Code:
var loadVar = new LoadVars();
loadVar.onLoad = function(){
trace("this:"+this)
};
loadVar.load("data.ini");
but the output is:
D1025%2C1026%2C1028%2C1032%2C1040%2C1056%2C1088%2C 1152%2C1280%2C%0D%0A%0D%0A%0D%0A%23Format%3D8%0D%0 AFormat%3D24%0D%0AMode%3DOnetime%0D%0A%23Mode%3DBa ckground%0D%0ADelay%3D200%0D%0ACalibrationCycles%3 D7%0D%0ASaveAlsoInRoot%3Dfalse%0D%0A%0D%0A%5Bcamer a%5Fdef%5D%0D%0ALEFT%5FBACK%5FCAMERA%3D3%0D%0ARIGH T%5FBACK%5FCAMERA%3D1%0D%0ALEFT%5FFORWARD%5FCAMERA %3D2%0D%0ARIGHT%5FFORWARD%5FCAMERA%3D0%0D%0A%0D%0A %0D%0A%0D%0A%5Bmodem%5D%0D%0AComPort%3D3%0D%0A%0D% 0A%5Bcamera%5Fsettings%5D%0D%0ABrightness%3D140%0D %0ASaturation%3D200%0D%0AExposure%3D235%0D%0AGain% 3D140%0D%0AWhiteLevel%3D200%0D%0A%0D%0A%5Bcamera%5 Fauto%5D%0D%0AThresholdFor255%3D500%0D%0AThreshold ForSunny%3D5000%0D%0ARed%5FLevel%3D60%0D%0ARThresh oldCount%3D3%0D%0ARThreshold1%3D200%0D%0ARThreshol d2%3D10%0D%0ARThreshold3%3D0%0D%0AGainForThreshold 1%3D140%0D%0AGainForThreshold2%3D235%0D%0AGainForT hreshold3%3D240%0D%0A%0D%0AGainForBlack%3D255%0D%0 AGainForWhite%3D60%0D%0AGainForSunny%3D60%0D%0AExp osureForBlack%3D255%0D%0AExposureForWhite%3D235%0D %0AExposureForSunny%3D235%0D%0A%23ExposureForSunny %3D190%0D%0A&onLoad=%5Btype%20Function%5D
I will need to read each line in the text file separately and retrieve the data. thought about using String.split() and try to loose the unwanted text but I think it would be too messy.
is this possible with Flash or maybe I should be looking for a JavaScript based solution?
any ideas?
Thanks in advance
LeoBeer
Is It Possible To Read A Text File And Draw Animation Dynamically In Flash
Hi,
I want to draw lines and animations similar to (Flow Charts) dynamically based on the information provided in a text/XML file.
The file has information about:
1) Shape of the simple animation like rectangle and image to be drawn
2) Relative position of the animation that has to been shown
Wondering whether this is possible with Flash 5.
I would appreciate if any one can post a sample file explaining the above mentioned scenario.
Thanks,
-Raj
How Can I Read Data From .dat Files In Flash ?
Hello
Actually I want to know that how can we write variables from flash in *.dat files from input feilds and then again retreive data in dynamic text feilds on demand ....The best example of which I am trying to do is phone book like we enter data in seperate feilds and then again get it back on demand even after turning of the computer ?
How To Read Querystrings In Flash Files
I made a movie clip with a few links in it and a text box. I want to change the contents of the box based on variables from the querystring. Can anybody guide me how to do this?
Gettin Flash To Read From .txt Files Help.
HI,
Im having terrible difficulty trying to get my flash to read text from a .txt file.
Could some one please send me just a simple .fla file linked to a .txt?
Either email aidanmack@another.com
or attach it to a post.
thank you very much
How To Encrypt Files And Read Them In Flash
Hi guys!
Im doing an app for some clients and it uses many folders to push content to flash.
The app is in Flash.exe.
Question 1: Can i encrypt in some way the folders so that the user cant go and explore all the stuff inside it?
Question 2: Can i, in some way, get all the folders inside a big one so that the user cant acess all the data ?
Question 3: Is there any way to make the folder password protected and have flash to open it?
Thanks!
Read Text Files Into Flash
Is it possible to load text files into flash using a component? Making it easier to edit the text files rather than having to edit the fla.
I have been trying this with the ScrollPane and Loader componenst which is what I am looking for but this only allows you to load swf or jpg. Is there any component etc for me to load basic HTML or text into a scrollpane?
Thanks in advance for any help,
jonny
Can Flash Read The Files Names In A Folder?
I know variations of this have been covered, but all involve a naming convention for your images...
Is there a way that we can direct flash (or XML, php, etc) to see all the items in a folder and grab their file names?
Basically, I'm creating a portfolio gallery that will have different folders on the server, and random images in the folder. If there are 4 items iin the folder, I need flash to create 4 buttons, then when each button is pressed, in a new iFrame, load that .jpg.
Any ideas?
Can Flash Read/edit Local Files
Hi,
I want to know if Flash has the capabilities/permission to write on local file.
What I wish to do is:
- Write to a .doc file OR
- Editing ID3 Tag of music files
Thank,
turb
Get Filenames Dynamically In A Directory
Is there a way to get filenames dynamically in a directory but not to hardcode the filenames in the code?
The scenario is I want to display all the images files of a particular directory in my placeholder.
Thanks for help.
Flash Standalone To Read/write Text Files?
Hi: I have a flash form that I want my customers to install or use from a cd. I need them to be able to type in their personal information and for this to become permanent and read by the flash form every time it loads. I also need to save the input of this invoice each time it is printed on the local client computer. No web connectivity is present. Can I use flash as an interface to do this? What scripting language can I use to communicate with flash...read and write text files, and enable flash to display the results of a query to this text database (which would populate the records of an old invoice)? I tried this first using an access standalone app which crashed 40 % of the systems. I would like to use flash as the interface, but I am not sure how to do this without using html. Again, this needs to be a standalone distributable application. Any suggestions of samples of similar text file database manipulation with flash?
Create/Read/Write Text Files In Flash
Hi to my Haiku Masters,
Guys i would like to know if is it possible to CREATE .txt files into a predefined directory from inside flash instead of creating them outside flash and then do the READ/WRITE operations
Raj
Getting Flash Video Players To Automatically Read Files?
Hello.
I'm working on a project where video files will be uploaded to webspace and then a Flash player needs to automatically notice the file is there and play it.
I was looking at this Flash video player for the front end...
http://flowplayer.org/
How would I get something like this to automatically detect new files on a server and play them? Is there a special Flash video player to do this? Being able to stream the files would be great...
Any info/tips/experience would be greatly appriciated.
Can Flash Read HTML Files To Extract Information?
Hi,
I'm trying to create a special kind of crawler that reads the HTML pages on a website to extract certain kinds of information, such as headings and copyright information. This information could be generated by a database, so would be contained on the same place on multiple HTML pages, or might be different depending on the webpage. The information that is to be extracted will need to be sent to a database on a central server, along with other information, which will form the basis of a special kind of search engine.
The pages that will be read by the spider could be from anyone, and the person that sets up the spider could be using any OS, so the spider needs to be cross-platform. I am guessing that having a Flash movie is going to be the easiest way to make everything user-friendly, and cross-platform. The user would setup the crawler within a special Flash browser, which would record all the relevant information needed to crawl the pages with the user settings. However I'm not certain that Flash is going to be capable to do everything that I'm looking for.
The things that I need to know are:
1) Is Flash capable of reading HTML files, to extract some information from them?
2) Is Flash capable of saving information internally (as strings, variables etc), so that it can be used or exported later?
3) Could it be set up to highlight certain parts of HTML code, such as a table, or a paragraph, so that users would find it easier to know which parts of the HTML they were extracting?
4) Can Flash run iterative processes, so that once one page has been set up, pages with a similar structure can be extracted automatically?
5) If Flash can do 4, is it possible to select a percentage of similarity, so that pages with similar, but not identical structure, could be dealt with automatically?
6) If Flash couldn't be automated to scan multiple pages that have the same layout, then how easy would it be to export some variables to a spider written in a conventional computer language, which would then do the searching?
I know of a plugin for Internet Explorer called WebTweezers that is a good example of highlighting HTML for a user to extract, but it can only deal with pages individually. Another program called Visual Web Task has a more comprehensive selection of search facilities, but is not very user-friendly, costs a lot, and is platform-specific. I need something that is easy to set up for any user, can run the same search on multiple pages, and can be read on any platform.
Any comments, or answers will be most gratefully received.
Problem With Multiple, Dynamically Drawn Buttons [renamed]
I had to create dynamic with AS some rectangulars on stage using moveTO and lineTo.I had a button and when I press it should add a new rectangle on stage but it doesn't.Because the array that I am storing the mcClip created are overriding I guess
var i:Number =0;
button_name.onRelease = function()
{
i++;
var instancename:String ="new_mc"+i;
var mcClip:MovieClip=createEmptyMovieClipinstancename,this.getNextHighestDepth); createRectangle(mcClip);
array.push(mcClip);
}
After adding some rectangles the array look lile this
,,_level0.new_mc2 ...but the first and the second movieClip dissapers and on stage it's the last one created.
How do I solve this problem?
This is the createRectangle function if you are interested :
function createRectangle(mcClip:MovieClip)
{
mcClip.beginFill(0xFFFFF,100);
mcClip.lineStyle(1,0xFFFFF, 100);
mcClip.moveTo(parseInt(ssx.text),parseInt(ssy.text));
mcClip.lineTo(parseInt(djx.text),parseInt(ssy.text));
mcClip.lineTo(parseInt(djx.text),parseInt(djy.text));
mcClip.lineTo(parseInt(ssx.text),parseInt(djy.text));
mcClip.lineTo(parseInt(ssx.text),parseInt(ssy.text));
mcClip.endFill();}
Problem With Multiple, Dynamically Drawn Buttons [renamed]
I had to create dynamic with AS some rectangulars on stage using moveTO and lineTo.I had a button and when I press it should add a new rectangle on stage but it doesn't.Because the array that I am storing the mcClip created are overriding I guess
var i:Number =0;
button_name.onRelease = function()
{
i++;
var instancename:String ="new_mc"+i;
var mcClip:MovieClip=createEmptyMovieClipinstancename,this.getNextHighestDepth); createRectangle(mcClip);
array.push(mcClip);
}
After adding some rectangles the array look lile this
,,_level0.new_mc2 ...but the first and the second movieClip dissapers and on stage it's the last one created.
How do I solve this problem?
This is the createRectangle function if you are interested :
function createRectangle(mcClip:MovieClip)
{
mcClip.beginFill(0xFFFFF,100);
mcClip.lineStyle(1,0xFFFFF, 100);
mcClip.moveTo(parseInt(ssx.text),parseInt(ssy.text));
mcClip.lineTo(parseInt(djx.text),parseInt(ssy.text));
mcClip.lineTo(parseInt(djx.text),parseInt(djy.text));
mcClip.lineTo(parseInt(ssx.text),parseInt(djy.text));
mcClip.lineTo(parseInt(ssx.text),parseInt(ssy.text));
mcClip.endFill();}
Dynamically Adding Spaced Out Movie Clips From The Library [renamed]
I would like to do something i've never tried before so i am seeing if anyone has any ideas on how to do it.
What I would like to do is to create duplicate movieclips based on the number of jpegs I have in my libary for a picture gallary I am creating. (I have like 600 of them so I dont want to load them manually). For example I have jpegs 001 thru 012. I would like to have these jpeg files in my flash libary and then have them load up into the movieclips automaticly 001 thru 012. Each of these movie clips will need to load up spaced out horizonally beside each other. and in turn each movieclip will also be a button to load up the picture into a larger view area. I just dont want to have to insert all of the mini jpeg pictures so I would like to have them load in automaticly thru coding upon start of the flash exe.
I am guessing I will need to use duplicate movie clip with a counter and load the jpeg in sequence from the libary. But I am just not sure on the code to do this.
Thanks for any help
Dynamically Changing Color Based On External(?) Info [renamed]
Hi all,
I read through the random colour tutorial with interest, and wondered to myself if an objects colour could be altered in other ways... such as by a weather feed or stocks feed.
I thought it would be interesting if the design of a site could be changed regularly by outside influences.
Is this possible?
Umm.. do I need to get out more?
Any information would be greatly appreciated!
Dynamically Changing Color Based On External(?) Info [renamed]
Hi all,
I read through the random colour tutorial with interest, and wondered to myself if an objects colour could be altered in other ways... such as by a weather feed or stocks feed.
I thought it would be interesting if the design of a site could be changed regularly by outside influences.
Is this possible?
Umm.. do I need to get out more?
Any information would be greatly appreciated!
Getting .jpg Files From Directory
is there anyway to check all the .jpg files in a directory, and then load them up to flash without writing the .jpg file names in a text file?
Files In A Directory.
is there any way i can check how many files in a directory, the names of the files in a directory? say i want to make a photo album for example...
any help or knowledge please...
Getting All Files In A Directory
I've got an swf sitting on my website. then on mywebsite/files i've got something like 4 .xml files. Right now I've manually put in the directory names, but I won't be able to do that for long, because new .xml files are coming in dynamically.
So my question is: how do I look in another directory and gather all of the .xml files into an array in my swf?
The help, as always, is very much appreciated!
-Matthew
|