Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Load And Loop Folder Of Images Dynamically...



Hi,

I'm trying to create a slideshow which loads images dynamically from a folder on my server. The number of images in the folder will change on a daily basis, so I'm guessing that this needs some kind of array to predetermine the contents of the folder. The files will not have a regimented naming structure.

Basically, I need to display all of the images in the folder one by one and then loop back to the start.

Has anyone managed to do this before? Can anyone direct me to some help or offer some assistance?

Many thanks :-)



FlashKit > Flash Help > Flash ActionScript
Posted on: 09-18-2006, 05:35 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Load And Loop Folder Of Images Dynamically...
Hi,

I'm trying to create a slideshow which loads images dynamically from a folder on my server. The number of images in the folder will change on a daily basis, so I'm guessing that this needs some kind of array to predetermine the contents of the folder. The files will not have a regimented naming structure.

Basically, I need to display all of the images in the folder one by one and then loop back to the start.

Has anyone managed to do this before? Can anyone direct me to some help or offer some assistance?

Many thanks :-)

# 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

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!

Dynamically Load Images From Server Folder?
Hi, I'm looking for a way to build a gallery so that I can simply upload a folder with images to the server and the .SWF will load all images within that folder, whether it be 3 images or 10 images. I know how to do this using PHP on just a basic HTML page but I want to have some animation in there. Is there a way to do this with only Actionscript? Or if PHP is the answer, how can I put this into a Flash file?

Load Images Dynamically From Xml In Loop
I'm attempting to load some images into flash from xml. I'm attempting to loop through the xml and load the images, and set rollover, rollout, and onclick actions. I'm having trouble with the syntax. The rollover works, but the rollout doesn't. I have the images loading statically outside of the loop, but want them inside the loop. I can't get the syntax for that either.

CODE
// call mcLogos movie clip
this.attachMovie("mcLogos", "bLogos", 3);
bLogos._x = 400;
bLogos._y = 250;

var myXML:XML = new XML();
myXML.ignoreWhite=true;
myXML.load("company.xml");
myXML.onLoad = function(success) {
    if (success) {
        var myImage = myXML.firstChild.childNodes;
        for (i=1; i<myImage.length; i++) {
        var imageNumber = i;
        var imageID = myImage[i].attributes.id;
        var imageURL = myImage[i].attributes.img;
        trace ("My image number "+imageNumber+" ID is "+imageID+" and its filename is "+imageURL+".")
        trace(mcSquares["square"+i]);    
                
        // rollover effect for squares    
        mcSquares["square"+i].ID = i;
                mcSquares["square"+i].onRollOver = function(): Void {
                mcSquares["square"+this.ID]._visible = false;
                };
    
        // rollout effect for squares
        this["mcLogo"+i].ID = i;
        this["mcLogo"+i].onRollOut = function(): Void {
                    trace(mcSquares["square"+i]);
                    mcSquares["square"+i]._visible = true;
                };
    
        // onclick
        this["mcLogo"+i].onRelease = function () {
                getURL("press.cfm?id=+imageID+");
                };
        }
    } else {
        trace ("XML not loaded.");
    }
};



