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




Image Loader



Hello,
I have a website that displays my wedding photography. I built it using a main .fla with all information and navigation on it and the images in the portfolio are each there own separate .fla's that come up in a loader. The problem is that it takes too long for the images to load online. How can I make it so that these images load faster? Should I load them as html? and if so how do I go about doing this?

Check out my site to see what I mean: http://www.idobelieve.biz



FlashKit > Flash Help > Flash MX
Posted on: 10-09-2006, 03:32 PM


View Complete Forum Thread with Replies

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

Copying Loaded Image Bitmap Data To Another Image Loader
Hi,

I have an app where the user uploads an image into an image loader component. I am trying to figure out how to copy the bitmap data from that loaded image into another image loader component.

Could someone steer me in the right direction? I was looking at bitmap clone and copypixels though haven't figured out how to get this to work yet.

Thanks,

Dan

Bind Image To Image Loader Via Remoting
have got a comboBox working ok now as well as capturing the data value . What i am trying to do now is bind an image path/name to an image loader. How it works is there's a listener/handler on the combobox that when changed makes another query call pulling the appropriate path/filename from the database.

i need to get that path onto the image loader .. contentPath and load don't appear to work for it in the normal sense. .. the query and filename is being processed and is returning the correct value , i just need to get the image loader to use it .. below is the code that makes the call for the image


Code:
function getImage() {
var pc:PendingCall = retreiveProject.projectImg({getImage:myList.selectedItem.projectID});
pc.responder = new RelayResponder(this, "image_Result", "image_Fault");
}
how do i connect the result to the loader ?

Thx in advance

Image Loader ?
i am so curious about how can a image loader like the one used in http://www.schiesser.de/schiesser.html works !!! how can i build it ?
if someone could guide me into this i will much appreciate .

only enter in http://www.schiesser.de/schiesser.html and click any picture of the right side of the webpage and loader will display .


thanks .

Image Loader
hi guys,

this is prolly a piece of pee, but i am having a little trouble.

i have about 200 images i want to display in a simple flash movie in a holder. i dont want to rename the images as it would take ages. they are numbered dans_party001.jpg etc. i wnat to script a button to load them sequetially, possibly with a preloader on each image. i just want a next and a previous button.

please help

mark

Image Pre Loader Help
I’m trying to create a pre loader that will load an image instead of the bar fill pre loader, hope you know what I mean.

I would appreciate any help on how to do this or a tutorial on this, because the ones I found were all bar fill pre loaders tutorials.

Thanks in advance for any help given.

Image Loader
ok. so i understand how to make a pre-loader. no big deal. but i don't know how to load the site up front yet the images load later.

for example, i am doing a site for a photographer friend of mine. when you get to the page where you view his pictures, i want the user to be able to click on a thumbnail. upon click, a loader counts up and then the high-res image is displayed. if anyone can help me out i would be so grateful. thanks very much.

Xml Image Loader
I'm looking for some help on an xml image loader. basicaly i want to create an image viewer that has two buttons back and next. the images are loaded via xml file. when you hit next ofcourse the next image loads, but if its sitting idle, then the images should scroll automacaly...kinda like what msn.com has on their main site (the image box), but i wan to do this in flash and xml.

XML Image Loader
I'm new to using XML and loading it into my flash movie. I'm wondering if anyone knows of a good tutorial on loading XML and handling the data within flash? I'm wanting to create an image viewer using an XML file that holds a number of images which will loop through each image continuously fading one in as the other is fading out. Any help or suggestions is greatly appreciated.

Thanks

Help With Image Loader?
Hi there,

I was just wondering if someone could possibly help me out with a small item that I need to create.

I would like to be able to have a folder of images (jpg) and then a very simple xml file with links to the images in. I would like to have an MC on the stage that will then using AS load in the images xml file and create a simple array. Using this array start at a random point and load in the image. Then to fade out that image whilst fading in the next.
I need it to start at a random point each time instead of the start as it will be going in as a flash header image in a html page and so I don't want it to always start at the same image every time.

I already have something that I downloaded from the internet that does most of this and also has lots of (11 I think!) image fading effects integrated with it. The only problem I have with it is that I can't seem to slow the fades down, they just seem to go at the FPS that the Flash file is set to. If anyone could take a look at this file - http://www.something2ad.com/userdown...imagefader.zip and fix it to have a speed variable then that would be fantastic.
If not if anyone could suggest a really easy way of achieving this (as I am not very proficient in all of this) then I would be most greatful.

If anyone does come up with a different idea then I was wondering if it would be at all possible to integrate the Tween class from http://www.laco.wz.cz/tween as I like using that and it seems nice and easy to use.

Sorry to be a pain and pretty much asking someone to do this for me but I have been away from Flash for such a long time and can't seem to pick it back up again all that easily and any help would be greatly appreciated.

