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




Preload Xml Slideshow (from Tutorial)



Hello everyone First of all, I'm a noob, so please forgive me, if that's a simple task, but I just couldn't find a solution so far: I'v made a slideshow, step by step, with the kirupa tutorial. It works, but the preloader bar appeares before every single image. What I'd actually like to have is one preloader, which loads every image that is referenced in the xml file, before the first image gets loaded. That way one would only see one preloader before the whole slideshow starts and with that the slideshow would be even smoother, without breaks. Here's my Actionscript: delay = 4000; function loadXML(loaded) { if (loaded) { xmlNode = this.firstChild; image = []; description = []; total = xmlNode.childNodes.length; for (i=0; i<total; i++) { image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; } firstImage(); } else { content = "file not loaded!"; } } xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load("images_slideshow.xml"); ///////////////////////////////////// listen = new Object(); listen.onKeyDown = function() { if (Key.getCode() == Key.LEFT) { prevImage(); } else if (Key.getCode() == Key.RIGHT) { nextImage(); } }; p = 0; this.onEnterFrame = function() { filesize = picture.getBytesTotal(); loaded = picture.getBytesLoaded(); preloader._visible = true; if (loaded != filesize) { preloader.preload_bar._xscale = 100*loaded/filesize; } else { preloader._visible = false; if (picture._alpha<100) { picture._alpha += 10; } } }; function nextImage() { if (p<(total-1)) { p++; if (loaded == filesize) { picture._alpha = 0; picture.loadMovie(image[p], 1); desc_txt.text = description[p]; picture_num(); slideshow(); } } } function prevImage() { if (p>0) { p--; picture._alpha = 0; picture.loadMovie(image[p], 1); desc_txt.text = description[p]; picture_num(); } } function firstImage() { if (loaded == filesize) { picture._alpha = 0; picture.loadMovie(image[0], 1); desc_txt.text = description[0]; picture_num(); slideshow(); } } function picture_num() { current_pos = p+1; pos_txt.text = current_pos+" / "+total; } function slideshow() { myInterval = setInterval(pause_slideshow, delay); function pause_slideshow() { clearInterval(myInterval); if (p == (total-1)) { p = 0; firstImage(); } else { nextImage(); } } } Is anyone out there who can help me with a Actionscript, that would make that happen? Please?! What would be even greater is a preloader, which loads the whole website even - namely the slideshow and some buttons. My websites is basically a set of some buttons and a MC frame in which a slideshow should appear right away without any clicking. So what would be cool, is if the first thing the user sees would be a preloader, and after that is completed, the whole site starts, with the slideshow already preloaded. Here's an example, of how it should look like: http://www.theimageisfound.com/portrait/ (1. preloader 2. a slideshow right away, without any breaks between the showed pictures) Thanks for some insight :-). Romanoff



KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 07-14-2008, 03:20 PM


View Complete Forum Thread with Replies

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

How To Preload MX Slideshow
I have a problem, I want the standard flash MX slideshow to get its pictures (jpg) to load from a webserver and preload them before it shows even one picture...

So if there are 8 jpg pictures I want them to load all 8 pictures before it shows the slideshow...

Next is that I want that I the script (slideshow) to read its number of jpg pictures from a txt file.

So in the txt it says number of pics to be loaded in the slideshow...

The script..............

// initialize variables and properties
square._alpha = 0;
whichPic = 1;
// initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<8 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};
back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("http://www.4futuremedia.com/10/Impact4U10/hex"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>8) {
input = 8;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};

Preload Slideshow?
I am making a photography site and when the user clicks "slideshow" in the main navigation I want it to preload slideshow.swf and then load it into a emptyMC on the stage, but I also want it to preload the jpg's that slideshow.swf will dynamically display as the user flips through the slideshow. So, im assuming that what i need to do is have the preloader load slideshow.swf and all the photos, but not display the photos yet. Can someone help me out with the actionscript for this?

I also want a frame to dynamically resize to fit each photo, but ill worry about that later.

THANKS!

Slideshow Preload Flash 5
Hi all,
I desperately need to create a simple slideshow that streams over the web for a client. I've researched this subject quite a bit on the forums but need some clarification.

Here's a description of my slideshow.
1. Basically a powerpoint conversion with 40 slides.
2. simple one frame animations (eg. bullets appear) synced to voice over.
3. Each slide (voice over plus graphics) is about 100k. 4MB total
4. Flash 5