// load external images, I want to put this in the above loop
this.mcLogo1.logo1Text.htmlText = "<img src="flashImages/pp1.jpg">";
this.mcLogo2.logo2Text.htmlText = "<img src="flashImages/pp2.jpg">";
this.mcLogo3.logo3Text.htmlText = "<img src="flashImages/pp3.jpg">";
this.mcLogo4.logo4Text.htmlText = "<img src="flashImages/pp4.jpg">";
this.mcLogo5.logo5Text.htmlText = "<img src="flashImages/pp5.jpg">";
this.mcLogo6.logo6Text.htmlText = "<img src="flashImages/pp6.jpg">";
this.mcLogo7.logo7Text.htmlText = "<img src="flashImages/pp7.jpg">";
this.mcLogo8.logo8Text.htmlText = "<img src="flashImages/pp8.jpg">";
this.mcLogo9.logo9Text.htmlText = "<img src="flashImages/pp9.jpg">";
this.mcLogo10.logo10Text.htmlText = "<img src="flashImages/pp10.jpg">";
this.mcLogo11.logo11Text.htmlText = "<img src="flashImages/pp11.jpg">";
this.mcLogo12.logo12Text.htmlText = "<img src="flashImages/pp12.jpg">";
this.mcLogo13.logo13Text.htmlText = "<img src="flashImages/pp13.jpg">";
this.mcLogo14.logo14Text.htmlText = "<img src="flashImages/pp14.jpg">";
this.mcLogo15.logo15Text.htmlText = "<img src="flashImages/pp15.jpg">";
this.mcLogo16.logo16Text.htmlText = "<img src="flashImages/pp_blank.jpg">";
this.mcLogo17.logo17Text.htmlText = "<img src="flashImages/pp_blank.jpg">";
this.mcLogo18.logo18Text.htmlText = "<img src="flashImages/pp_blank.jpg">";


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!

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!

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

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.

Dynamically Display Tumbnails Of All Images Found In A Folder.
I'm trying to find a way to display dynamically all images found in a subfolder called "images", but I've been unable to locate a component or a tutorial. Is this even possible in MX?

Thanks.
Dave

Pulling Images From Folder/txt File To Play Loop?
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 will be a breeze.

Any help would be greatly appreciated, thanks!

Please Help Can You Dynamically Load A .txt In A Different Folder?
Hello everyone,

I'm trying to keep my site tidy, and really would like to keep all my .txt files that I'm loading dynamically. However, I only know how to point to files in the same folder as the .swf. Is this even possible? I know that I can point to my folders in my harddrive, but I need to point to a folder on the website. Could someone please help me figure this out?

Thank you for your time in advance!

How Can I Load Pictures Dynamically From A Folder?
More clearly=> I know how to load a picture from a folder dynamically but what I want is.. how many pictures are in that folder that much pictures must show when I press a button without naming all of them...(so using one button and pressing next all the time to view next pictue on that folder)


on(release){
MyClip.loadMovie("pictures/pix1.jpg");
}

this code will just load that "pix1.jpg" from "pictures" folder..
but I don't wanna name them one by one.. Is it possible to make it to understand to load all picture one by one without naming those pictures one by one so I could simply upload many pictures to that folder without renaming the pictures...

or is there any better way to do this trick?


pls, gimme a hand on this


-GM

Can I Load Fonts Dynamically From A Folder?
i'm making an application in flash and my client simply wont agree to anything but this. the application should be able to load fonts dynamically from a folder. it could be on the server. i'm prepared to use php if its necessary.

so is this possible?

the tool is supposed to give the end user a wide range of choices for fonts for the text he enters.

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

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

Dynamically Load Array Based On Folder Contents
Tough one...

I'd like to have the contents of an mp3 folder entered into an array (containing strings of each file name in the folder).

I'd like this to be totally dynamic so I can modify a playlist simply by dropping more mp3s into this folder.

File names must come in as strings in an array (i.e. "js bach - air on the g string.mp3")

How about it? Any thoughts or ideas?

Thanks
-dave-

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

Load Images In To Flash Through An External Folder
Hi i'm really stuck in this pls help me out......
is there a possibility where i can load external images which are there in a folder in to flash and run as a loop with a time break.

pls let me know the cording or what ever the possible way to get this thing done.

Thanks
pls mail me if possible --- dimuth@jkcs.slt.lk

Dimuth

Trying To Load Multiple Images In A Folder To Stage
I'm trying to load multiple images to the stage at random XY positions and, through functions, affect those images that are loaded. I'm trying to figure how to write within the URLRequest code how to call upon a folder and not just an image. Here is a part of my code that deals with this:

var imageRequest:URLRequest = new URLRequest("movieclip.jpg")
var imageLoader:Loader = new Loader();
imageLoader.load(imageRequest);
addChild(imageLoader);
imageLoader.x = Math.random() * stage.stageWidth;
imageLoader.y = Math.random() * stage.stageHeight;


Any help would be greatly appreciated. thank you

