ActionScript 3.0 :: Read Name Of Files In Folder?
Oct 23, 2009
I'm just beginning to learn actionscript (I'm using Flash CS4).There's this little project I'm working on as part of my learning activities.I have a folder with 12 jpgs and I want to randomly load 6 of them into 6 mc's that I already have in my stage. I say randomly because I would like to have different images everytime I play my little movie. I know that if the jpgs names where somewhat serialized (i.e. "pic1.jpg", "pic2.jpg", etc.) I could easily do it by creating a variable to contain the numeric part of the name and concatenate it with the rest of the name (or something like that).
The name of my jpgs are pure strings (like "basketball", "soccer", etc.).Can I (via actionscript) read those names and push them into an array even though the names are pure alphabetical strings?If this is possible, I think I can figure out the randomizing after pushing the names into the array.
View 4 Replies
Similar Posts:
Jul 29, 2010
i have situation in which i have some library projects, say
"DataProcessors","Lib2"
, included in my lets say "MainProject" (a web project) placed on directory
"E:in-debugMainProject.swf"
, when i build the project it automatically place all the libs .swf in its "E:in-debug" folder, but when i debug or run the project it it gives loading error that
"E:DataProcessors.swf"
not found but i have those lib files on
"E:in-debugDataProcessors.swf"..
what could be the possible errors.
View 1 Replies
Sep 22, 2009
I'd like to load the images in the folder dynamically without using XML.
Is there a mechanism in AS3 that enables me to read directly the content of images folder directly without using XML or should I use php to do that?
View 1 Replies
Jul 7, 2010
I would like to display all images from a folder in a slideshow without having to specify every file name specifically using CS4 - AS3.
View 2 Replies
Dec 31, 2009
Is it possible to read a folder content using AS3 and Projector?I have a CD with a folder with many PDF files. In my Flash/Projector I create a button for each file which, when clicked, let the user download the file.Right now I'm using an XML file with the folder information, but I would like to be able to read the folder contents, so I dont have to update the XML file each time I add or remove a file from the folder
View 4 Replies
Feb 19, 2006
I did a search and they basically all said use asp/php to read the images from a folder.Unfortunately I don't know php and I am really rusty on asp.get a bit of php code to do this, and tell me how to get the data into flash afterwords?
View 10 Replies
Jun 3, 2008
where i can find a panandzoom class?I like to read a folder containing images with a pan and zoom effect.
View 1 Replies
May 21, 2010
I'm using flash 8 and slideshowzilla to make a 3d /2d gallery site. Ok, here's what I have so far. I have one folder named 3d and another named 2d. Each folder has all the files that slideshowzilla makes to play the gallery. (see image) In flash 8 I have the 2dimages.swf and 3dimages.swf set in loaders and it all works fine but i get a "Error opening URL 'file:///C|/slides.xml' and the gallery won't play because the slides.xml file that it's looking for is in each folder. how do I get flash to read the slides.xml file thats in each folder?
View 1 Replies
Sep 29, 2006
I'm making a desktop application and I need to get all of the file from in certain folder. Is this possible in AS? IE, I need to get the name of and import every file in the folder C://documents and settings/my pics.
View 1 Replies
Dec 29, 2010
What I want to do is to extract a zip file to a specific folder.I am using the code below that promts the user to choose which directory the zip should be extracted to and the extracts it succesfully.Now I would like define a fixed folder where the files should be axtracted to instead of letting the user decide.
Actionscript Code:
function extractZIP():void { output.text = "extractZIP MANUAL"; zipOutput.browseForDirectory("Select Directory for extract");
[code].......
View 1 Replies
Dec 2, 2009
what I need to do is get a list of files in a folder in a Flex application from the web (i.e. all the files in a location like [URL]
View 2 Replies
May 19, 2010
I would like to build an image gallery in Flash with AS2 or AS3 that detects automatically the number of images available in a specific folder (say a level below the swf file).The goal is to don't have to config any xml files with the images to show.
View 1 Replies
Jun 29, 2010
I'm trying to get the name of every files from a specific folder into an array, but I get this error and I can't find why...
TypeError: Error #1009: Cannot access a property or method of a null object reference.
Here's my code:
import flash.filesystem.File;
function getFileList(directory:String):Array {
var folder:File = new File(directory);
var files:Array = folder.getDirectoryListing();
var fileList:Array;
[Code] .....
View 2 Replies
Aug 10, 2010
I want to get a list images inside a folder but in order to do that, I need to get the names all the files inside a folder first. What flash class should I look into to allow me to do this?
EDIT:how about doing this using php? what should I return/echo on my php file?
View 3 Replies
May 9, 2011
I'm working on an application where client may upload any folder which may contain sub folders along with files. Is it possible to upload a folder instead of a file?
View 1 Replies
May 31, 2011
I want to embed all xml files of a given folder. For now I'm doing something like this:
[Embed(source="../somefolder/file1.xml", mimeType="application/octet-stream")]
private var MyClass1:Class;
[Embed(source="../somefolder/file2.xml", mimeType="application/octet-stream")]
private var MyClass2:Class;
[Code]....
The list of XML files will grow to 10+ files, so I'm looking for a more elegant and dynamic way to embed those files.
The files should be embedded on compilation, to load them via URLLoader is not an option.
View 2 Replies
Jul 8, 2011
How can i get all the files in a given folder in flex project. the folder is within the project itself, under src folder, like.[code]I want to get the names of all jpg file in an array.. how it can be done programmaticly?
View 2 Replies
Mar 13, 2012
Our application is a ASP.NET + Flex running on IIS 6.0 server. On the client machines we run IE8 for display. IE creates temp files that seems to be taking up disk space. The Temporary Internet Folder size continues to grow seems to exceed the limit of 8MB - automatic recycle. When and under what conditions does IE delete files from the temporary folders?
View 1 Replies
Jul 9, 2005
Is it possible, either with AS1.0 or as2.0 to save a text file and create folders from flash in a specified directory?I know how to use sharedObject, but I was wondering if there was any way to save files to other locations or even create a folder to save them into.
View 2 Replies
Aug 21, 2006
I have this script (below) that picks out the files from a folder and loads them into the swf without saying specifically what the filenames are. At the moment they load in 1 at a time, how can I make it so they all load at once in a horizontal row with a whote gap between each of them?The whole point of this is so the user can just upload files to a folder and not have to touch any script etc.The plan is to put them into an infinate menu (that part is ready, its just the first bit thats causing me problems).
Code:
delay = 3000;
//-----------------------
function loadPHP(loaded) {
if (loaded) {
imageArr = new Array();
[code].....
View 3 Replies
Jan 6, 2009
how can i use actionscript 2 to find out how many swf files are located in a certain folder of my website?
View 2 Replies
Apr 8, 2010
Here is my code:
var vi3585 = 0;
var loader:URLLoader = new URLLoader();
//telling the loader that we are dealing with variables here.
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
//This is an eventlistener
loader.addEventListener(Event.COMPLETE, loading);
[Code] .....
I have dynamic number of files inside a folder. Every file has 2 variables in it vt11 and vt11s. I need a script that checks if the variables in the files have certain values and if it has this value than it counts this file. Basically what this script does is that it counts how many files in the folder have the same 2 variables in it and than displays this number in the text box. The above script always shows 1, no mater how many files with the same 2 variables are in folder.
View 1 Replies
Apr 18, 2010
How do I specify files to be accessed only in a specific folder via a crossdomain?
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "[URL]">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="[URL]"/>
<allow-access-from domain="*.newdomain.com" secure="true" />
</cross-domain-policy>
View 3 Replies
Oct 24, 2011
I have a flash player which play mp3 files from xml. at now mp3 files are downloadable with software like internet download manager. if i move mp3 files to out of www and change xml location attribute to '../mp3filename.mp3' player can not play mp3. my question are
1) flash file can access files out of root folder
2) what is best way to protect files from download?
View 2 Replies
Nov 6, 2009
I've got this Flash project where there are a number of different photo galleries that hold images. Now, I want Flash to be able to see how many pictures are available within a folder so it can create the right number of thumbnails.
At this time, you might think... well there are numerous topics about this issue and PHP is the answer. But I perhaps have a workaround and I was wondering whether it is an 'acceptable' one or if it poses to many problems.
How about I let flash create an 'experimental' loader that loads images rapidly, theoretically till infinity. This loader starts with 1.jpg, followed by 2.jpg, 3.jpg, etc... (also the names of the images inside the folder obviously). There is also an eventlistener added to the contentLoaderInfo stating:
ActionScript Code:
experimentalLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, checkFileEnd);
As soon as Flash is trying to open the file, let's say, 51.jpg and this file does not exist, the Event described above fires. This event will then tell Flash to stop counting since it apparently reached the end. The experimental loader will then be removed and the normal thumbnail loaders will be created up till 50.jpg.
View 0 Replies
Dec 15, 2009
I'm building an swf that's suppose to work locally (offline).That swf is like a menu for some other swf that the user will download and will be prompted to put them in the same folder of the main swf.What I want to do is the main swf to be able to recognise which swf the user have downloaded in order to show them 'available' on main menu.Is there a way to check the folder destination for swf files or something?
View 4 Replies
Jun 1, 2009
I recently got the following code from one of your tutorials and am wondering why it is that when I try to change the .jpg images to .png images, the images no longer appear in the swf file. Does flash no allow .png files to be loaded.The reason that I need the files to be png is because the have to have a transparent backgroung.[code].....
View 9 Replies
Jul 31, 2009
I'm working on an image gallery in Flash that plays a slideshow of different images I have on my hard drive. I've got the basics of it working, but I'm still stuck on something. If my images are in the same folder as the Flash project file or a sub-folder of it, then it works fine. However, I can't figure out how to load images from some other folder. In my case, the Flash project is located at "~/Programming/Flash/Projects/slideshow/" and the images I want to load are at "~/Pictures/Gallery/". Using a normal path didn't work so I figured I could access them with a file:// path, but that doesn't work either gives me "Error #2035: URL Not Found"). Is there a specific way you have to format the file path in Flash, or is it just not possible?
View 3 Replies
May 31, 2009
I am having problems with building my webpage with Flash. I have imported the the swf files I want in my library but when I try to put them into folders my computer seems to seize up and takes a few minutes to do the job and can be very slow and I am unable to anything on PC while it is doing this. I have not incounted this problem before on my PC but I have had it for over 5 years now and I am due to buy a new PC in spring next year when Windows 7 is released on all new PCs. I am using windows XP with all the updates available plus upgraded to 1GB memory last year. Is my PC to old to work with FLASH CS3 or is it another problem entirely?
View 3 Replies
Mar 20, 2010
When I compiled the following code I had some problem.[code]...
View 12 Replies