My Dilemma:
I basically wasted 2 days assuming that scenes would load on the web the way they do when you test the movie in flash. I was wrong. So now I'm debating over loading external swf's or just using one big movie with preloading.

If I use one swf to hold all 40 slides (slide 1 on frame 10; slide 2 on frame 20; and so on to frame 400), does all the audio load before the movie will start? Or can I set up a series of preloaders to allow slide one to start while loading latter slides sequencially? I would prefer to use embedded audio(where you see it on the timeline), but I am willing to use "Linkage" if that's the only way.

If I use 40 external swfs, will I need to load each swf when the user gets to it? Or can I preload up to 40 swfs? Remember, none of my animation tweens. Only a simple timer that occationally tells playhead to move one frame.

Any help is greatly appreciated. I appologize if this has been repeated but I couldn't find the answer and I'm hurting for time.

Thanks, Joe

XML Image Slideshow Preload?
Hey All,

I have built an image slide show [insert lame joke here] very similar to that found at.....

http://www.slideshowpro.net/

How do you all figure this application loads the images?

I have 90+ images fed by an xml reference but on the first load they all take sometime. I have one movieclip holder the images are loaded into. Is this the approach?

I could also see duplicating this clip into levels that would reside under each other so the next image could load while the first is displayed.

Any thoughts here?

As always any help here would be fanfriggintastic!
cheers
-jub-

[CS3] Preload Images In A Slideshow Using XML
Hello,

i am building a website where i use a slideshow in flash. I load the pictures into a movieclip in flash using XML. It all works, but it is a bit slow, because the images is not loaded until the user hits the next button. So I wonder if its possible to change my AS in flash to make it load the next image while the user looks at the first picture? I would be very glad if someone could help me with this. Please see my code below:

images_xml = new XML();
images_xml.onLoad = startImageViewer;
images_xml.load("xml/images.xml");
images_xml.ignoreWhite = true;

function startImageViewer(success) {
if (success == true) {
rootNode = images_xml.firstChild;
totalImages = rootNode.childNodes.length;
firstImageNode = rootNode.firstChild;
currentImageNode = firstImageNode;
currentIndex = 1;
updateImage(firstImageNode);
}
}

function updateImage(newImageNode) {
imagePath = newImageNode.attributes.imgURL;
targetClip.loadMovie(imagePath);
imageCount = currentIndex+" / "+totalImages;
}

next_btn.onRelease = function() {
nextImageNode = currentImageNode.nextSibling;
if (nextImageNode == null) {
break;
} else {
currentIndex++;
updateImage(nextImageNode);
currentImageNode = nextImageNode;
}
};

back_btn.onRelease = function() {
previousImageNode = currentImageNode.previousSibling;
if (previousImageNode == null) {
break;
} else {
currentIndex--;
currentImageNode = previousImageNode;
updateImage(previousImageNode);
}
};

Preload Images For My Slideshow
Hey,

I'm working on this slideshow forever and I really don't know how to preload all my images so my slideshow runs smoothly. Right now the first cycle doesn't fade in, but just appears. The second run runs nicely because the images are loaded. Can somebody help me out with my script?

Thanks a whole lot!!!


Code:
////////////////// doSlideShow() ////////////////////
totalSlides = slideXML.firstChild.childNodes.length;
mcSlideShow = slideShow.imgHolder;
this.onEnterFrame = function() {
if (mcSlideShow._alpha<100) {
mcSlideShow._alpha += 3;
}
}

function showSlideShow()
{
// var slideshow Holder
mcSlideShow._x = -2;
mcSlideShow._y = -2;
var totalSlides = slideXML.firstChild.childNodes.length;

if(initSlideShow==1)
{
mc._alpha = 0;
if(intCounter++ >= 30)//25
{
if((newImageId + 2) > totalSlides)
{
newImageId = 0;
} else {
newImageId++;
}

mcSlideShow._alpha = 0;
//mcSlideShow.loadMovie(image[p]);
mcSlideShow.loadMovie("images/slideshow/"+slideXML.firstChild.childNodes[newImageId].childNodes[0]);
intCounter = 0; // reset internal counter


fileName = slideXML.firstChild.childNodes[newImageId].childNodes[0];
}
} else {
// default
mcSlideShow._alpha = 0;
mcSlideShow.loadMovie("images/slideshow/"+slideXML.firstChild.childNodes[0].childNodes[0]);
initSlideShow = 1;

// preload images
for(var x=1;x<totalSlides;x++)
{
// import all images to unknown location
this["preload"+x].loadMovie("images/slideshow/"+slideXML.firstChild.childNodes[x].childNodes[0]);
}

// DEBUG
fileName = slideXML.firstChild.childNodes[0].childNodes[0];
}

// DEBUG
testSlideshow = "slide number: "+intCounter;
testSlideshow = testSlideshow+"
slide name: "+fileName;
testSlideshow = testSlideshow+"
newImageId: "+newImageId;
}