Load Images From A Local Folder Into A MovieClip
How can I load images from a local folder (this will be an off-line application) or from the asset library into an existing MovieClip placed on the stage?

Photo Gallery: Load Images From Folder?
I am trying to make a user's Flash photo gallery easier to update.

I want to use either XML or PHP to scan all the files in a specific folder to include in the photo gallery for the gallery to cycle through.

Of course, I can't edit ANY files like the xml or php because the user will be uploaded new photos at their convenience.

Any ideas or can anyone point me in a good direction?

Thanks!

How Can Load The Images Dynamically
How can i use the dynamic image in my movie. In the whats new setion of flash mx these guys are telling that now we can load the image dynamically but they havent provide any tutorial for this.
PLease tell me how to do this.

cheers
Ritesh

Dynamically Load Images
this may OR may not sound difficult but
if anyone has a link to a tutorial on
loading images dynamically to a flash
movie I would appreciate the direction.

The general problem is this;

To have a menu for images and as is obvious
after a link is pressed on the menu, the image loads,
BUT,
If the owner of the site wants to add new images
daily, then, all he would have to do is upload
the images to the server and the Menu would be updated
and the pic along with the menu item would be accessable.

About the menu, I am going to take care of that myself,
About the images, I will direct the owner of the site
to specifically name each new pic that he uploads,
so that Flash can go through the file each time it loads
and determine if there is another image in the file,
basically it would just loop once and count the number of images. so again, that is not my problem,

the problem is simply loading the data remotely...

Thanks in Advanced everyone

Load Images Dynamically
pls can someone tell me how i can upload images dynamically & also to have a motion for each image i upload.
is there a tutorial which i can go through as well

thanks

Dimuth

Is It Possible To Load Gif Images Dynamically...?
Hi...
Can any one tell me if I can load gif files dynamically from a folder?

How To Load Images Dynamically?
Hi guys,

I'm making a small flash file that will randomly display a series of 10 logos, 1 at a time. I'm wondering how I set up a fla file where Average Joe Schmo can just upload a new logo to a directory, and it will be automatically inserted into the FLA file? Hope this makes sense, I know it's a pretty broad question but if anyone can point me in the right direction that would be great. thanks

Dynamically Load Images
I'm working on a site and I have to do my navigation header in flash for all of the content pages but I have a background image that I have to change on each page. So, instead of having a different swf for each page I'm trying to change the image by using an empty movieclip in one swf and somehow linking it with variable names. My problem is that I'm not savy with actionscripting in flash and I'm not sure the exact coding that I need to use. I named my mc variable with imageLoader and in my html coding I have it pulling the correct jpg and placing it in the imageLoader space but I have to tell the swf to place the jpg in that space...does this make sense to anyone?

Thanks so much!

Load Images With A Loop
Hello, right now I am trying to load images continuously with a loop until there are no more. What I have done so far is load "image"+n+".jpg" until Flash can't load anymore, in which case an IOError would be given. When the IOError is given, the loop should break, but right now the problem I am having is that the event listener I set up for the IOError is executing after the loop ends, which defeats the purpose of why I had it there. Here is the code I am using (the fla I have is just a blank one that uses this class for its document class):


Code:

package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.errors.*;

public class listings extends Sprite {
public function listings() {
loadImages();
}

var loader:Loader;
var curImgNum:int = 1;
var numImages:int = 0;
var imageContainer:Sprite;
public var breakFromLoop:Boolean = false;

private function onIOError(event:IOErrorEvent):void {
breakFromLoop = true;
trace(breakFromLoop);
}

public function onComplete(event:Event):void {
event.target.content.width /= 5;
event.target.content.height /= 5;
}

private function loadImages():void {
//the condition for the loop is just temporary, it should be an infinite one since the IOError will be the thing that breaks the loop
while (numImages < 6) {
trace(breakFromLoop);
if (breakFromLoop == true) {
trace("break");
break;
}
loader = new Loader();
imageContainer = new Sprite();

loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
loader.load(new URLRequest("image"+curImgNum+".jpg"));

//temporary positioning code i am using
imageContainer.x = Math.random() * 700 + 1;
imageContainer.y = Math.random() * 400 + 1;
imageContainer.addChild(loader);
addChild(imageContainer);

curImgNum++;
numImages++;
}
}
}
}
Please advise. Any help is appreciated.