HAPPY NEW YEAR

Best wishes,


Mark Bowen

Image Loader
im trying to make a image loader witch replaces blank move clips on the stage with images found in the local directory

i named the mc to be replaced "blankheadmc" (its just a silhouette of a head)
i then gave it the instance of image1_mc

and the next one image2_mc, image3_mc etc etc

in the actionscript i put:

loadMovie("image1.jpg", "image1_mc");
loadMovie("image2.jpg", "image2_mc"); etc etc...

but as you are going to tell me the mc resizes for the size of the image i dont want it to do that i want it to stay the same size or scale or something but stay below a minimum width and height.

i think i can deal with like when u click on an image it gets bigger n stuff ill post more info if u need it thanks in advance

Si

Image Loader
ok hows the best way to create an image loader.

I have a move clip that get loaded to stage called wallpapersfull_mc inside this movie clip is wallpapers_mc that i will be alppling all code and changes to.

ok, is it best to have multiple frames all of witch has a different wallpaper image, and when the user clicks a button at the bottom say a left and right arrow, the frame changes forward one or back one.

now that in itself is annoying because i quite want the images to fade from one to another, and thats alot of tweens can that be done with action script?

The other option is using action script to make the movie load the images when clicked and replace a current MC on the stage, but this is quite dull and there could be quite a pause as the image loads from the external source, can i make the images fade in? and mabie some sort of loader that loads all the pics before allowing them to be viewed.

Any light would be nice. i can do either to an extent but im still only intermediate with action script.

Thanks in adavance

Storm

Image For Loader
Hi,

I was looking for a particular image to create a preloader.
it is quite use over the web for preloading images.

it looks like that : http://i220.photobucket.com/albums/d...ess-flower.png

but i need it in better quality.
where can i find it ?
thx.

A.

Pre-Loader With Image
Good Day everyone,

I'm creating a pre-loader in Flash CS3 using Actionscript 3.0... code below..

stop();

rectangle_mask_mc.DisplayObject.height = 1;
addEventListener(enterFrame = function():void
{

var loadedData:Number = this.getBytesLoaded();
var allData:Number = this.getBytesTotal();
var percent:Number = Math.round(loadedData/allData*100);
rectangle_mask_mc.DisplayObject.scaleY = percent;
if (loadedData >= allData) {
gotoAndStop(2);
delete this.onEnterFrame;
}
};

however when I test my movie I get the following error...
1084: Syntax error: expecting rightparen before semicolon.

Image Loader Help
Hi there...
I would realy need some little help with this little thing.
It would realy ease my work a lot.

1. Only the 1st addImg function is trigered.
2. the event does not work.
3. if I comment the loader stuff, everything works just fine...
4. please help ? i'm so very new at AS3

If what I am doing isn't a good ideea, can u please help me with a new one?


PHP Code:



import flash.net.URLLoader;
import flash.net.URLRequest;

function addImg(movie:MovieClip, imgpath:String, x:Number, y:Number) 
{
    var rect:Shape = new Shape();
    rect.graphics.beginFill(0xFFFFFF);
    rect.graphics.drawRect(x, y, 50, 50);
    rect.graphics.endFill();
    movie.addChild(rect);
    //*
    var loader:Loader = new Loader();
    loader.mask = rect;
    loader.addEventListener(Event.COMPLETE, doneloading);
    loader.load(new URLRequest(imgpath));
    movie.addChild(loader);
    //*/
}

var img = 0;
function doneloading(event:Event):void 
{
    img++;
}

addImg(this, "main/flash/penny.png",   0,   0);
addImg(this, "main/flash/penny.png",  50,  50);
addImg(this, "main/flash/penny.png", 100, 100);
addImg(this, "main/flash/penny.png", 150, 150); 

Image For Loader
Hi,

I was looking for a particular image to create a preloader.
it is quite use over the web for preloading images.

it looks like that : http://i220.photobucket.com/albums/d...ess-flower.png

but i need it in better quality.
where can i find it ?
thx.

A.

Image Loader
Hi!


I want to load dynamic image in my swf and also while loading i want to show an animation...


Any help would be appricated.

Thanks,
Erphan B Rajput

Image Pre-loader
I'm using Flash 8's Loader Component to load .swf(s) images though-out my movie. I'd like to pre-load the .swf(s) at the begining of each section. I'm currently using:

// Pre-Loading all swf's for this section
loaderh4.autoLoad = false;
loaderh4.load();

loader4_1.autoLoad = false;
loader4_1.load();

loader4_2.autoLoad = false;
loader4_2.load();

stop();

This seems to not help the delay between images. Any help with this would be great. Thank you.

XML Image Loader
I have an XML document that contains path to images.

I read the document and then try to create a movie clip for each XML image element.

I wind up with 3 movie clips with the same image.

I believe its a timing issues I can't quite figure out.

Any help appreciated

Adam

Here's snippets of the code.

var currAry = new Array();
var slideOffArray = new Array();
var aryCountGlobal = 0;
var globalURL;
var xmlData:XML;
var urlLoader:URLLoader;
var imageLoader:Loader;
var slideCount:int = 0;
var imageRequest:URLRequest
var imagePath:String;
var chronos:Timer;

imagePath = "images/";

import flash.display.*;
import flash.events.*;
import flash.net.*;

var urlRequest:URLRequest = new URLRequest("site_data.xml");
urlLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, completeListener);
urlLoader.load(urlRequest);