////////////////// loadSlideXML() ///////////////////
function loadSlideXML(){

// loadHandler
loadHandler = function(EOF){
if(EOF){
// showSlideShow
setInterval(showSlideShow, 500);
//showSlideShow();
} else {
trace("Could not load slideshow.xml");
}
}

// loadVars
slideXML = new XML();
slideXML.ignoreWhite = true;
slideXML.load("scripts/showSlideShow.php");
slideXML.onLoad = loadHandler;
}

Preload Slideshow Pro Component
Hello everyone,

I am working on a very basic custom slideshow (from slideshow pro) for our site and am hoping that one of you out there will be able to help with integrating a preloader. An example of the page can be seen here (http://www.molodesign.com/en/products/soft/softwall/paper-demo.html).

Here is my difficulty... we would like to have all of the images in the XML document preload while a percentage bar fills up, noting the progress of the slideshow. I understand how to preload the component and the XML document itself but not the actual images that are reference within it.

Any help that you can send my way would be great!! Thanks!

Anna

XML Preload/Slideshow Challenge
I know this has been asked and asked, but I honestly browsed all the xml preload tuts and forum topics and cant find my specific answer.

I have an xml file, that lists all the pictures in my slide show on my site.

The flash loads them into the movie per request. I want to display a preload each time a new image is brought in displaying bytes loaded and bytes total as thier is a delay on dial up. Also, i can only browse through the pictures from start to finish, but at the last picture, it wont go back to #1.

This would help me so much in understanding preload, and if you know how to go back to pic #1 or call out thumbnails and link to any picture within the xml that would be a bonus.

I have attached the files. THANKS IN ADVANCE.

P.S. The working model is www.redmondent.com/products.htm
The source link is www.redmondent.com/ftp/
(the file is "slides.zip" and contains the swf, fla, and xml files)

XML Preload/Slideshow Challenge
I know this has been asked and asked, but I honestly browsed all the xml preload tuts and forum topics and cant find my specific answer.

I have an xml file, that lists all the pictures in my slide show on my site.

The flash loads them into the movie per request. I want to display a preload each time a new image is brought in displaying bytes loaded and bytes total as thier is a delay on dial up. Also, i can only browse through the pictures from start to finish, but at the last picture, it wont go back to #1.

This would help me so much in understanding preload, and if you know how to go back to pic #1 or call out thumbnails and link to any picture within the xml that would be a bonus.

I have attached the files. THANKS IN ADVANCE.

P.S. The working model is www.redmondent.com/products.htm
The source link is www.redmondent.com/ftp/
(the file is "slides.zip" and contains the swf, fla, and xml files)

How Do I Preload All My Images In My Slideshow (their Lagging)
I have a large slideshow its about 25mb now, Im wondering how I can "load" all the images, when you open programs, usually, they take like "20" seconds, and they load, and it preloads all the images or something, so the first time you click on an image / hold mouse over, it doesn't lag... and go really slow

how do I do this?

Ideas Needed: Slideshow With 1 Preload
Hi guys,

I went through Kirupa's slideshow tutorial , pretty neat and very similar to something i've been working on. Just one annoyance with both my slideshow and kirupa's, the user has to wait for each image to preload as the slideshow goes through the first time...I am trying to get my head around how to successfully implement one preload at the start for ALL slideshow images.

Anyone have any ideas on how to do this??? I've included my file below


ActionScript Code:
#include "as/movieclip_lib.as"#include "mc_tween2.as"var delay = 3000;//pause b/w slides (in milliseconds)var curImage = 0;//keeps track of current slidevar curInterval = 0;//int id for current intervalfunction loadSlideshow(success) {    if (success) {        slideshow_xmlnode = this.firstChild;        directory = this.firstChild.attributes.directory;        image_array = [];        title_array = [];        var totalSlides = slideshow_xmlnode.childNodes.length;        for (var i = 0; i<totalSlides; i++) {            image_array[i] = slideshow_xmlnode.childNodes[i].attributes.image;            title_array[i] = slideshow_xmlnode.childNodes[i].attributes.title;        }        loadImage(directory+"/"+image_array[0]);    } else {        trace("Error! File not loaded!");    }}function nextImage() {    clearInterval(curInterval);    if (curImage == image_array.length-1) {        //reset back to first image        curImage = 0;    } else {        curImage++;    }    loadImage(directory+"/"+image_array[curImage]);}function loadImage(image) {    var container = slide_mc.createEmptyMovieClip("container_mc", 0);    var img = container.createEmptyMovieClip("img_mc", 1);    var control = container.createEmptyMovieClip("control_mc", 2);    // preloader stuff    var preloader = container.attachMovie("preloaderClip", "preloader_mc", 3);    preloader._x = this._width/2-preloader._width/2;    preloader._y = this._height/2-preloader._height/2;    trace(preloader);    desc_txt.text = title_array[curImage];    img.loadMovie(image);    control.onEnterFrame = function() {        img._alpha = 0;        var bLoaded = img.getBytesLoaded();        var bTotal = img.getBytesTotal();        if (bLoaded>0 && bLoaded<bTotal) {            preloader.percentage_txt.text = Math.floor((bLoaded/bTotal)*100)+"%";        } else if ((bLoaded == bTotal) && (bTotal>4)) {            delete control.onEnterFrame;            removeMovieClip(preloader);            //img._visible = 1;            img.tween("_alpha", 100, 0.30000, "easeInCubic", 0, function () {                curInterval = setInterval(nextImage, delay);            });            trace("finished loading: "+image);        }    };}slideshow_xml = new XML();slideshow_xml.ignoreWhite = true;slideshow_xml.onLoad = loadSlideshow;slideshow_xml.load("slideshow/slideshow.xml");


NB: I'm using FMX04 but want the final output to be an AS 1.0 FP 6 file only.

Cheers, and thankyou in advance!

Xml/flash Slideshow Help. Preload Problems
Hey there everyone. I'm pretty new to all this and am trying to create a slideshow. I have followed the tutorial on this site which has been awesome but have a few questions. Help please!

1. I am trying to figure out how to get rid of the preloader that appears quickly in between the photos throughout the slideshow. I understand they have to load before they appear but I've seen slideshows where you don't see the preloader in between; it just goes from one image to another. Is this possible using the xml and flash communication implemented in the kirupa slideshow tutorial?

2. also... When I hit ctrl + enter to preview the .fla, the slideshow seems to work alright. But when I hit ctrl + enter twice the slideshow takes a long time to load and then stops completely after the first image is loaded.

any suggestions would be awesome. my brain is about fried!!! thanks a lot!

Preload All Slideshow Images In One Group Rather Than Individual
Is it possible to preload all images in the slideshow file without having to preload them individually.

Is this possible if so please let me know.

Trev

Xml And Slideshow Question - Preload Entire Image Collection Rather Than Individually
Hi

If I have my xml setup where it loads external jpgs, is there a way to preload the entire set rather than individually preloading single images.

Because its an automated animation I feel its best to preload them all rather than showing the preload bar for each image.

I understand that you can use

total = firstChildNode.childNode.length;

to determine the total amount of xml nodes, but cannot for the life of me figure out the way to preload the entire set.

Any help greatly appreciated.

T

Help With Preload Tutorial Here
Hey All,

I've been working with this tutorial and have gotten it to work for the most part:

http://www.kirupa.com/developer/mx/p...epreloader.htm

However the preload bar doesn't start until around 30%. After that, it works great. Is there any reason it wouldn't be displaying the bar right off the bat?

Any suggestions would be greatly appreciated.

Thanks.

The New Preload Tutorial
i tried this tutorial and it didn't really work for me.

it didn't show the loading. is there another way of preloading the swf?
or can it be done this way, have a normal preloading in front of the swf? will that work? for example, preloading the first page?

hope someone will understand me

Slideshow Tutorial
I'm just getting off the ground with Flash and only have experience with Sony Vegas. I want to be able to make a slide show of still-images to go with sound that I have pre-recorded...but am having issues with Flash because it is just so different from what I am used to. Are there any good tutorials out there that anyone could point me in the direction of in order to learn more about making a slideshow?

Integrating An XML And A Slideshow Tutorial
Hi, how would I integrate these two tutorials together on http://www.gotoandlearn.com?

Flash and XML - Slideshow
Scrolling thumbnail panel

Right now I'm kinda new to Ascript, so I have no idea how 1. I would get Flash to read from the XML and place the corresponding thumbnails on the Stage, and 2. How to expand the object to accomodate more pictures as they are added.

Would anyone like to help me on this? And for those of you who actually read my earlier post, I managed to solve the content not displaying problem: I loaded the text files from the main.swf instead of the externally loaded swfs, and they work fine now.

Slideshow Tutorial Needed - CS3 / AS2
Hey All... I've never built an XML slideshow before and my client wants something that functions very much like:

http://www.marc-cain.com

I'm no newbie... but as i've not touched XML slideshows before I was hoping someone could point me in the direction of the best tutorial... it would save me a few days head-scratchin' !!

Cheers for any help people...
Jimmy

Slideshow Tutorial Disaster
Hi everyone!

I just did the slideshow tutorial here on Kirupa.com, and well, all's not well.

Namely, the images appear in the lower-right hand corner of the screen while my "foward and back" buttons are in the middle, hapharzardlly overlapping part of the picture. The buttons should be under the movieclip. Any ideas?

Adjustments To Slideshow Tutorial
Hi, I'm trying to create a slideshow that allows the user and click left and right like on the tutorial on this site, but also to change the images periodically without user interaction. What code could I add to the actionscript for this http://www.kirupa.com/developer/mx/photogallery.htm to accomplish what I want?

Some kind of setinterval that calls one of the functions?

Photo Slideshow Using XML Tutorial
I really like this automated slide show tutorial using xml. However, I'm looking for help on why when using a modem connection the file loads the first image and stalls (out of the box, no modifications to the file at this point). I refresh the screen and it starts over and loads the first image and then the second image and stalls again. This stall occurs for each subsequent image until all images are loaded.



I did try adding a preloader function in the fla file ... I tired loading the images using a JavaScript array in the body of the html page.



I read all the optimization help file information and help on publishing settings. I tried various published settings with compression, with compression. Tried different fps settings etc. I'm using MX. Downloaded trial versions of MX 2004 and MX 2004 Professional and still not working, as I would like it to on dialups.



I have a similar version that is dynamically loading images but is using text files to load the variables. I am very interesting in this one because is uses xml. I tried clipping out the xml code and used it in my other file and I get the same result.



Little help please....

Flash Xml Slideshow From Tutorial
hello,
i just followed the tut fmx2004 about the slideshow, it is very good!
i just have one question : i would like the slideshow to be started by a click on a button (not run when loaded), and then run infinitly, how do I do that?
(i am in fmx)
thanx for your answers

Image Slideshow Tutorial
in the image slideshow tutorial

how are u supposed to host the file on the web?

u can host the movie file but how about the xml file

it says that the movie and the xml file should be in the same folder

but waht if u want to publish it on the web?

Question About The XML Slideshow Tutorial
Hey everyone,
I just got done with the tutorial for XML Slideshow that is on this site. Anyway, I messing with it a bit becuase i believe it will do exactly what I need it to do in just loading images and text.
But what I am having a hard time with is I am trying to get my XML to call a MP3 file and plug it in just as it does with the Images that it pulls.

Does anyone know how to do this?
I hope that makes sense.

Thanks!!

Kirupa XML Slideshow Tutorial
Hi
I recently used the Kirupa XML Slideshow tutorial:
http://www.kirupa.com/developer/mx2004/xml_slideshow.htm


I really loved this. However I now have a need to include another feature. I need to create a fade out/fade transition between the images as it cycles through the XML. At present the image just dissapears and a new one fades in, I need a transition between the two. I have played with the script but to no avail.


If you have any suggestions or any snippets of code I could just drop in to achieve this.
Thanks again for you help. Your website is great and I use it a lot.


Thanks


Dave

Slideshow Tutorial Disaster
Hi everyone!

I just did the slideshow tutorial here on Kirupa.com, and well, all's not well.

Namely, the images appear in the lower-right hand corner of the screen while my "foward and back" buttons are in the middle, hapharzardlly overlapping part of the picture. The buttons should be under the movieclip. Any ideas?

Adjustments To Slideshow Tutorial
Hi, I'm trying to create a slideshow that allows the user and click left and right like on the tutorial on this site, but also to change the images periodically without user interaction. What code could I add to the actionscript for this http://www.kirupa.com/developer/mx/photogallery.htm to accomplish what I want?

Some kind of setinterval that calls one of the functions?

Photo Slideshow Using XML Tutorial
I really like this automated slide show tutorial using xml. However, I'm looking for help on why when using a modem connection the file loads the first image and stalls (out of the box, no modifications to the file at this point). I refresh the screen and it starts over and loads the first image and then the second image and stalls again. This stall occurs for each subsequent image until all images are loaded.



I did try adding a preloader function in the fla file ... I tired loading the images using a JavaScript array in the body of the html page.



I read all the optimization help file information and help on publishing settings. I tried various published settings with compression, with compression. Tried different fps settings etc. I'm using MX. Downloaded trial versions of MX 2004 and MX 2004 Professional and still not working, as I would like it to on dialups.



I have a similar version that is dynamically loading images but is using text files to load the variables. I am very interesting in this one because is uses xml. I tried clipping out the xml code and used it in my other file and I get the same result.



Little help please....

Dynamic Slideshow Tutorial
I am new to flash and I want to make a dynamic slideshow.

Can someone link a good tutorial?

here is an example of what I want to do...

http://www.corinnemartin.com/

Lee's XML Basics Slideshow Tutorial
Hi,
I've just practiced Lee's xml basic sldeshow tutorial,
the problem I have is that, when I get to the last picture and I click on the next button , it doesn't jump to the first picture, and vise versa for the first pic,
can anyone help me out on that please ?
Thanks...

Where Is XML Image Slideshow Tutorial?
I'm looking for the XML SLideshow tutorial for images. It seems it's not available anymore. Anyone know where I can find one?

Percentage Preload And Transition Tutorial
Is it possible to apply a preloader with a progress bar and the percentage display on the transition effect instead of just having a animation and "loading".
I'm using a modified version a tutorial i found here, here's the code of the preloader :

ActionScript Code:
bytes_loaded = Math.round(this.getBytesLoaded());bytes_total = Math.round(this.getBytesTotal());getPercent = bytes_loaded/bytes_total;this.loadBar._width = getPercent*this.loadBarBorder._width;this.loadText = Math.round(getPercent*100)+"%";this.loadingClip.gotoAndStop(Math.round(getPercent*19)+1);if (getPercent == 1) {    this.gotoAndStop(3);}


My question is where to put this script and the preloader animation
Here's the two files (i'll put them into file) :

