Loading Images From A Folder
I want to have a folder with images labeled 1 through 10 lets say. I want to be able to load the first image and then when someone clicks on the next image button the next image would be loaded. This way I can change the images in the folder and never have to change the flash file.
How can I... -->have one day 10 images in this folder and the next day 20? -->use the same movie click that when someone clicks on the next button the current picture would change alpha to zero and the next picture would alpha from zero to 100.
Thanks in advance.
Flash Ghost
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-03-2002, 12:59 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Loading Images From A Folder
am using Flash MX ....
creating a slide show & want a script 2 load images dynamically from a folder .... with next & previous button 2 cahnge those images ...
can any1 provide me the script ?
Loading Images From A Folder
Hi Guys,
I'm putting together a photo type flipper, similar to the image file browser in the new Mac operating system. I haven't decided whether to have the images load via XML or directly code the image names into the actionscript using loadMovie.
What I"m wondering is whether the loading the images via XML will slow the animation down compared to directly coding the image names into the AS.
Note: This will be run locally (not on the web).
Thank, Wayne
Loading Images From Folder
Hello everyone. After some fantastic help from bloodstyle I'm happily making and using arrays. Here is a clipping of code from one such file.
However, the next phase is to load a series of images in a folder into the array instead of replicating a movieClip 70 times. Could anyone point me in the right direction?
Regards, A.
ActionScript Code:
import caurina.transitions.*;
import flash.display.*;
import flash.events.*;
var topArray:Array = new Array();
var botArray:Array = new Array();
for(var j:int=0;j<35;j++) {
var mcTop:topButton = new topButton;
mcTop.x = j*mcTop.width / 2.8 + 75;
mcTop.y = 450;
mcTop.scaleX = 0.3;
mcTop.scaleY = 0.3;
mcTop.addEventListener(MouseEvent.MOUSE_OVER, topReveal);
mcTop.addEventListener(MouseEvent.MOUSE_OUT, topHide);
addChild(mcTop);
// if you want them in an array just push them in
topArray.push(mcTop);
}
function topReveal (event:MouseEvent):void {
Tweener.addTween (event.currentTarget, {y:450, scaleX:1, scaleY:1, time:0.2, transition:"easeInOutQuad"});
}
function topHide (event:MouseEvent):void {
Tweener.addTween (event.currentTarget, {y:450, scaleX:0.3, scaleY:0.3, time:1, transition:"easeInOutQuad"});
}
Loading Images From Folder
Hello, I have this script(below) that loads my thumbs into a container and It works no problem. But each image has to be made into a movieclip and stored in the library. I've tried to figure out how to load the thumbs from a folder in the same folder as my fla but failed every time. Does anyone have suggestions?
ActionScript Code:
this.createEmptyMovieClip("container", 1);
var imagesNumber:Number = 9;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
myThumb_mc = container["thumb"+i+"_mc"];
myThumb_mc._x = (i-1)*myThumb_mc._width;
myThumb_mc._y = (Stage.height-myThumb_mc._height)/2
Loading Images From Folder, XML
Instead of plugging the paths to each individual jpg or gif into the XML.
How would I get flash to load every jpg within a folder without considering the technical stuff.
Loading Images From A Folder
Hi!
I have a little flash navigation thing that scrolls left to right which shows buttons. On the over state of the buttons is plays a movie etc..
seen at http://www.portraitartstudio.co.uk/gallery.php?g=4
I would like to have a folder fill of gray thumbs and colour thumbs and have a script in flash load them all from the folder so i can add more as and when i like.
The buttons need to be links and need send a variable called $g.
The gray images are all in a gray folder and colour are all in a colour folder. The names of the images are all 1, 2, 3, 4 etc... and $g needs to be the number in the file name.
Can this be done?
Thanks
Loading Images Dynamically From Folder
Hi guys,
I need to know how to load images into a Flash MX file dynamically. The images are in a folder and they are updated with new images periodically...
Can anyone please help me out ?
Thanks and Regards
Sudhindra
Dynamic Loading Of All Images In A Folder
------Flash MX 2004 Pro------
Is there a simple(?) way to auto- and dynamicaly load all images in a specific folder with, for example, your holliday images. My images names are auto generated by my digital camera and looks like this:
IMG_0134.JPG
IMG_0135.JPG
IMG_0142.JPG
IMG_0144.JPG
The best thing would be if some code could load all images in a folder irrespective of the file names (my_image_1a.jpg, myCat.jpg, IMG_0134.jpg, IMG_04.jpg etc.)
Please help me. I don't want to manualy write a long list, xml or similar
Thanx
Loading Random Images From A Folder
Hi All,
I have a little Flash header and each time it loads I want it to load one of six images randomly, onto the stage as a background... The images will be sitting in a folder in the same directory as the Flash file so they can easily be updated, anyone ever done this? Some opinions would be much appreciated!
Loading Random Images From A Folder
Hi All,
I have a little Flash header and each time it loads I want it to load one of six images randomly, onto the stage as a background... The images will be sitting in a folder in the same directory as the Flash file so they can easily be updated, anyone ever done this? Some opinions would be much appreciated!
Loading Random Images From A Folder
Hi All,
I have a little Flash header and each time it loads I want it to load one of six images randomly, onto the stage as a background... The images will be sitting in a folder in the same directory as the Flash file so they can easily be updated, anyone ever done this? Some opinions would be much appreciated!
Loading Random Images From A Folder
Hi All,
I have a little Flash header and each time it loads I want it to load one of six images randomly, onto the stage as a background... The images will be sitting in a folder in the same directory as the Flash file so they can easily be updated, anyone ever done this? Some opinions would be much appreciated!
Scroll Images, Loading From Folder.Little Trouble
I want to scroll images, loading from folder, but in my code some mistake.
Where?
This is my code:
speed = 80
imgcount = 4
function moveimg()
{
for (i = 1; i <= imgcount; i++)
{
mc_name = "img" + i;
_root[mc_name]._x--
if(_root[mc_name]._x <= (_root[mc_name]._width *-1))
{
_root[mc_name]._x += xpos
}
}
}
xpos = 0;
for (i = 1; i <= imgcount; i++)
{
mc_name = "img" + i;
var myBitmapData = i + ".jpg";
createEmptyMovieClip(mc_name, getNextHighestDepth());
loadMovie(i + ".jpg", mc_name);
mc_name._x = xpos;
xpos = xpos + myBitmapData.width+10;
}
intervalId = setInterval(moveimg, (100 - speed));
Loading Images With Unspecified Names From Folder
Hello!
I'm struggling with this problem for too long, heh.
I've got folders with images (max 10) and a flash file that should load those images as a thumbnails. Those files don't have specified names, so the flash file has to check all the files in the folder, count them, create specific amount of movieClips next to each other and load those images into. name of the folder is beeing passed as a variable from the previous site, so the animation knows where to look for, I just don't know how to use the images inside
any ideas?
Page 2 - Loading Random Images From A Folder
I'll have to keep recommending Kirupas site since I don't actually read any tutorial sites.
When I wanted to learn about all the new things in Flash 8 I just opened the ActionScript panel up, listed everything on the left hand panel, I think the option was called "Index" at the bottom of the list. Then I just scrolled the list, selected things I didn't recognise and then pressed the help button on the right hand side of the ActionScript panel. This opened the local help page to the relevant section. That way I got through all the new code in a few hours. There's ton's more info in the help pages such as techniques and concepts. Alot of them are referenced from the help pages in other areas.
Page 3 - Loading Random Images From A Folder
Hi, you have to make it not apply the xSlideTo to the clicked button, that can be done like this:
Code:
if(this != targets[count].targ)
{
targets[count].targ.xSlideTo(targets[count].x, 1, "easeInBack", targets[count].delay);
}
Loading Images From An External Folder/Preloaders And Testing Help
Hi,
Just a quick question, haven't looked at Flash for a few years now and am trying to finish off a website for my business that I started but never finished.
I have always had the problem with loading in external images dynamically and getting them to work with a preloader. Now I think my problem is that I never upload the swf to the internet to test and from what I know to test dynamic anything in Flash it must be uploaded to the net?
Now my question is this, as I haven't had anything to do with Flash and its progession for quite some time, has this changed, ie. do I still have to upload my files onto the net to test, or does the new Flash 8.0 let you test it without having to put it on the net (if so I will get Flash 8.0)...
... or is there any software that will test my Flash file without having to put it up on the net everytime.
I am loading images in dynamically into an external SWF, I am using a preloader and a mask for each image.
Also if I do have to load it up onto the net each time I make a change, what is the best procedure. I have to delete my temp net files each time I do the test don't I?
Any advise would be appreciated.
WB
Flash Slideshow (loading Unspecifeid Amount Of Images From A Folder)
Hey all, im new to this community and im just starting to work with flash.
Im trying to make a flash slideshow that loads an unspecified amount of images from a folder. I allready found some nice tutorials about slideshows/photoalbums wich im following but they didnt contain information about this.
It would be helpfull if I get some suggestions, or if its even possible to archieve this .
Grtz
ps im using flash 8, hoped that I posted this on the correct place .
Loading Images From A Current Folder/subfolder And Display On Webpage
Hi,
Is is easy to use flash to read all images from the current fold/subfold and load them onto webpage? In addition, when mouse is over an image, it displays image full size on the right. Is flash best for this?
I'm new to this and I get confused with all frames and symbols. could someone please show me some samples or point me to some links that show this?
Thanks in advance for those who can help :)
Loading Movies From A Folder Located In Root Folder?
hello.
I want to organize my root folder on the server better. How would I write the code to load a movie that is located in a folder called slideshow, for example? Basically, how do I target that movie located in root/slideshow/...
I hope you understand.
Pulling Images From Folder/txt File, The Images Loop With Delay?
I would like to have a flash movie where images change from one to the next with maybe a 10second delay, and it will loop over n over.
I want flash to take images from a folder or a .txt file stating where the images are found so adding new photos or removing photos from this looped movie will be a breeze.
Any help would be greatly appreciated, thanks!
Load All Images From The Images In 1 Folder (named By Random Number)
Hi Guys,
I've got a gallery style viewer, you click on an image and it enlarges. It pulls in images which are numbered 1 to 12 in a folder called 'images'. I want it to pull in randomly numbered images instead. so i suppose i want it to search the folder for images named 1.jpg up to 1000000.jpg and pull them in.
I've uploaded it to: www.dhardy.co.uk/gallery.zip as it'll become clearer then!
Thanks in advance! dave.
Images Pulled From Folder/txt File, Images Loop With Delay?
I would like to have a flash movie where images change from one to the next with maybe a 10second delay, and it will loop over n over.
I want flash to take images from a folder or a .txt file stating where the images are found so adding new photos or removing photos from this looped movie will be a breeze.
Any help would be greatly appreciated, thanks!
Images Pulled From Folder/txt File, Images Loop With Delay?
I would like to have a flash movie where images change from one to the next with maybe a 10second delay, and it will loop over n over.
I want flash to take images from a folder or a .txt file stating where the images are found so adding new photos or removing photos from this looped movie will be a breeze.
Any help would be greatly appreciated, thanks!
Images From Folder
I'm wondering how I might pull images from a folder, and put a fade transition between them. HEard of a way where it pulls from the said image names from a text file, but since im amateur at actionscripting I have no clue how to start.
Images From A Folder?
I am wanting to put together a slideshow for my family from a disc. I basically want the slideshow to pull picture from a folder that is on a disc (projector).
So I would have a folder(full of images) along with a projector (both on the Cd-Rom)the projector would grab the images (pic,pic2,etc..) from the folder while running in the CD-om drive. I will have close to 100 family photos in this folder. I know there is code for this I just cannot find it!
I would really appreciate a link to the code or a link to the tutorial or a brief tutorial posted as a reply! Still scratching my head! I cannot get it figured out!
Thanks to all that helped me this year!
Images From Folder To
I want to have a script that should take images from folder which has not specific number of pics(I mean its upto user how many pictures he keeps in folder).I want to load them on stage and make them move from right to left.Like this animation.But I need all this with actionscript 2.0 and images should be loaded from folder.
Amination should be exact to this animation.Thanx
Display All Images Of A Folder
hi
i would like to code a AS baseed animation.
The script should read all .gif/.jpeg files of a Folder.
And display in in a kind of slideshow.
-has anyone everdone this ? please attach a .fla (thx)
-my big problem is: i don know how to read out a folder
thx
Is It Possible To Import A Folder Of Images......?
Hi, is it possible to create a flash animation (a kind of slideshow) and somehow import a chosen folder of images, out of a selection of over a hundred folders, depending on which images want to be viewed?
Sorry if that sounds a bit confusing but if anyone has the faintest idea what i'm talking about, i'd really appreciate your help?
Thanks,
Mic
Adding Images From Folder
Hi, i wrote some code that uses an array to get pictures from a folder and puts them in the flash movie:
var whichImage = 5;
var circle:Array = new Array();
loadmovies();
function loadmovies() {
for (i=1; i<whichImage; i++) {
circle[i] = attachMovie("emc", "imageLoader"+[i], i);
circle[i]._x =(i-1)*100 ;
circle[i]._y =500 ;
}
}
init();
function init() {
for (i=1; i<whichImage; i++) {
loadMovie("picture"+ [i] +".jpg", "imageLoader"+[i]);
trace(i);}
}
Now what i want to do is make these pictures clickable. I dont know how to do this, any help would be appreciated
Thanks
Affecting All Images In A Folder
I'm writing an AS3 file to affect all images that are loaded to a stage. I tested it by dynamically loading an image to the stage, and it works, but my question is how can I load a folder to the stage and have all those images affected by the AS file. Is that even possible with AS3?
Checking Folder For Images
hey, how yall doin'
i'm working on a a flash movie that loads images with loadMovie()
no i was wondering if i can check with for example a loop how many images there are in the folder.
something like
ActionScript Code:
number = 0;
while(loadMovie("blabla.jpg"[number]) =! NULL) {
loadMovie("blabla.jpg"[number])
number +=1;
}
ofcourse that won't work but its just to give you an idea of what i want.
thx!
Getting Number Of Images In A Folder
Hi all,
I am currently developping a site at work. It's essentially an online portfolio, with dynamically loading images.
I was wondering if it is possible to determine the number of image files within a specified folder, and have that value as a numerical variable.
Thanks
Load Images From Folder
I havent used flash in a couple years and i'm feeling a little lost (not that i knew what i was doing before!) I am however determined and can understand the code, i just am a little overwhelmed.
I'd like to tell a movie clip to look into a specific folder (via url or whatever) and load all images from that folder into the movie clip. I do not want to have to give the movie the exact address of each image, as they files may change / be added to over time.
i know in AS3 i have to use the loader class and then the addChild to put the loaded stuff into the movie (and thats all i know), but i just dont know how to get all available images blindly. any help? please and thank you
Counting Images In A Folder
i've made a small personal photo gallery in which different days(folders of images) a specified long the top where the user can click and see what is contained within that day(folder). It's completely dynamic to the extent that the only thing i have to specify is the number of images in each folder as a variable in a txt file (i txt file for each folder)
What i want to know is if it's possible to dynamically count the images in a folder and use that as a variable for the number of images contained within that folder...so i dont have to have a txt file for every day with the variable in it(like i do now)
I'm sure it's quite simple but i cant find solution anywhere.
Load Images From A Folder
Hi....
I would like to have a flash movie that loads image files from a folder. The idea is that the flash movie will stay the same but i can use a script to load images into the folder and then the flash will auto pick them up.
Could anyone help me out?
Thanks
Slideshow From Images Folder...
I wan't to be able to have flash start a slide show with what ever is in a giving folder so my clients can change the pictures at their will. It must be a stupid question but there are those moment where simple things just don't come out hihihi.
# Of Images In Folder To Load Dynamically
I'm loading images dynamically from a folder. Is there a way for the SWF to count the number of available images to load at run-time (so I don't have to specify before hand)?
Nick
Geting Number Of Images In Folder ?
How can I get the number of how many images .jpg are in folder where is my flash movie. I need it for a slideshow that can be easily updated.
Calling Images From A Folder Into A Movieclip
Hi,
can anyone point me in the right direction? I'd like to create a movie clip that displays (fades in and out, actuallly) images from a folder so that if I change the images in the folder, I change the images that get displayed.
any *ideas*?
cheers,
jen
Geting The Number Of Images In A Folder
hi guys ,,,
i'm trying to make a dynamic photo gallery ....
and i have 1 question ,,, how i can get the number of images in a folder ??
i tried "try...catch " statement ....but i just couldn't catch the error that i expect (can not load image)
the code ,(attached to a movie clip), i used is :
onClipEvent (load) {
i = 1;
more_images = true;
}
onClipEvent (enterFrame) {
if (more_images) {
i++;
try {
_root.my_mc.loadMovie("images/pic"+i+"jpg", 1);
throw new Error("no Error yet");
} catch (e_err:Error) {
if (e_err != "no Error yet") {
more_images = false;
}
}
}
}
so any1 can help in this ....?!!!??
Load And Crossfade Images From Folder
Hi there,
The task
---------
To get a slideshow of images to load from a folder, and to crossfade them as they appear. Attempting to do this with AS only in case images ever change, plus it would be a good tool to re-use. Images should remain about 2s on screen (can be a variable).
How far I got!
I've got as far as fading-in, then fading-out a single image. Independently I can loop through all the images in the folder successfully one at a time. What I canna do is get the two scripts to work together, and night has fallen already !
The following code on the main timeline is what I'm working with, with one static movieclip:
The fade script:
----------------
code: _root.fadeInc = 5;
_root.fade = 0;
loadMovie("eye/0046.jpg","imageHolder_mc");
function imageFader() {
var nTimeNow = getTimer();
if (nTimeNow <= 1000) {
trace (_root.fade);
if (_root.fade <= 99) {
_root.fade += _root.fadeInc;
imageHolder_mc._alpha = _root.fade;
trace("fading in now: alpha(" + _root.fade + ") at time: " + nTimeNow);
}
} else if (nTimeNow >= 2000) {
trace (_root.fade);
if (_root.fade > 0) {
_root.fade -= _root.fadeInc;
imageHolder_mc._alpha = _root.fade;
trace("fading out now: alpha(" + _root.fade + ") at time: " + nTimeNow);
} else if (_root.fade <= 0) {
trace ("reached 0 alpha, remove clip and stop timer");
clearInterval(nFaderInterval);
unloadMovie("imageHolder_mc");
nTimerNow = 0;
}
}
}
// this is the thing that sets it all off
var nFaderInterval:Number = setInterval(imageFader, 10);
-------------------
And the following does the loop through all files:
-------------------
_root frame 1 (preload frame)
------
// for images numbered 1 to 168 in a folder
var aImageNames:Array = new Array();
for (var i:Number = 1; i < 168; i++) {
aImageNames[i] = i;
}
var imageNumber = 1;
var maxNumber = aImageNames.length;
---------
_root frame 2 (after preloader) contents
---------
function nextImage() {
if (imageNumber < maxNumber) {
trace("loading the following movie: " + aImageNames[imageNumber]);
unloadMovie("imageHolder_mc");
loadMovie("eye/" + aImageNames[imageNumber] + ".jpg", "imageHolder_mc");
imageNumber++;
} else {
trace ("reached the max number of images, clear the timer");
clearInterval(nMovieInterval);
}
}
var nMovieInterval:Number = setInterval(nextImage, 1000);
---------------
So I got all tied up in my setIntervals and where I could put them - I only need the fader check to occur AFTER each image has loaded, not every 10 ms.
That will do for a start, then the task is to get the images loaded into two movieclips so they crossfade. I can handle that bit as long as the fading script is working.
Please can anybody help me with this probably simple problem! I've had a search with no results yet but am still looking, I'm stuck in a rut!
If you need the FLA or SWF samples just shout.
Many thanks,
Alun
Preloading A Folder Full Of Images ?
Hello, I have been working on this image gallery for a week or so. In the gallery I call 12 dynamic images (might need to call more) on to the stage at once.
the script looks like this,
loadMovie("images/1.jpg", "1");
loadMovie("images/2.jpg", "2");
loadMovie("images/3.jpg", "3");
loadMovie("images/4.jpg", "4");
loadMovie("images/5.jpg", "5");
loadMovie("images/6.jpg", "6");
loadMovie("images/7.jpg", "7");
loadMovie("images/8.jpg", "8");
loadMovie("images/9.jpg", "9");
loadMovie("images/10.jpg", "10");
loadMovie("images/11.jpg", "11");
loadMovie("images/12.jpg", "12");
Idealy what I would like to do is preload the images folder. I have a preloader on the first frame but it does not oad the dynamic images.
The script for the preloader looks like this.
Frame 1
isDemo = false;
iDemoCount = 0;
Frame 2
if (isDemo == false) {
iFileLoaded = _root.getBytesLoaded();
iFileSize = _root.getBytesTotal();
}
if (isDemo == false) {
iPercentLoaded = Math.round((iFileLoaded/iFileSize)*100);
} else {
iPercentLoaded = iDemoCount;
iDemoCount++;
}
pBar._xscale = iPercentLoaded;
sStatus = iPercentLoaded add "%";
Frame 3
if (iPercentLoaded == 100) {
gotoAndPlay(_currentframe+1);
} else {
gotoAndPlay(_currentframe-1);
}
Frame 4
stop();
_root.play();
to see the gallery as is go here http://www.shmooze.ca/newnight/test2.htm
Is there any way I can load the content of the images folder even if it has a stupid amout of images in it ?
Thanks in advance
bill
Preload Images From Folder/library
Hi!
I have a scene with two buttons. When you click them, JPEG's are loaded to a target mc with the loadMovie-action:
on (release) {
loadMovie(meg1.jpg, "target");
}
To this scene, i have a preloader in the first frame. but it doesnt load these pictures until you click the button, and then you have to wait a few secs.
Does anybody know how i can solve this problem? Could i load them from the library? (which code would i have to use then) Or is it possible to preload them with the other content?
Actionscript That Points To Images In A Folder
Hi
I need some help with some action script that will allow me to direct transparent png images to pre drawn motion guides in flash.
I'm running flash CS3, and using photoshop CS3 to get the images ready.
Is their a script that can pull in images directly form folders on my Hard drive?
Any help would be great
Thanks
Preloading A Folder Of External Images
I have a really annoying slide show that shows pairs of before and after pictures. What I need is to be able to preload a folder of images and then load those images into movieClip holders. I have no idea how to get the images to preload.
To be honest the whole thing is a mess. What I really wanted is a slide show that has pairs of images that fade from before to after. With buttons along the bottom that take you to the next pair of images. AND have all the images loaded in from an XML document. Bonus to anyone who can give me a hint on that one.
Really i would settle how to preload the images while the preloader is going. And then loading the first pair of slides.
Here is the in-progress version. http://www.mediamaxphotography.com/m...com/aerial.php
Attached is the fla.
Dynamically Load Images From Folder?
I'm trying to figure out how this flash file is pulling images from a folder.
http://www.andrewberg.com/photobrowser/afpb_flash.html
He included the PHP file, but didn't include the flash source file. I can't see how he's calling the PHP from the flash.
Does anyone have a clue to how he does it?
Thanks!
Can I Count No. Of Images In Folder From Flash ?
Hi ! all
My query is related to loading images from folder. I have a folder outside. I have created a animation in flash, .
Now I want to load all the images one by one, but if there are 5 images then after the 5th images again 1st image should come.
I have done this thing also, but my doubt is what, how can i count that how many images are there in my folder.
Code on first frame
if (whichPic == 5) {
whichPic = 1;
}
whichPic = whichPic+1;
loadMovie("images/flashimages/image"+whichPic+".jpg", "square");
Code on the movieclip "square"
onClipEvent (load) {
_alpha = 0;
count=0;
}
onClipEvent (enterFrame) {
if (_alpha<=0)
{
count=0;
}
if (count==0){
_alpha += 3;
}
if (_alpha>=99)
{
count=1;
}
if (count==1)
{
_alpha -= 2;
}
}
I m attaching the source file also.
If possible give me the reply
|