function completeListener(event:Event):void {
xmlData = new XML(urlLoader.data);
for each (var child:XML in xmlData.*) {
currAry.push(child);
//trace(child);
}
//chronos = new Timer(100,currAry.length +1 );
//trace(imagePath+currAry[0].sideShowImageOff);
//trace(xmlData.toXMLString());
for (var i:int =0; i < currAry.length; i++){
loadSlide(i);
}

}
//load slide images
function loadSlide(i:int){
imageLoader = new Loader();
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,initSlide);
trace(imagePath+currAry.sideShowImageOff);
imageRequest = new URLRequest(imagePath+currAry.sideShowImageOff);
imageLoader.load(imageRequest);

}
function initSlide(event:Event):void {

trace(event.currentTarget.bytesLoaded);
var slide_mc:MovieClip = new MovieClip();
slide_mc.name = "slide" +slideCount;
slide_mc.addChild(getLoaderImage(imageLoader));
slideOffArray.push(slide_mc);
slideCount = slideCount + 1;

}
function getLoaderImage(loader:Loader):Bitmap
{
var o:DisplayObject = loader.content;
// see BitmapData ctor for additional args
var img:BitmapData = new BitmapData(o.width, o.height);
img.draw(o);
var bmp:Bitmap = new Bitmap(img);
return bmp;
}

function initClips(){
var x:int = 10;
var y:int = 435;
trace("initClips slideOffArray.length = "+slideOffArray.length );
for (var i:int =0; i < slideOffArray.length; i++ ){
trace(slideOffArray.name);
slideOffArray.x = x;
x = x + 130;
slideOffArray.y = y;
slideOffArray.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
stage.addChild(slideOffArray);
}

}

function timerListener(event:Event):void {
trace(slideOffArray.length);
if (slideOffArray.length == currAry.length) {
initClips();
chronos.removeEventListener(TimerEvent.TIMER, timerListener);
}
}

chronos = new Timer(1000,5);
chronos.addEventListener(TimerEvent.TIMER, timerListener);
chronos.start();

Image For Loader
Hi,

I was looking for a particular image to create a preloader.
it is quite use over the web for preloading images.

it looks like that : http://i220.photobucket.com/albums/d...ess-flower.png

but i need it in better quality.
where can i find it ?
thx.

A.

Image Loader
Hi,

I'm using a french massload images script :

ActionScript Code:
MovieClip.prototype.traceRectangle=function(xPos,yPos,width,height,fillColor,lineColor,alpha){
   this.beginFill(fillColor,alpha);
   this.lineStyle(1,lineColor,alpha);
   this.moveTo(xPos,yPos);
   this.lineTo(xPos+width,yPos);
   this.lineTo(xPos+width,yPos+height);
   this.lineTo(xPos,yPos+height);
   this.lineTo(xPos,yPos);
   this.endFill();
}
 
MovieClip.prototype.setPreloader=function(obj){
   this._y=100;
   this._x=200;
   this.traceRectangle(0,0,180,20,0xcccccc,0x000000,100);
   this.createEmptyMovieClip("barre",1);
   this.barre._x=5;
   this.barre._y=5;
   this.barre.percent=0;
   this.createTextField("message",2,110,0,180,20);
   this.message.text="chargement..."
   this.onEnterFrame = function() {
      this.barre.clear();
      this.barre.traceRectangle(0,0,100*this.barre.percent,10,0x000000,0x000000,100);
      this.barre.percent=obj.getBytesLoaded()/obj.getBytesTotal();
      //Pour afficher dans le champ de texte un message :
      //'23 ko (10%) de 230 ko téléchargés'
      //au lieu de 'chargement...' , enlevez les commentaires autour de la ligne ci-dessous:
      //*****************************************************************
      this.message.text=Math.ceil(obj.getBytesLoaded()/1024)+" ko ("+Math.ceil(100*this.barre.percent) +"%) de "+Math.ceil(obj.getBytesTotal()/1024)+"ko téléchargés";
      //*****************************************************************/
      if (this.barre.percent>=0.99&&!isNaN(this.barre.percent)) {
         if(this._parent.massLoadWorking!=undefined)
            this._parent.massLoadWorking=false;
         this.removeMovieClip();
      }
   }
}
 