Senocular Preload Image Tutorial
Hi

I just tried to add a previous image button in this tutorial. But that attempt failed.

This is the url

http://www.senocular.com/flash/source.php?id=0.132


This is the code


Code:
// baseurl to use to locate images based on SWF url not HTML url
var baseurl = _url.substr(0,_url.lastIndexOf("/")+1);
// create and position empty clips for images
// one for visible image, one which will be
// used for preloading the next image
this.createEmptyMovieClip("one",2); // on top
this.createEmptyMovieClip("two",1);
one._x = two._x = 20;
one._y = two._y = 20;
// clips represents the clips with images
clips = [
one,
two
];
timeline = this; // allows reference to timeline from other clips
// images is an array of the names of the images being used
// this is for file referencing as well as status display
images = [
"lodge",
"ballet",
"chess",
"spinners",
"tennis",
"tribe"
];
// GetFileFor returns the file path for an image
// given its name
function GetFileFor(name){
return baseurl+"preloadnextimage/"+name+".jpg";
}
// Preload checks to see if a clip has been loaded
function Preload(clip){
var lod = clip.getBytesLoaded();
var tot = clip.getBytesTotal();
if (lod && tot){
var percent_loaded = lod/tot;
progress_mc._xscale = 100* percent_loaded;
if (lod == tot){
status_txt.text = "Preloading complete for "+images[0];
return true; // is complete
}
}
return false; // is not complete
}
// PreloadNext is used as an onEnterFrame event
// to check the loading of the current image and
// reorders the arrays so that the first element
// now represents the next image/clip
function PreloadNext(){
var is_complete = Preload(clips[0]);
if (is_complete){
clips.push(clips.shift()); // shift order of arrays
images.push(images.shift());
delete this.onEnterFrame;
}
}
// FirstLoad is like PreloadNext but loads the first image
// adding in a status message otherwise handled by the next button
// and starting the second image to load when complete.
function FirstLoad(){
var is_complete = Preload(clips[0]);
if (is_complete){
clips.push(clips.shift());
images.push(images.shift());
clips[0].loadMovie(GetFileFor(images[0]));
status_txt.text = "Preloading "+images[0];
this.onEnterFrame = PreloadNext;
}
}
// next_btn.onPress shows the next image if preloaded and starts
// preloading the next one using PreloadNext as an onEnterFrame event
next_btn.onPress = function(){
if (this.onEnterFrame){
status_txt.text = "Please wait for "+images[0]+" to complete";
return false;
}
clips[0].swapDepths(clips[1]); // move preloaded image to top
clips[0].loadMovie(GetFileFor(images[0]));
status_txt.text = "Preloading "+images[0];
timeline.onEnterFrame = PreloadNext;
}
// initiate loading of first image
clips[0].loadMovie(GetFileFor(images[0]));
status_txt.text = "Preloading "+images[0];
this.onEnterFrame = FirstLoad;
Any help will greatly appreciated