Dynamically Load And Resize .swf Images.
Hi,

I'm needing to dynamically load in .swf images from folder on my server.

Once loaded, they need to be resized automatically so they look the same size as the mc I loaded them into.

Any ideas on how to accomplish this?

Thanks,

Dynamically Load Images In Flash 5?
I love the new feature of dynamically loading images with MX and was wondering if anyone has found a way to do it in 5. I am thanking anyone in advance for a reply.

Stream And Dynamically Load Images
I have a 1 MB swf movie. The reason it's so large is because of many jpgs. So I reduced the size of the movie by removing the jpgs and using loadMovie to insert them as the user moves through each frame. The problem is that there's a delay, sometimes a long delay, whenever an image is loaded, especially on a 56k modem.

Is there anyway to stream the images into the cache while the user is in prior frames. In other words, if the user is on Frame 1 looking at an image, how do I get the images on Frame 2 and Frame 3 to load before the user gets to those frames?

Component Can Load Images Dynamically?
i have a component i purchased for flash that has images in it, since it is a component, can i still preload the images dynamically??... does loading them dynamically like music, make the file a lot smaller ? someone wants a slideshow with 40 images is that possible to do under 600k or so ?
thx

Dynamically Load Images With Transparency
I don't think this is possible, but i need to pull images from a folder on a website into flash that have a transparency. So i know you can dynamically build a list of jpg's and have the user select them, and then load them in. But i need an image type (like a gif) to load in with a transparency on it. Is this possible?

Thanks.

Dynamically Load Images For Menu
I'm creating an image slider menu. My client would like to swap out images in the future for his portfolio. When images are clicked a larger view will show up.

Can you load an image using geturl and then alter it position/ size/ etc...?

That way wehn he wants to replace an image he can just copy the new image to the server with the same name as the one he's replacing.

Load Faded Images Dynamically
Hi Everybody

I am creating a set of thumbnails which are all individual movieclips because of the animation which takes place, but I am having a problem trying to load in jpegs dynamically into a container using fade in and out.

I have tried a few downloaded bits of code but have had no luck.

I could do with some help, please

Dynamically Load Random Images
I have three rectangles I converted to movie clips named pichold1, pichold2, pichold3 and placed horizontally side by side on the stage. I want to use actionscript to dynamically load these images from an images folder. Each image is named "image#" (ex. image1, image2, image3, ...) I want the movie to be placed on a webpage that when a user visits the page, the movie will load random images and cycle through them displaying them in the movie clips. I also want to use some sort of transition effect to fade the images in and out, any help with this?

Load Dynamically Images For Thumbnail
Hi, I am trying to create a thumbnail and load images located in a 2D array filled with a XML.

pArray[x][5]= preview image

Here is a sample of the XML

Code:
<project id="0">
<name><![CDATA[Test1]]></name>
<date><![CDATA[01/01/01]]></date>
<technologie><![CDATA[AS2, AS3, Kek Chose]]></technologie>
<img><![CDATA[behappyfarmer_img.jpg]]></img>
<preview><![CDATA[/behappyfarmer_preview.jpg]]></preview>
<description><![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque sed lectus imperdiet felis tempus aliquet. Suspendisse sem nulla, faucibus eu, eleifend at, scelerisque vitae, elit. Donec luctus dui vel urna. Integer at diam. Donec et risus. Praesent vestibulum pede ut urna. In facilisis tempus magna. Cras quis dolor sed dui pharetra blandit. Pellentesque vel arcu a nisi consectetuer iaculis. Ut.]]></description>
</project>
here is my XMLLoader Class

Code:
import mx.utils.Delegate;