MovieClip.prototype.loadFile=function(obj){
   /*
   ** la variable en parametre est un objet du type:
   ** {type:a,file:b,newName:c,level:d}
   */
   var type=obj.type;
   var file=obj.file;
   var newName = obj.newName;
   var level = obj.level;
   this.createEmptyMovieClip("control",(level+1));
 
   if(type=="movieClip"||type=="image"){
      this.createEmptyMovieClip(newName,level);
      this[newName].loadMovie(file);
   }
   if(type=="loadVars"){
      this[newName]= new loadVars();
      this[newName].sendAndLoad(file);
   }
   if(type=="xml"){
      this[newName]= new XML();
      this[newName].load(file);
   }
   this.control.setPreloader(this[newName]);
}
 
 
MovieClip.prototype.massLoad = function(objects){
   /*
   ** les variables en parametre sont des objets du type:
   ** {type:a,file:b,newName:c,level:d}
   */
   this.massLoadWorking=false;
   this.massLoadList=new Array();
   for(var i=0;i<arguments.length;i++)
      this.massLoadList.push(arguments[i]);
 
   this.onEnterFrame=function(){
      if(!this.massLoadWorking&&this.massLoadList.length>0){
         this.massLoadList.reverse();
         this.loadFile(this.massLoadList.pop());
         this.massLoadList.reverse();
         this.massLoadWorking=true;
      }
   }
}


Usage :

ActionScript Code:
_root.createEmptyMovieClip("data",1);
racine="http://www.your_web_site.com/";
file1={type:"image",file:racine+"img_01.jpg",newName:"texture_1",level:1};
file2={type:"image",file:racine+"img_02.jpg",newName:"texture_2",level:2};
file3={type:"image",file:racine+"img_03.jpg",newName:"texture_3",level:3};
file4={type:"image",file:racine+"img_04.jpg",newName:"texture_4",level:4};
file5={type:"image",file:racine+"img_05.jpg",newName:"texture_5",level:5};
file6={type:"image",file:racine+"img_06.jpg",newName:"texture_6",level:6};
 
_root.data.massLoad(file1,file2,file3,file4,file5,file6);
//_root.data.massLoadList.push(file3);
 


But I would like to add a function that :
when the first image is loaded, have an alpha from 1 to 99 on this image,
when the second image is loaded, have an alpha from 1 to 99 on this image,
... and the same way for all images

I will appreciate your help on how and where to put this alpha function...
Thanks

Image Loader?
Hi, I've been looking at http://www.2advanced.com/'s site, and i find their image loadings very neat. (The pictures under Portfolio)

And I just wonder if there's any tutorial about that, because Im building a flash/html site and I need somekind of image loading :) I hope you know what I mean.. :roll:

Image Pre Loader/Bytes?
Hi every one and thanx for your help

I am working on a photogallery and need to have a pre loader that displays the status of the load when the image loads into the blank movie clip in flash. I have done this in flash 5, fine when loading in a nother swf file using getBytesLoaded and getBytesTotal and that is how I have been trying to do it with a jpg file that I am loading in but it only seams to return the bytes of the blank movie clip that I am loading the image into and not the bytes of the jpg file. any sugestions would be great.

thanx dave
[Edited by daj on 08-21-2002 at 02:55 PM]

Image Loader - Alternative Way Of Doing THIS...
ive got a dynamic image loader for jps which loads 10 in sequence using...


loadPercent = (Math.floor(_root.image.pic01.getBytesLoaded()/_root.image.pic01.getBytesTotal()*100)+"%");
if (_root.image.pic01.getBytesLoaded() == _root.image.pic01.getBytesTotal()) {
loadPercent = "100%";
loadBytes = (Math.round((_root.image.pic01.getBytesLoaded()/1024)*1000)/1000+" Kb of "+Math.round((_root.image.pic01.getBytesTotal( )/1024)*1000)/1000+" Kb total Loaded.");
gotoAndPlay("play01");
}



and an action on the next frame to create a loop...


gotoAndPlay("load01");




this works fine on internet explorer but ive tested it on a few others like mozilla and ie on the mac and it just skips the loading, i think its to do with the GotoandPlay part just being used.

is there any other way to do this? so it dosent just skip them?

Looking For Random Image Loader
hi list,

I currently have a main.swf, and I want to load random external image's. So everytime my page is refresh or a new page is load I want a new image to be loaded. I do not have any advanced skills in flash (yet ) So I'm looking for a fla-file which contains all the above. Anyone knows a location where i could find one (have been searching now for hours without success) or send me one by mail (chris@3rdmillennium.nl)

thx inadvanced (my deadline clock is ticking away AAARRRGGHHH)