Percentage Preload And Transition Tutorial
Is it possible to apply a preloader with a progress bar and the percentage display on the transition effect instead of just having a animation and "loading".
I'm using a modified version a tutorial i found here, here's the code of the preloader :

ActionScript Code:
bytes_loaded = Math.round(this.getBytesLoaded());bytes_total = Math.round(this.getBytesTotal());getPercent = bytes_loaded/bytes_total;this.loadBar._width = getPercent*this.loadBarBorder._width;this.loadText = Math.round(getPercent*100)+"%";this.loadingClip.gotoAndStop(Math.round(getPercent*19)+1);if (getPercent == 1) {    this.gotoAndStop(3);}


My question is where to put this script and the preloader animation
Here's the two files (i'll put them into file) :

Advanced Slideshow/Gallery Tutorial?
Hi there,

I'm looking to create a swf similar to the ones on the home pages of Futureshop and Bestbuy. I've been searching all over the internet but can't find exactly what I'm looking for. If anyone can guide me to a tutorial I would appreciate it very much.

Basically I'm looking to have 4-5 images in a slideshow, but I can also click little buttons (not thumbnails) that can jump to any of the images in the slideshow and after jumping to an image the slideshow will still be working.

Please let me know if you know what this is called or if you know a tutorial. I've been searching variations of "looping gallery" "looping slideshow" "slideshow with buttons" to no avail.