class com.cc.XMLLoader
{
private var _xml:XML;
private var xml_result:Array;
public var xml_loaded:Boolean = false;

public function XMLLoader(path:String){
this._xml = new XML();
this._xml.ignoreWhite = true;
this._xml.load(path);
this._xml.onLoad = Delegate.create(this, dataLoaded);
}

private function dataLoaded(sucess:Boolean):Void {
if (sucess) {
createArray();
}
}

private function createArray():Void {
var xmlroot:XMLNode = this._xml.firstChild;
var i:Number;
var j:Number;

this.xml_result = new Array();
for (i = 0; i < xmlroot.childNodes.length; i++) {
xml_result[i] = new Array();
this.xml_result[i][0] = xmlroot.childNodes[i].attributes["id"];
for (j = 0; j < xmlroot.childNodes[i].childNodes.length; j++ ) {
this.xml_result[i][j + 1] = xmlroot.childNodes[i].childNodes[j].firstChild.nodeValue;
}
}
this.xml_loaded = true;
}

public function getXML():Array {
return this.xml_result;
}

public function getToken():Boolean {
return xml_loaded;
}
}
Here is my class

Code:

import com.cc.XMLLoader;
import mx.utils.Delegate;

class com.cc.projects.Projects extends MovieClip
{
private var objXmlLoader:XMLLoader;
private var pArray:Array = new Array();

public var container : MovieClip;

public function Projects() {
objXmlLoader = new XMLLoader("../lib/xml/Projects.xml");
this.onEnterFrame = Delegate.create(this, getToken);

}

public function getToken() {
if (objXmlLoader.getToken() == true) {
delete this.onEnterFrame;
getArray();
}
}

public function getArray() {
/*
This is the part which is supposed to show every preview images of my xml. from 0.0 to 80.0 and so on.
*/
pArray = objXmlLoader.getXML();

var k:Number = 0;
var i:Number;

for (i = 0; i < pArray.length - 1; i++) {
container.createEmptyMovieClip("mc" + i, 100);
container["mc" + i].loadClip("../lib/img/projects/" + pArray[0][5],this);
container["mc" + i]._x = k * 80;
k++;
}
}
}
Can you please tell me why it doesnt works?
The problem is obviously from the getArray function. I know that if I call them by their name manually it works but I am trying to assign them a dynamic name and call them with it which doesnt work.. please tell me how I can do that.

Thank you.

Dynamically Load Images Into Flash
Hi everyone, I'm new.

I'm not too experienced with flash, but I was recently making a website in flash (trying to get better at this) and I wanna be able to change images in the folder of the site directory as opposed to having to open the .fla file, change the images in flash, then recompile and re-upload the site (like I said I'm not too experienced, and this seems like the only way I know ).


Right now I have a movieclip symbol called 'dynamicIMAGE', its one frame with one line of actionscript applied:

loadMovie("image.jpg", 1);

then I drag this movieclip to the stage of the website, but whenever I preview the site, the image DOES appear (so it works there), but the problem is that it appears in the upper left, no matter where I drag the movieclip onto stage. I've also tried messing with the _x position and _y but I got nothing from that. I have the image named "image.jpg" so that when I wanna replace the picture displayed on the page I can just drag another image file called "image.jpg" to overwrite the previous one.


Any help would be greatly appreciated, I've been racking my brain over this for the past day, meanwhile its probably just something stupid and simple that I need to do . Thanks in advance.

How To Dynamically Load Images Into Flash
I have a movie clip on the stage that I want to dynamically load images into (that constantly change), how would I go about doing this? Thanks.

Dynamically Centering Images In MC As They Load
I am dynamically loading images into a movie clip (MC), but as they load the images load from the MCs registration point which is fine if you want the image to load in the top left side of the MC.

What I would like to be able to dynamically change the registration point of the image to the centre when it is loaded. I would expect you would have to change the registration point of the MC (as the image takes on the properties of the MC).

Basically I would like the images to load from the left, right, top middle, botton middle etc... so that per project I can dynamically change the above.

Here is an example of what I am trying to achieve. I have everything else down pat except the images positioning....

http://www.evb.com

In the above case the images are loaded and their centre point becomes the centre of the image and the frame then expands or contracts depending on the image width and height.