crz

Dynamic Image Loader
I want to make a dynamic image box about 100px by 100px that cycles through a set of jpegs at random, with the image changing every few seconds. Has anyone got any ideas where I can start, I have got a brief idea of how this could be put together but do not know enough about Actionscript yet to put it into action

Cheers

Studentmonster

Dynamic Image Loader
hi,
how do i load images dynamicly to swf?

Dynamic Image Loader
I want to load 15 external swf's/images into blank mc's (I want all blank MC's to have _alpha=0). I want the blank mc's to be created dynamically and when all the swf's are done loading I want it to set var loadstatus = "complete". I would then have an onEnterFrame event that does something when var loadstatus = "complete"

If someone could let me know what code I need to do this then that would be really great! Thanks!

PS. Would it be at all possible to have a smooth preload bar that increases its width smoothly according to (total bytes loaded)/(total size of all 15 swf's)? I'm thinking it wouldnt because if all the images are cached then the bar would just jump up 1/15 width after each image is loaded, instead of moving slowely.

Urgent Image Pre Loader Help Please
Hi there guys,

I have a small problem that I know someone out there will be able to help me with and I would be really greatful!

I am completing a company website and they require a picture gallery which basically loads one image in, holds the image on the screen while another one loads and then the next one overlaps that one and so on...

I have seen this type of effect on photography sites and was wanting to apply that type of pre loading situation on the companys site....

At the moment I just have a pre loader right at the start of the file which loads in all the data and then proceeds with the image gallery...

Please find attached the fla.......

Thanks for your help in advance...

Nick

Random Image Loader With AS2?
Hey all !

just wondering ... is it possible to script an array/function/function call to display a random bit map using AS2? I have a site I'm designing that's using photos as a background. I have two photos and the thing is they're equally great, so I thought I would have one of either of them display randomly when the user gets to the site or refreshes or even navigates the site (all in Flash).

I've used similar functions in JavaScript, so I thought it would be logical that the same result could be achieved in Flash ... thoughts?

Thanks in advance !

Xenon.

Image Loader Looking Funny
I am sure this is easy to resolve. i have in image loader center stage of my root swf. Each gallery is an external swf file. Click on a thumb from a gallery, and the image loads to the root image loader. The problem: when i test the movie, the image holder is a big white rectangle on the stage, exactly where it was placed. But when i try the bandwidth profiler, it looks great (invisible until an image is selected).

And online.....it looks like the test...big white rectangle....what basic thing in flash am i missing.

thanks all, you rock, as always

Dynamic Image Loader
well i am in a crunch for time...really hope somebody out there can help me out with this. I have read way to many posts about loading images dynamically and some of the code gets me going in the right direction but...inevitably it fails for my specific task.

Here is the situation, and the things I need to make this work just right:

1. Need to load images dynamically from a folder structure

2. Need a preloader that appears each time a button is pressed to load a single image into a MC , preloader needs to include a bar graphic and a percentage left to load and the total size of each loading image. And once the image is fully loaded need for the preloader to vanish until the next time its used

3. Also i don't want the image to display until a certain time...basically because the client has vertical as well as horizontal images, so i created a tweened animation for the background menu that sits behind each image...and i want to make sure that the image isn't displaying even if it is finished downloading until the background menu has gotten to it resting place. It tweens from a vertical shape for displaying vertical images to a horizontal shape for displaying horizontal images. I have tried using actionscripted masking techniques to hide the image until the right time but haven't had much success

4. Just so you know each image is loaded from a button in a seperate MC. Each image has its own button to load it into the same MC.

Here is the break down for the scope of my movie.

The “fashion_Image_Viewer” MC..is two levels down from the _root..not _level but two MCs down if you know what i mean. The sub nav which contains the buttons for initiating images to load is one level down from the “fashion_Image_Viewer” and is called “subNav” . Here is a visual aid for ya.

_root
___+ Main_Image_Viewer
______+ fashion_Main
_________+ fashion_Image_Viewer - (this is where the image viewer sits)
______________+subNav (this is where the buttons sit that load each image)

I know this is alot to ask...but i am hopeing that an actionscripting master would find this really easy and could help me work through the code i need to get this finished and out the door.

One more thing....REALLY IMPORTANT....this needs to use Flash MX Actionscript 1 code not the newest 2004 player 7 code.

Any help is much appreciated

Benjamin

Trouble With Image Loader
I'm using a loader component in a screen/slide show presentation to show external jpegs images. This doesn't involve any code(and I don't need it to). I simply configure the loader component in the component inspector to load my jpeg file and it shows it. This works when I go to Test Movie, you can see all the loaded Jpegs. I also need to be able to circle letters and mark up different parts of the slide images from edit mode.

The problem is that I can't see the images in edit mode. The loader is not displaying images in the live preview edit mode. It used to work fine and I created my slide shows using this template I made with ease. But I stoped working on this project for a while, and now that I'm back to it the loader is acting screwy. If I can't see the images then a big portion of this project will not work because i need to be able to see the images in the loader while I edit.

Is there anything I may have done to disable the preview of the loader? Live preview is enabled. It doesn't seem to make a difference if it's in full preview mode or fast mode or not. Doesn't show up in any case. Please help, I'm going crazy here and can't continue my project.

Dynamic Image Loader
So I've created a flash file that loads external images from a folder. It's basically a slideshow. The files are named "image1.jpg", "image2.jpg" etc. so that I can increment a variable to dynamically load them through actionscript. New images will be added to the folder in time and I want the slideshow to be able to stop at the last image.

My question is: does anyone know a way for flash to find out how many files are in an external folder, so in this case I know how many images are in the folder, without using and xml or txt?

Alternatively, if that's not possible, is there any way to access the error that would be generated when flash attempted to load an external image that does not exist?

Loader That Display % Of An Image
how do i go about creating a loader that displays a % of an image as it loads
just say if it was the word load it would display L then after 25% of the movie loading it would Display LO etc is it done with a movie clip stoping on certain frames if so what actionscript would be required
thanks

Dynamic Image Loader
Hi,
I would like to know how can i load one image (png) over another with Loader component? I have several images which have alpha channel and i need to lay them over on top of eachother to make a composition.
Im able to load only one image at the time, but if i load a new image the previous disapears.
I have started with this tutorial: http://www.oman3d.com/tutorials/flash/portfolio_2_bc/

and i can't find a good solution to my problem anywhere else...
Please advise anybody.
tnx
narcyz

Dynamic Image Loader
Hi,
I would like to know how can i load one image (png) over another with Loader component? I have several images which have alpha channel and i need to lay them over on top of eachother to make a composition.
Im able to load only one image at the time, but if i load a new image the previous disapears.
I have started with this tutorial: http://www.oman3d.com/tutorials/flash/portfolio_2_bc/

and i can't find a good solution to my problem anywhere else...
Please advise anybody.
tnx
narcyz

[F8] Background Image Loader.
Hi guys,
I want to recreate an effect found here http://www.ry-z.com/.
Can some one please lead me to how the bacground image on the above site loads after clicking on the thumb pics. any help is well appriciated thanks..

[F8] The IE Problem(image Loader)
Hello everyone i am working on a project where i am using loader component for images it works fine with mozilla firefox but when comes to ie it looks hell.All the images gets distorted automatically .don't know how to handle the situation.But it is causing a great bit of trouble.If anyone can help
Thanks in advance

Xcml Image Loader
never really used xml before but anyway been following this tutorial...
http://www.gotoandlearn.com/player.php?id=22

checked my script over and over and cant spot anything, it just simple wont load my image...
anyone got any ideas ?? its driving me mad :S
XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<slideshow>
<photo src="lost.jpg" caption="hello this is a caption." />
</slideshow>



actionscript:
var x:XML = new XML();
x.ignoreWhite = true;

var urls:Array = new Array();
var captions:Array = new Array();
var whoIsOn:Number;

x.onLoad = function() {
var photos:Array = this.firstChild.childNodes;
for(i=0;i<photos.lengh;i++) {
urls.push(photos[i].attributes.url);
captions.push(photos[i].attributes.caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;

}

x.load("lost.xml");

previous.onRelease = function() {
if(whoIsOn > 0) {
whoIsOn--;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}

next.onRelease = function() {
if(whoIsOn < urls.length-1) {
whoIsOn++;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}

Proxy Image Loader?
Yo.

I can't seem to find any resources for this. I am trying to load an external image, but only a low-res image and then if the user selects it, a higher-res image. I have seen it done on say, piclense, or something like that. Is this just loading progressive bytes and then pausing? Any ideas?

Thanks,
Jon

Help With External Image Loader...
I'm using this simple code:


Code:
maxVal = 10;

myVar=Math.round(Math.random()*maxVal);

_root.mc_container.loadMovie("fotos/foto"+myVar+".jpg");
Now I just need it to wait for the next image. Once it is loaded, I want it to fade out the current image and fade in the next one. How do I do this?

Simple Image Loader
Hi guys- this is my first post here...
I'm creating an image gallery and looking for a simple way to preload (with a % loaded), external jpegs into an empty movie clip.
I'm using thumbnails- there are no "next" or previous "buttons".

I'm calling in the jpegs like this:
thumb1.onRelease = function(){
loadMovie ("images/homeR1.jpg", empty);
}

I've been googling/ searching all day-
Any help would really ease my frustrations.
Thanks in advance!

Random Image Loader
Hello all, i've just been searching the site for a while in search for a solution to my problem. You guys give great help but i couldn't find specifically what i wanted so i was hoping you could help out.

Basically, i have designed this layout in PhotoShop:



Using flash, i wish to have a random image load in the "random picture box".

I have a rough idea that i will need a like a rectangle there with some code linking to an xml file or something like that, but i really have no idea how to do it.

I'd also like different hyperlinks for each image if thats possible to do.

Any help is greatly appreciated in advance.

Image Loader Question
Ok, so I have a simple script that loads an image and displays it dynamically.
It works fine on my local machine but when it is online (on the site), it doesnt load the image? Is there something else I need to do?

script excerpt:

// test

var main_loader:Loader = new Loader();
var main_holder:Sprite = new Sprite();

main_loader.load(new URLRequest("test.jpg")); // problem ***
main_holder.addChild(main_loader);

this.addChild(main_holder);

Image Loader Into Movieclips
Hey,

Ok I am pretty new to as3, I am wanting to load in some images that each have their own event listener so the user can interact with them.

I can load the images fine using


ActionScript Code:
imgLoader.load(imgURL);
imgLoader.x = imgPosX;
imgLoader.y = imgPosY;
imgLoader.scaleX = imgScale;
imgLoader.scaleY = imgScale;
imgLoader.rotation = Math.floor(Math.random()*360);
imgLoader.filters = [ filter ];

if I then use "addChild(imgLoader);"....the image appear ok....however my attempt at being able to add listeners to each one individually is done using:


ActionScript Code:
var _mc:MovieClip = new MovieClip;
           
_mc.addEventListener (MouseEvent.MOUSE_OVER, imgOver);
_mc.addEventListener (MouseEvent.MOUSE_OUT, imgOut);
_mc.addEventListener (MouseEvent.MOUSE_DOWN, imgDown);
           
_mc.addChild(imgLoader);

And I get no visual output on stage.

Any thoughts greatly appreciated.

Thanks

XML Random Image Loader
Hi all,

Basically, I am trying to create a banner for the top of the page and it will be displaying random images. I have it reading from the xml file like it should but I can not get the images to display. I am posting what I have and I know works although it's probably not the best way to do it. I pieced together everything I have from other scripts. I spent 4 hours or so yesterday googling and came up empty handed so I am here to ask for help.

We got a template and it came with a flash header and so I am trying to keep the same options as before but right now if I can get the images to display I will be happy. I will work on the random and transition and timer later. ( Most likely you will see me again for that stuff )

The flash has an image I imported to library and it is the background image for the whole movie. On the right side of the stage is where I want the images to display. Again, still have to figure out the best way to get the images to scale. I know they should have a height of 220px and the width needs to be proportional to that. ( might just have to resize in photoshop )


HTML Code:
<?xml version="1.0"?>

<jpgrotator>

<parameters>
<rotatetime>3</rotatetime>
<randomplay>true</randomplay>
<shownavigation>false</shownavigation>
<transition>blocks</transition>
</parameters>

<photos>
<photo path="header1.jpg"/>
<photo path="header2.jpg"/>
<photo path="header3.jpg"/>
<photo path="header4.jpg"/>
<photo path="header5.jpg"/>
<photo path="header6.jpg"/>
</photos>

</jpgrotator>
I tried using the createEmptyMovieClip() but I could not get it to work.


ActionScript Code:
Actions for Frame 1 of Layer Name Layer 2

function processXMLData(success) {
    if (success) {
        var count = this.childNodes[0].childNodes[1].childNodeslength;
        for (var i = 0; i<count; i++) {
            myImage = this.childNodes[0].childNodes[1].childNodes[i].attributes.path.toString();
                image_mc.loadMovie( myImage ); //This is 3rd Edit fix
        }
        } else {
        content = "No Pictures found, try back later!";
    }
}

this.createEmptyMovieClip("image_mc", 0); //This is 3rd Edit fix
var xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = processXMLData;
xmlData.load("photos.xml");
stop();

Edit:
Removed the flash stuff for now. Will try to repost soon after I swap out somethings.

Edit 2: Using Macromedia Flash MX - 6.0 I believe. I am not sure if I am using AS 2.0 or not but I believe I am. ******* Got moved so I guess I'm using 1.0 or below ********

Edit 3: Got it to show *a* picture. I am wondering if it's looping to fast for the other pictures or too fast I can see. Need a timer or figure a way to test to see if it loaded the image all the way.

Loader Flashing Before Each Image
I have a simple photo slideshow. It works but between each new photo the stage flashes. I just want it to be smooth. Why is that?


ActionScript Code:
var pic:Loader;
var file:URLRequest;
var xmlData:XML;
var picLoader:URLLoader = new URLLoader();
var images:String;
var changeImage:Timer;
var numberImages:Number;
var currentCount:Number;
var i:Number;
var autoplay:Boolean;
var message:TextField;

autoplay = false;
currentCount = 0;

stage.stageWidth = 100;
message = new TextField();
message.x = stage.height / 2;
message.y = stage.width / 2;
message.border = true;
message.borderColor = 0x0e00e0;
message.width = 200;
message.x = stage.stageWidth / 2;
message.y = stage.stageHeight / 2;
addChild(message);

var nextImg:Sprite = new Sprite();
nextImg.graphics.beginFill(0x000000);
nextImg.graphics.drawRoundRect(50, 300, 50, 30, 20);
nextImg.alpha = .5;
addChild(nextImg);

nextImg.hitArea = nextImg;

pic = new Loader();
addChild(pic);

if (autoplay == true)
{
autoPlayIt();   
}
else
{
message.text = "Click to start slideshow";
var square:Sprite = new Sprite();
square.graphics.beginFill(0xCCFF00);
square.graphics.drawRect(0, 0, 480, 360);
addChild(square);
setChildIndex(square, 0);
setChildIndex(message, 1);

square.hitArea = square;
square.addEventListener(MouseEvent.CLICK, autoplaySetTrue);
}

function autoplaySetTrue(event:MouseEvent):void
{
    autoplay = true;
    autoPlayIt();
}
function autoPlayIt():void
{
picLoader.addEventListener(Event.COMPLETE, LoadXML);
picLoader.load(new URLRequest("slideshow.xml"));
}

function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
images = xmlData.stuff.image[0];
playShow(images);
numberImages = xmlData.stuff.image.length();
}

function playShow(XML):void {
file = new URLRequest(images);
pic.load(file); 
currentCount = 1;
changeImage = new Timer(2000);
changeImage.addEventListener("timer", pictureCount);
changeImage.start();

}

function pictureCount(event:TimerEvent):void
{   
if (currentCount == numberImages) {
        trace("loop it again");
        currentCount = 0;
    }
   
    currentCount++
    trace(currentCount);
    images = xmlData.stuff.image[currentCount-1];
    file = new URLRequest(images);
    pic.load(file);
}
function nextImage(event:TimerEvent):void
{
    for (var i = 0; i < numberImages; i++){
    trace("hi");
    //for (var i = 0; i < numberImages; i++){
    //trace(xmlData.stuff.image[i]);
}
}

Image Loader And BMP Files
Hi people,

Is there any reason that when i try to dynamically load images into flash movie with the contentPath pointing to a .BMP file that nothing shows up unless it's a jpeg or .gif?

Also some jpegs on our system will not show either - they show up in I.E and in windows image preview but not in Flash and photoshop returns an error on them too?

Thanks for any advice!!

XML Image Loader HEELLLPPPP
Hi i've got 2 add some text in an xml image loadre movie. Explanation: I've got my list already listing my category products. All i'want to add is a description intext of each image when i click on a category. In my fla i've got this code :

import mx.controls.List;


var imagesLoaded:Array = [];

myLoaderListener = new Object();

myLoaderListener.complete = function ( eventObject )
{
var target = eventObject.target;
imageProgress._visible = false;
var imageUrl = target.getContentPath();

var len = imagesLoaded.length
for (var i = 0; i < len; i++) {
if (imagesLoaded[i] == imageUrl) {
return;
}
}
imagesLoaded.push(imageUrl);
}


imageLoader.addEventListener("complete", myLoaderListener);

myImageListChangeListener = new Object();
myImageListChangeListener.change = function (eventObject)
{
var list:List = eventObject.target;
var index:Number= list.getSelectedIndex();

if (index == undefined) {
imageProgress._visible = false;
return;
}
var imageUrl = list.getSelectedItem().jpegURL;
var len = imagesLoaded.length;
for (var i = 0; i < len; i++) {
if (imagesLoaded[i] == imageUrl) {
return;
}
}
imageProgress._visible = true;
}
image_lst.addEventListener("change", myImageListChangeListener);

image_con.trigger();


and my xml reads

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Slides>
<slideNode jpegURL="images/image1.jpg">A sea horse</slideNode>
<slideNode jpegURL="images/image2.jpg">Sea anemone</slideNode>
<slideNode jpegURL="images/image3.jpg">Sardines!</slideNode>
<slideNode jpegURL="images/image3.jpg">Sardines!</slideNode>
<slideNode jpegURL="images/image3.jpg">Sardines!</slideNode>
<slideNode jpegURL="images/image3.jpg">Sardines!</slideNode>
<slideNode jpegURL="images/image4.jpg">Another sea horse</slideNode>
<slideNode jpegURL="images/image5.jpg">Some kind of jellyfish</slideNode>
</Slides>


I'm uploading the swf and the xml, the fla being 2 big. Hope u'll understand

ThnzX

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