Thanks!

(btw if I build this with AS3 do I have to worry about lots of viewers not being able to see it because they have older flash players?)

Problem Following Basic Slideshow Tutorial
I'm using the trial of Flash 8 professional, and following this tutorial: http://journalism.berkeley.edu/multimedia/tutorials/flash/slideshow.html

Unfortunately on the section titled "Set the pattern of the fade" I can only find Color Mixer and Color Swatches, and if I sent anything like Stroke Color to Alpha 1% nothing happens (the images do not disappear as the tutorial says they should).

I cannot find any pull down menu called Color (other than the section of the pallete that contains Color Mixer and Color Swatches). Could the tutorial be referring to an older version of Flash? How is the same thing achieved in this version?

PS. I've noticed that selecting Window>Properties>Properties is ticked but doesn't do anything, and pressing Apple-F3 repeatedly doesn't make the slightest bit of difference. Is there some reason I cannot see this window?

When a 5-year old could create a photo slideshow with fancy transistions in iMovie with no problems, why is Flash so complicated? There seems to be a glaring hole in the market for an easy to use package for creating Flash files. Or is there already?





























Edited: 12/22/2006 at 02:17:12 PM by bilbo--baggins

I Need A Tutorial On How To Make A Photo Slideshow
A step by step way to make a basic flash slideshow. No knowledge of flash, just basics. KNow how to use Fireworks ect just not flash.