Even if I could be able to make the centre point in the middle would do me...

Can anyone help??????

Using LoadMovie To Dynamically Load Images?
Hi There,
I've managed to use AS to dynamically create empty movie clips and offset them so that they appear side by side. The problem is, I can't use loadMovie to load in images into my empty movie clips. I can successfully use loadMovie outside of my for loop, by directly referencing each of the dynamically created clips (holder_mc1.loadMovie(...), holder_mc2.loadMovie(...),etc) after they have been created. This is ok but I really need to create and fill the empty movie clips within a single for loop. By the way, the references to the images being loaded are contained within an external text file, but this doesn't seem to be part of the problem. Does anybody know if there is a problem using loadMovie in this way or if there is anything I can do to fix the problem?

Thanks


ActionScript Code:
if (succes) {        var imageNum = this.imageNum;        trace("imgeNum="+imageNum);        offset = 200;            for (i=1; i<=imageNum;i++){            duplicateMovieClip("holder_mc", "holder_mc"+i, i);            setProperty("holder_mc"+i, _x, offset);            "holder_mc"+i.loadMovie(this.Image);  // won't load             offset = offset+200;                  }    }        else {        trace("Error loading data");    }

How Do I Dynamically Load Images With DuplicateMovieClip()?
I want to duplicate this Movie Clip so that "bird.jpg" is loaded into all 6 Movie Clips. Why doesn't this code work?

for (i=0; i<6; i++) {
miniHolder.duplicateMovieClip("miniHolder"+i, i, {_x:i*10, _y:i*20, _alpha:50});
var bb = "miniHolder" + i;
bb.loadMovie("bird.jpg", this.getNextHighestDepth());
};

Reconfiguring This To Dynamically Load Images?
How could I modify it to do so? The code is a little to complicated for me.
The link to is here /.

Dynamically Centering Images In MC As They Load
I am dynamically loading images into a movie clip (MC), but as they load the images load from the MCs registration point which is fine if you want the image to load in the top left side of the MC.

What I would like to be able to dynamically change the registration point of the image to the centre when it is loaded. I would expect you would have to change the registration point of the MC (as the image takes on the properties of the MC).

Basically I would like the images to load from the left, right, top middle, botton middle etc... so that per project I can dynamically change the above.

Here is an example of what I am trying to achieve. I have everything else down pat except the images positioning....

http://www.evb.com

In the above case the images are loaded and their centre point becomes the centre of the image and the frame then expands or contracts depending on the image width and height.

Even if I could be able to make the centre point in the middle would do me...

Can anyone help??????

Using LoadMovie To Dynamically Load Images?
Hi There,
I've managed to use AS to dynamically create empty movie clips and offset them so that they appear side by side. The problem is, I can't use loadMovie to load in images into my empty movie clips. I can successfully use loadMovie outside of my for loop, by directly referencing each of the dynamically created clips (holder_mc1.loadMovie(...), holder_mc2.loadMovie(...),etc) after they have been created. This is ok but I really need to create and fill the empty movie clips within a single for loop. By the way, the references to the images being loaded are contained within an external text file, but this doesn't seem to be part of the problem. Does anybody know if there is a problem using loadMovie in this way or if there is anything I can do to fix the problem?

Thanks


ActionScript Code:
if (succes) {        var imageNum = this.imageNum;        trace("imgeNum="+imageNum);        offset = 200;            for (i=1; i<=imageNum;i++){            duplicateMovieClip("holder_mc", "holder_mc"+i, i);            setProperty("holder_mc"+i, _x, offset);            "holder_mc"+i.loadMovie(this.Image);  // won't load             offset = offset+200;                  }    }        else {        trace("Error loading data");    }

Load Faded Images Dynamically
Hi Everybody

I am creating a set of thumbnails which are all individual movieclips because of the animation which takes place, but I am having a problem trying to load in jpegs dynamically into a container using fade in and out.

I have tried a few downloaded bits of code but have had no luck.

I could do with some help, please

Copyright © 2005-08 www.BigResource.com, All rights reserved