Slideshow With Kirupa XML Photogallery Tutorial?
Is there a way to add a button to the kirupa xml photo gallery tutorial that will perform a slideshow of the images?

Photo Slideshow Tutorial With XML Links?
Would it be possible to use the Kirupa tutorial on "Photo Slideshow Using XML and Flash" and incorporate a dynamic HTML link within the XML so the photos in the slideshow were clickable using Flash MX 2004?

Something like this:

function nextImage () {
if (p < (total - 1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie (image[p], 1);
picture_num ();
slideshow ();
picture.onRelease = function() {
getURL(link[p],"_blank");
};
}
}
}

And the XML looking like this:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>print/slide_1.swf</image>
<link>&quotehttp://www.somewebsite.com&quote</link>
</pic>

Photo Slideshow Tutorial - Bug In Script For MX?
hi Kirupa!

I love the Photo Slideshow using XML, and I am running into a bug which may be because I am using MX, and not MX2004. I downloaded the org FLA (MX version) and exported it, and its not working, so I know it has something to do w/ the source code.

It skips every other image when it autoplays, AND it does the same thing when you hit the previous and next buttons (for the non-auto play version). It only works properly when you use the arrow keys.

I have been trying to figure out why its not working to no avail. Please help!!

Slideshow Tutorial: Can I Fade The Pictures Out?
How difficult would it be to make the images fade out the same way they fade in?


Code:
delay = 10000;
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 5;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
slideshow();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
Any help is appreciated!

Fade Speed On Slideshow Tutorial
Self- explanatory...all I need to know is how to change the alpha fade in and out speed on the photo slideshow tutorial. Can't find it for the life of me...


Code:
delay = 5000;
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images/images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p],1);
desc_txt.text = description[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
slideshow();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}

XML Photo Slideshow Tutorial On This Site
I've used the XML Slideshow located here:

http://www.kirupa.com/developer/mx20..._slideshow.htm

i read the whole thing and did the easy cut and paste things to make it work. but i was wondering if anyone knew how to change this very slideshow so it preloads all images, not one at a time.

i want a slide show that rapidly changes the external images. once i go below 2 seconds, the images (currently 50kb-65kb) dont always load before moving to the next image, so it skips and moves on. plus it seems to reload them everytime. which crushes hopes of a "rapid-fire" slideshow. and i worry that users with slower connections wont see anything. so preloadering would solve everything.

i've studied this code for over a week. tried changing things and making hybrid actionscripts, but no luck. i just don't get this stuff.

-bb


i chose the coffee icon.

[Tutorial]How To Make A Dynamic XML Slideshow
http://joranbeasley.net//Tutorial/SLIDE2/slideShow.html

just finished putting this together lemme know what you guys think...

Good Tutorial For A Xml Slideshow With Captions?
Hey all,

I'm looking for a good tutorial or source file on how to create a dynamic xml slideshow with navigation and captions. The client also wants a "turning page" feature like what's seen here : http://www.entheosweb.com/Flash/flip...lbum/index.asp, but that's not really necessary. I'm mostlyl interested in bringing in the text and photos into a animated "template" and letting them control the content via a CMS that spits out XML.

Pretty much any slideshow with navigation and captions will do I think, as long as it's dynamic.

Just trying to see if anyone's already gone down this road and can point me in the right direction.

Photo Slideshow Tutorial With XML Links?
Would it be possible to use the Kirupa tutorial on "Photo Slideshow Using XML and Flash" and incorporate a dynamic HTML link within the XML so the photos in the slideshow were clickable using Flash MX 2004?

Something like this:

function nextImage () {
if (p < (total - 1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie (image[p], 1);
picture_num ();
slideshow ();
picture.onRelease = function() {
getURL(link[p],"_blank");
};
}
}
}

And the XML looking like this:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>print/slide_1.swf</image>
<link>&quotehttp://www.somewebsite.com&quote</link>
</pic>

Photo Slideshow Tutorial - Bug In Script For MX?
hi Kirupa!

I love the Photo Slideshow using XML, and I am running into a bug which may be because I am using MX, and not MX2004. I downloaded the org FLA (MX version) and exported it, and its not working, so I know it has something to do w/ the source code.

It skips every other image when it autoplays, AND it does the same thing when you hit the previous and next buttons (for the non-auto play version). It only works properly when you use the arrow keys.

I have been trying to figure out why its not working to no avail. Please help!!

Slideshow Tutorial: Can I Fade The Pictures Out?
How difficult would it be to make the images fade out the same way they fade in?


Code:
delay = 10000;
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 5;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
slideshow();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
Any help is appreciated!

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