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








Xml Driven Slideshow With Fade And Resize


i'm trying to build an xml driven slideshow w/resize. If I could target flash player 8 i would use the tween class and this would probaby be easier for me. at any rate I've got the basic function for resize working (haven't even started with the timer to control loading the next image, etc.) It seems to be resizing correctly but it get's jumpy at the very end of the resize. I'm not sure what's causing it but i think it may be the use of
Code:
math.abs
(?). If anyone could take a look that would be great! Also if you can point me in a better direction (if i'm only making trouble for myself doing it in this way) feel free!

thanks for any help!

(attached files are in Flash 8 but will have to target flash player 7 for this)

code:


Code:
spacing = 20;
containerMC._alpha = 0;
theFade=0;


imagesXML=new XML();
imagesXML.ignoreWhite=true;
imagesXML.onLoad=function(success){
if(success){
rootNode=imagesXML.firstChild;
totalSlides=rootNode.childNodes.length;
firstNode=rootNode.firstChild;
trace(firstNode.attributes.url);
loadClip(firstNode);









}
}
imagesXML.load("images.xml");



loadClip=function(nextNode){
container._alpha=0;
trace(nextNode.attributes.url);
container.loadMovie(nextNode.attributes.url);
_root.onEnterFrame = function(){
var bytesT = container.getBytesTotal(), bytesL = container.getBytesLoaded();
if (bytesT != 0 && Math.round(bytesL/bytesT) == 1){
var w = container._width + spacing, h = container._height + spacing;
trace("this is the width: "+w+" this is the height: "+h);
resizeMe(w, h);
delete _root.onEnterFrame;
}
}
}


resizeMe = function(w, h){
var speed = 11;

border.onEnterFrame = function(){
border._width += (w - border._width)/speed;
border._height += (h - border._height)/speed;

if( Math.abs(border._width-w)<1){
border._width = w+spacing/2;
border._height = h;
_root.container._x = border._x - border._width/2 + spacing/2 ;
_root.container._y = border._y - border._height/2 + spacing/2;
delete border.onEnterFrame;
_root.timerClip.gotoAndPlay("start");
}

}

};




ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-20-2006, 01:30 AM


View Complete Forum Thread with Replies

Sponsored Links:

Xml Slideshow With Resize And Fade (help Scotty)
i'm using the code from the best of kirupa thread about the gallery with resize.

it's working with what i've done with it so far but it's 'jerky' on resize. at the last point of the resize the frame clip jumps to the correct size. I can't seem to get a handle on why it does that.

at this point i'm using a simple clip to control the timing of the fade (if I could target fp 8, i would use the tween class and .onMotionFinished) so that there's a slight delay between the resize and the container clip fading in the image. IF somebody could give me a better method that would be great.

Also, for the loading of the subsequent images, i was planning on using some type of timer (maybe setinterval) to wait for 10 seconds or so until I call the next xml node and load the next image. If anyone can comment on which method is best for a timer situation like that it would also be greatly appreciated.

here's code and i'm attaching my .fla, xml and the first image (only working with that one at this point):

Code:
spacing = 20;
containerMC._alpha = 0;
theFade=0;


imagesXML=new XML();
imagesXML.ignoreWhite=true;
imagesXML.onLoad=function(success){
if(success){
rootNode=imagesXML.firstChild;
totalSlides=rootNode.childNodes.length;
firstNode=rootNode.firstChild;
trace(firstNode.attributes.url);
loadClip(firstNode);









}
}
imagesXML.load("images.xml");



loadClip=function(nextNode){
container._alpha=0;
trace(nextNode.attributes.url);
container.loadMovie(nextNode.attributes.url);
_root.onEnterFrame = function(){
var bytesT = container.getBytesTotal(), bytesL = container.getBytesLoaded();
if (bytesT != 0 && Math.round(bytesL/bytesT) == 1){
var w = container._width + spacing, h = container._height + spacing;
trace("this is the width: "+w+" this is the height: "+h);
resizeMe(w, h);
delete _root.onEnterFrame;
}
}
}


resizeMe = function(w, h){
var speed = 11;

border.onEnterFrame = function(){
border._width += (w - border._width)/speed;
border._height += (h - border._height)/speed;

if( Math.abs(border._width-w)<1){
border._width = w+spacing/2;
border._height = h;
_root.container._x = border._x - border._width/2 + spacing/2 ;
_root.container._y = border._y - border._height/2 + spacing/2;
delete border.onEnterFrame;
_root.timerClip.gotoAndPlay("start");
}

}

};

View Replies !    View Related
XML Driven Slideshow
Hi all. I need to make an XML driven slide show. The XML should contain the path name (of the jpeg), name and description (that shows in the swf movie, in the dynamic text box). Can anybody help me get started? Or maybe poitn me to a tutorial where I could learn? Please help guys I really need this. Thanks!

View Replies !    View Related
Xml Driven Slideshow Header
I need to develop a header for a web page that has image slides that fade from one to the next. Each slide will have the photographers name that also fades in and out with each slide. I don't need any controls or interaction but I do need to control everything with XML so non developers in our team can manage which images are displayed in the header. The XML will point to an image directory and have photographer text node (perhaps colour of text).

I was hoping to include some kind of preloading buffer so any loading of the images is disguised gracefully (ie: an image holds until the next is loaded before fading out). I am a designer not developer so was hoping someone could point me to a resource or book that will help me get started?

View Replies !    View Related
XML Driven Random Slideshow.
Hi I am new to these forums and to Flash as well, pretty much. This seems to be about the best online community for flash that I have found. This is a great community. I did the Carousel tut, it was a great tutorial and Lee makes everything so easy to understand and grasp. I really like the concept of things being controlled by xml. I am currently working on a project where I would like to have an area where photos randomly fade in, stay for maybe 4 or 5 seconds and fade out to be replaced by a new one. I need no controls, but I would like the flash to call the photos and a caption from the xml file. I have the xml file and an idea of how it should go, but I seem to be stuck at the starting gate. Maybe some of you could offer some insight. I hope this is possible and that it makes sense to all of you. Thanks in advance for all your help.

Noods-
http://www.danhigbie.com

View Replies !    View Related
Thumbnail Driven Slideshow...
I've successfully built a slideshow before, using Lee's "XML Driven Slideshow" tutorial, but would like to add a rollover feature using thumbnails.

Excuse my clunky description, but I'll try to articulate what I need as follows:

I'd like to make a Flash slideshow that has a large photo, accompanied by a grid of thumbnail photos. When I mouse over one of the small "thumb" photos, its accompanying "large photo" would appear in the main viewer window - and, so on for each thumbnail. In addition, each would have an accompanying text block description. Also, when I click on a thumbnail, on release it would hold that image in place in the large window until the next rollover. Pretty simple, right?

Any help would be appreciated much.

Thanks much for the brain power.

View Replies !    View Related
Dynamic Database Driven Slideshow
I am at a loss as to how to create a slideshow based on databse data.

I have a database with 100's of images each tagged to a specific partner (multiple images per partner). I want to create a flash file so that when a partner is clicked on (this part is all in HTML and PHP) it launches a popup window that holds a SWF which then loads in the correct partner images and creates a slideshow on the fly with nice fading transitions?

Any help would be greatly appreciated.

View Replies !    View Related
HomePage XML-Driven Slideshow With Thumbs
Hello!

I'm about at the intermediate level now of Flash. I have completed almost every tutorial known to man, with no flash/as background, but I am starting to get a hang of the code. I've sort of skipped a lot of important steps and went straight into learning the video aspects of flash, creating scrollpanes, custom video interfaces, etc. Now I'm going backwards to slideshows, which seem to have similiar concepts.

I'm looking to create a news-style home page photo/headline slideshow.

Example: www.mlb.com
1) Thumbnails below the main image drive the navigation. (Iunderstand how to create seek/skip buttons, these are an alternative option to the user to drive the nav).
2) There will be 5 thumbnails at all times sitting in the same location (static). No scroll panes, no mouseactivated scrolling.
3) Each thumbnail will highlight to show active.
4) Autoplay enabled at about a 7 second increment to go to the next thumbnail and display the next image.
5) Images/thumbnails arranged from newest to oldest (left to right).
6) XML-Driven if possible.

All I need help with is the actionscript. I know XML, I know how to design using the flash interface and how to link. I know how to add captions and all of that stuff. I just need some help with the base code for setting this thing up. I understand the thumnails will be movieclips, all instances will be named unique, how to set up the photoHolder, skip buttons etc. I know how to add rollover effects, how to label button states and call them, etc.

I've seen Lee Brimelow's tutorial on scrolling thumbnail pane slideshows, that as the users move scrolls over it, the thumbnails change. I dont need all of that.

Any help would be greatly appreciated.

Looking forward to a reply. Thanks!

View Replies !    View Related
Last Piece For: XML-driven, Timed Slideshow -- Help :)
I'm almost finished with an XML-driven, times slideshow I have to get done for work. I figured out the XML part and can generate the images and movieclips dynamically through AS just fine.

What I'm left with is trying to get a function to make each dynamically made MC fade after a given time. So, for example:

"pic1_mc._alpha" fades to 0 after a 5 second pause

I tried using this function I found on Flash Devils from our very own Ahmed: http://www.flashdevils.com/showthrea...hreadid=187044 / But it didn't quite work.

Attached is the the .fla and written the .xml below (you can't upload an .xml file), if anyone would care to take a look at it. It's due Wednesday of next week, so any help by then would be greatly appreciated.

KIRUPA is the best as always



XML

Code:
<pics>
<image title="pic1" sourceurl="image1.jpg" />
<image title="pic2" sourceurl="image2.jpg" />
<image title="pic3" sourceurl="image3.jpg" />
</pics>

View Replies !    View Related
XML Driven Auto Slideshow With No Buttons
I have been trying to get some help on this for a few days now. I am wondering how to create a very simple image slideshow where the images fade in on top of the previous and they are stored externally. I would like to preload the next image while the current one is displayed. Don't want any buttons or visible preloaders. Should be very simple for an actionscript guru.

Thank you for your time.

View Replies !    View Related
XML Driven Slideshow As Site Preloader
Hey All,

I'm a realtive newbie and this is my first call for help and I am in a Jam! We have been creating our company's website through a consultant. I design and he programs in Flex and it has been moving along well. But as many of you experinece the scope creeped and we hit a few bugs and the budget is toast and the consultant is onto his next gig tomorrow. The site is done, but folks here are really upset that there is a loading bar and expect me to fix it.

So our site app is a respectable 345kb, but I need a better preloader. My concept is to use a XML/Flash slide show as the preloader. Give 'em a little slide show to pass the time while our main site app loads. Once loaded shut it down and move on.

I have used the slideshow_as2.fla posted by others www.kirupa.com/forum/showthread.php?p=2211226 here as a standalone but I have no idea how to adapt it to serve as the preloader for our site. I know it is probably nobrainer for someone who knows what they are doing. The other catch is that is needs to load the our site app (main.swf) externally. We want to be able to tweak the slide show or change altogether without having to recompile the main app.

Anyone up for the challenge? You'll really be saving my bacon.

Rob

View Replies !    View Related
Help Me To Combine Two Scripts For A Thumbnail Driven Slideshow
I'm building a website with several galleries containing different sets of images. As this is for a friend who can barely use FTP client I decided to drop all the images in folders on a server and let him update folders content later on according to his needs. And then there are other considerations that basically force me to use thumbnails approach. I have two functions: loadGallery() and loadGallery2(). 1-builts a quick thumbnail "menu", 2-turns a thumb into a functional button. I would like to take gallery2() functionality and apply it to all the duplicated movie clips from function 1. Could someone help? Oh, the functions are called when playhead is being directed to frames labelled: gallery1, gallery2 etc. with this code attached to them:
code:
thumbFolder = "Thumbnails";
//source of the thumbs for a gallery. To make it even simpler actual images could be used as tumbs as well
imageFolder = "Images";
//source of the images
srcL = 13;
//number of images to be displayed
Thumbs = new Array();
for (i=0; i<srcL; i++) {
Thumbs[i] = [thumbFolder+"/thumb"+i+".jpg"];
}
gallery1 = new Array();
for (i=0; i<srcL; i++) {
gallery1[i] = [imageFolder+"/image"+i+".jpg"];
}
srcT = Thumbs;
srcI = gallery1;
srcL = Tumbs.length = gallery1.length;
loadGallery2();
stop();


and these are the functions:
code:
function loadGallery() {
var i:Number = 0, j:Number = 0, xDist:Number = 0;
// "j" is the number of thumbs contained in a folder "Thumbnails"
while (i<srcL) {
xDist = 60;
i++;
j = 0;
this.createEmptyMovieClip("thumb_mc", i);
thumb_mc._x = 50;
thumb_mc._y = 30;
duplicateMovieClip(thumb_mc, "thumb"+i+"_mc", i);
while (j<srcL) {
// move clip by one value of a "distance"
j++;
this["thumb"+j+"_mc"]._x = ((xDist*j)-srcL);
}
this["thumb"+i+"_mc"].loadMovie(srcT[i], ["thumb"+i+"_mc"]);
this["thumb"+i+"_mc"]._xscale = 100;
this["thumb"+i+"_mc"]._yscale = 100;
}
}


function loadGallery2() {
this.createEmptyMovieClip("thumb_mc", i);
this.thumb_mc.createEmptyMovieClip("thumbHolder_mc ", i);
thumb_mc._x = 50;
thumb_mc._y = 30;
this.thumb_mc.onRelease = function() {
_root.imageHolder_mc.loadMovie(srcI[1]);
trace("Thumb Clicked");
};
this.thumb_mc.thumbHolder_mc.loadMovie(srcT[1]);
}
gallery1_mc.onRelease = function() {
gotoAndStop(gallery1);
};

Any other suggestions to make these work smoothly will be appreciated.

View Replies !    View Related
Home Page XML-Driven Slideshow W/ Thumbs
Hello!

I'm about at the intermediate level now of Flash. I have completed almost every tutorial known to man, with no flash/as background, but I am starting to get a hang of the code. I've sort of skipped a lot of important steps and went straight into learning the video aspects of flash, creating scrollpanes, custom video interfaces, etc. Now I'm going backwards to slideshows, which seem to have similiar concepts.

I'm looking to create a news-style home page photo/headline slideshow.

Example: www.mlb.com
1) Thumbnails below the main image drive the navigation. (Iunderstand how to create seek/skip buttons, these are an alternative option to the user to drive the nav).
2) There will be 5 thumbnails at all times sitting in the same location (static). No scroll panes, no mouseactivated scrolling.
3) Each thumbnail will highlight to show active.
4) Autoplay enabled at about a 7 second increment to go to the next thumbnail and display the next image.
5) Images/thumbnails arranged from newest to oldest (left to right).
6) XML-Driven if possible.

All I need help with is the actionscript. I know XML, I know how to design using the flash interface and how to link. I know how to add captions and all of that stuff. I just need some help with the base code for setting this thing up. I understand the thumnails will be movieclips, all instances will be named unique, how to set up the photoHolder, skip buttons etc. I know how to add rollover effects, how to label button states and call them, etc.

I've seen Lee Brimelow's tutorial on scrolling thumbnail pane slideshows, that as the users move scrolls over it, the thumbnails change. I dont need all of that.

Any help would be greatly appreciated.

Looking forward to a reply. Thanks!

View Replies !    View Related
XML Driven Perpetual Scrolling Thumbnail Slideshow Questions
I'm setting this thread up to field questions or issues with a Multi-part tutorial I'm working on here:

viewtopic.php?p=14125#14125

The tutorial thread has been locked to keep it clean and not become a 48 page monster that would be no help to anyone.

View Replies !    View Related
Photo Slideshow - Fade Out/fade In (alpha) - Flash5
Hi all & merry Christmas

For a Photographers portfolio I want to create a fade-out/in effect for when people select one of the photos. All the photos are stored within one SWF.

So OnRelease the selected photo loads and a Var is set. The current photo is being set graduately to alpha 0% and the loaded new photo (which is a MC) is moved to the highest level while this one is being set immediately to alpha 100%.

If I think about it, what I need to code is...

- a var in which the current image is set
- a function which checks what image/mc is in the var
- a function which says something like this:
on release move new image to layer/level below current image (which is on toplevel) and set to 100% ;
set the current image (as set in var) gradually to 0% alpha
and as last move new loaded image to toplevel...

(all images would be put in an SWF which would be loaded into the main SWF)

unfortunately my AS knowledge is fairly limited, so I have no clue how to script this???

anyone an idea or possibly a tutorial which could sort me out???

thanks so much

View Replies !    View Related
Xml Slideshow Fade In And Fade Out Assistance (code Supplied)
Hi all,

Can someone help me out here - needing someone to point out (or offer!) the solution. I'm working with the following code, and want to have my slideshow images fade into each other. At the moment, the picture before, after it's reached its delay setting, just switches off and the next one fades in, meaning the background displays (which isn't desirable)

CODE BEGINS ------------------------------------------------------

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.xml");
listen = new Object();
listen.onKeyDown = function() {

if (Key.getCode() == Key.LEFT) {

prevImage();

} else if (Key.getCode() == Key.RIGHT) {

nextImage();

}

};
Key.addListener(listen);
previous_btn.onRelease = function() {

prevImage();

};
next_btn.onRelease = function() {

nextImage();

};
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();

}

function moveSlide() {

current_mc = _root.myClips_array[_root.target_mc];
new Tween(current_mc, "_alpha", Strong.easeOut, 100, 0, 1, true);

_root.target_mc++;

if (_root.target_mc>=_root.myImagesNo) {
_root.target_mc = 0;
}

_root.myText_txt.text = _root.myImages[target_mc].attributes.title;
next_mc = _root.myClips_array[_root.target_mc];
new Tween(next_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);

}

}

}


CODE ENDS ------------------------------------------------------




Any help, HUGELY appreciated

Thanks in advance

View Replies !    View Related
Photo Slideshow - Fade Out/fade In (alpha) - Flash
Hi all & merry Christmas

For a Photographers portfolio I want to create a fade-out/in effect for when people select one of the photos. All the photos are stored within one SWF.

So OnRelease the selected photo loads and a Var is set. The current photo is being set graduately to alpha 0% and the loaded new photo (which is a MC) is moved to the highest level while this one is being set immediately to alpha 100%.

If I think about it, what I need to code is...

- a var in which the current image is set
- a function which checks what image/mc is in the var
- a function which says something like this:
on release move new image to layer/level below current image (which is on toplevel) and set to 100% ;
set the current image (as set in var) gradually to 0% alpha
and as last move new loaded image to toplevel...

(all images would be put in an SWF which would be loaded into the main SWF)

unfortunately my AS knowledge is fairly limited, so I have no clue how to script this???

anyone an idea or possibly a tutorial which could sort me out???

thanks so much

View Replies !    View Related
XML-Driven Drop-Down Menu - Fade In Items?
Hi Guys,
Ive used the wonderful XML-Driven Drop-Down Menu tutorial to create a menu system, but I want to take the animation a step further by having each submenu item 'fade' in one after another.

Now im confortable with creating these tween using class's or the onEnterfram method ...but, I havent got a clue about how and where to implement this within the menu's current code.

Does any one have any suggestions????

Id really appreciate some guidence on this one.

Zaid

View Replies !    View Related
Slideshow Fade In Fade Out With Some Xml Added In
hi
i did a search in hopes that someone had answered this question. I managed to re-create a slideshow with xml following a tutorial at gotoandlearn. i'm trying to add in a fade in and fade out effect as the pictures cycle through. I tried doing it inside the movieclip itself but it doesn't seem to be working. What am I doing wrong? Can anyone point me in the right direction? Thanks

View Replies !    View Related
Auto Resize Photos In Slideshow?
I am creating a slideshow with many pictures and don't want to go through and resize each picture. How do I make it so the pictures get automatically formated to a particular size?

View Replies !    View Related
Slideshow With Fade Using AC
id like to be able to load a slide show of jpgs with a fade in and out transitions, it would be great also if you could click on the images and open them in a new window.
is there anyway of doing this with actionscript?

merci beaucoup
benji

View Replies !    View Related
AS2 - Fade Out In Used Slideshow
Hi,

I have adapted an excisting slideshow file which is xml based.
It is programmed this way so it would fade in each loaded jpg.

It would be great if somebody could help me out to make the loaded jpgs fade out as well before they are replaced by the new loaded ones.

in attachment my fla - made in flash CS 3 - use AS2.0

code used for your info:


Code:
slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("slides.xml");
slides_xml.ignoreWhite = true;


_root.attachMovie("back_btn", "back_btn", 5, {_x:227, _y:570});

_root.attachMovie("next_btn", "next_btn", 6, {_x:747, _y:570});




//
// Show the first slide and intialize variables
function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);

}
}
//
// Updates the current slide with new image and text
function updateSlide(newSlideNode) {
clearInterval(fader)
imagePath = newSlideNode.attributes.jpegURL;
slideText = newSlideNode.firstChild.nodeValue;
mc1.targetclip.loadMovie(imagePath);
mc1.targetclip._alpha =0
fader = setInterval (fade, 20, imagePath)
}

function fade () {
mc1.targetclip._alpha += 5
if (mc1.targetclip._alpha == 100) {clearInterval (fader)}
}

auto.onRelease = function () {
// Sl = currentSlideNode.nextSibling
updSlide = setInterval (nextSlide, 5000)
}



function nextSlide () {
SN = currentSlideNode.nextSibling;
if (SN == null) {
break;
} else {
currentIndex++;
updateSlide(SN);
currentSlideNode = SN;
}
}

// Event handler for 'Next slide' button
next_btn.onRelease = function() {
nextSlide()
};


// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
previousSlideNode = currentSlideNode.previousSibling;
if (previousSlideNode == null) {
break;
} else {
currentIndex--;
currentSlideNode = previousSlideNode;
updateSlide(previousSlideNode);
}
};



/*
//--------------------------------------------------------------------------
mc1.onEnterFrame = function () {

if (previousSlideNode == null) {
back_btn._visible = false;
}

else {
back_btn._visible = true;
}

//--------------------------------------------------------------------------

if (SN == null) {
next_btn._visible = false;
}

else {
next_btn._visible = true;
}

}
//--------------------------------------------------------------------------
*/
http://www.riverwoods.net/images/slideshow_04.fla

thanx,

View Replies !    View Related
Is It Possible To Fade-out A Slideshow?
A conceptual inquiry:

I'm planning on creating a slideshow with cross-fades.

I'll be placing this as a .swf (as a movie clip) in another .fla .

I'd like to be able to click a button in this new .fla and have the slide-show MC fade out independently of where this MC is in its timeline.

I'd also like to be able to do this on one frame (i.e., without having to add extra frames/outtros).

Since I'm basing this on a click of a button, I'm assuming I can't use an onClipEvent (enterFrame) {} as a loop for this.

Is there AS that will somewhat slowly, smoothly change the alpha on an MC or is there a way to create a loop that won't run so quickly as to "snap" the alpha from 100% to 0% faster than the eye can see?

View Replies !    View Related
Xml Slideshow Fade Out
Hello im new. Ive just completed the Kirupa XML Slideshow today and have it all working well. But i cant figure out how to fade out the previous image as the next image fades in.

Can Anyone help.

M


delay = 3000;
//-----------------------
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");
/////////////////////////////////////
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();
}
}
}

View Replies !    View Related
Image Gallery - Resize The Images, Not The Slideshow
I'm working on an xml driven flash website where clients can modify an xml file directly to change the appearance of the site (eventually i'll make a flash/php dashboard GUI). The site will have listings each with a photo.
I'm trying to find a way around having the clients have to crop images to thumbnail and enlarged view size themselves. In other words the images would be displayed scaled to fit within a movie clip. Does anyone know if this is even possible? It seems that an image is an image at its pixel dimensions and there's no real way around that...

I guess my target demographic is pretty tech savvy (relatively) and could probably crop images with a basic image editor... it would be nice to find them some kind of batch processor or something. Although at the most clients will probably only add five or ten listings a month or so. if anyone has any insight into this dilemma that would be appreciated!

View Replies !    View Related
Image Gallery - Resize The Images, Not The Slideshow
I'm working on an xml driven flash website where clients can modify an xml file directly to change the appearance of the site (eventually i'll make a flash/php dashboard GUI). The site will have listings each with a photo.
I'm trying to find a way around having the clients have to crop images to thumbnail and enlarged view size themselves. In other words the images would be displayed scaled to fit within a movie clip. Does anyone know if this is even possible? It seems that an image is an image at its pixel dimensions and there's no real way around that...

I guess my target demographic is pretty tech savvy (relatively) and could probably crop images with a basic image editor... it would be nice to find them some kind of batch processor or something. Although at the most clients will probably only add five or ten listings a month or so. if anyone has any insight into this dilemma that would be appreciated!

View Replies !    View Related
Slideshow Fade In And Fade Out
Hi All,

I have downloaded the photoslide show referencing the XML file, I'm want to add an effect so that when you click next or the slideshow automatically goes to the next photo, the previous photos fades out as well, while the current photo fades in. So basically fade in and then a fade out. Currently the tutorial has a fade in when you view the photo.

This has been bothering me for a while now.

Any help will be appreicated.

Thanks,
Key

Here's the code:
delay = 3000;
//-----------------------
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");
/////////////////////////////////////
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 += 5;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
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();
}
}
}

View Replies !    View Related
Slideshow Fade In And Fade Out
Hi All,

I have downloaded the photoslide show referencing the XML file, I'm want to add an effect so that when you click next or the slideshow automatically goes to the next photo, the previous photos fades out as well, while the current photo fades in. So basically fade in and then a fade out. Currently the tutorial has a fade in when you view the photo.

This has been bothering me for a while now.

Any help will be appreicated.

Thanks,
Key

Here's the code:
delay = 3000;
//-----------------------
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");
/////////////////////////////////////
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 += 5;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
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();
}
}
}

View Replies !    View Related
Add Fade In / Out To MX Slideshow Template?
Could anyone help me add fade in / out between slides when using the MX slideshow template. The template works great for automatically adding my 300 .jpg's, but I need a fade feature between automated slides and a music track as well.

Any help would be greatly appreciated. And if I posted this in an inappropriate place, many apologies.

Rev. Dave Arndt
St. Johns School

View Replies !    View Related
Fade Slideshow Component
I just got an extension for a fading slideshow and dont know how to get the images into it... anyone that can help me would be greatly appreciated.

View Replies !    View Related
Please Help Me Make My Slideshow Fade
I almost have this slideshow finished, it's finally working perfectly...but. I want the images to fade in and fade out when the "next, previous" buttons are pressed. Can someone help me figure this out? Below is the A.S. that I have so far:

stop();

var slideInfoLV:LoadVars = new LoadVars();
slideInfoLV.onLoad = function(success) {
if(success) {
slideCounter();
loadFrame();
} else {
frameNum.text = "Error";
}
}

slideInfoLV.load("vars/slide_info.txt");

var FrameNum = 0;

function loadFrame(){
_level0.myMCL.loadClip("images/image" + FrameNum + ".jpg", this.framesMC);
//---<this loads the text info for each image from a txt file>---\
//_level0.myLV.load("images/image" + curFrameNum + ".txt");\
}

function slideCounter(){
frameNum.text = "image " + (FrameNum + 1) + " of " + Number(slideInfoLV.totalFrames);
}

//--------------<nextSlideBtn>-----------------\
this.nextSlideBtn.onRelease = function() {
if (FrameNum < Number(slideInfoLV.totalFrames) - 1) {
FrameNum++;
} else {
FrameNum = 0;
}
loadFrame();
slideCounter();
}


//--------------</nextSlideBtn>-----------------\

//--------------<prevSlideBtn>-----------------\
this.prevSlideBtn.onRelease = function() {
if (FrameNum == 0) {
FrameNum = Number(slideInfoLV.totalFrames) - 1;
} else {
FrameNum--;
}
loadFrame();
slideCounter();
}
//--------------</prevSlideBtn>-----------------\

frameNum.autoSize = "center";
loadedInfo.autoSize = "right";
// -----------------<TextField.StyleSheet>---------------- \
/*var cssStyles:TextField.StyleSheet = new TextField.StyleSheet ();
cssStyles.load ("styles/styles.css");
cssStyles.onLoad = function (success) {
if (success) {
loadedInfo.styleSheet = cssStyles;
loadFrame();
} else {
loadedInfo.text = "There has been an error loading the requested information. Please contact the Webmaster and report your error.";
}
}
// -----------------</TextField.StyleSheet>---------------- \
*/


please ignore the lack of cleanliness in my coding, I tend to keep stuff in there just in case I need it later. Anyways, I don't want to start with fresh code so if there is any way of just inserting what I need I would be infinitely happy.

Thanks whoever

View Replies !    View Related
[F8] Simple XML Fade In/out Slideshow...HELP
Hey all, I've been googling for quite a while now and I just can't find a simple tutorial to make a xml flash slide show. I'm not looking for any advancing buttons to go to the next photo, just a little script that goes through the photos listed in an XML file. I would just like the photo to fade in from white to fade out to white and so on... Can someone help me out, Thanks!

View Replies !    View Related
[F8] Fade Out Question For A Slideshow
I was able to figure out how to control the fade in code for the images in this slideshow script but I can't figure out how to do a fade out. Any help would be very appreciated.

Thanks!

Here's the 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.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();

}

}

}

View Replies !    View Related
XML Slideshow-AS Fade, Needs Debugging
Okay, in this file I make a html enabled text box and make it a MC. I duplicate it, and then run a loop through my xml file (which holds jpg paths) to assign the current node value to the top MC and the next node value to the bottom MC. Then I fade the top MC and the process starts over. I have successfully tested all the things involved in this seperately, but nothing displays when I run it. I've debugged the code as much as I can, but by now I am too used to it to notice an error. If any of you can find it, I would appreciate it. In any case, feel free to use the completed file if you need an xml based slideshow, with efficient AS alpha fade transitions (with variable time between pics and time it takes to fade.)

Here is the code if you do not want to look at the file:

Code:
//START WITH EMPTY MOVIE CLIP NAMED "two"
//MC "one" is created on top of MC "two"
duplicateMovieClip ("two", "one", 1);
rootNode = new XML();
rootNode.ignoreWhite = true;
rootNode.load("home.xml");

rootNode.onLoad = function(success)
{
if (success)
{
// use firstChild to iterate through the child nodes of rootNode
_root.put1(rootNode.firstChild.nodeValue);
for (var node:XMLNode = rootNode.firstChild; node!= null; node= node.nextSibling)
{
node1=node.nodeValue;
node2=node.nextSibling.nodeValue;
if(node2!=null)
{
int1= setInterval(interval1,2000); //2 seconds
int2= setInterval(interval2,5000); //5 seconds
}
else
{
//I'll program the loop to start over here after I get it to work
}
}
}
}
//Assigns the nodeValue of the current "node" (a JPG path) to MC "one"
function put1(pic)
{
_root.one.txt.htmlText= "<img src='" + pic + "' hspace='0' vspace='0' >";
}
//Assigns the nodeValue of the current "node"'s firstChild (a JPG path) to MC "two"
function put2(pic)
{
_root.two.txt.htmlText= "<img src='" + pic + "' hspace='0' vspace='0' >";
}
//Loads the next image in the loop in MC "two", under MC "one"
function interval1()
{
put2(node2);
clearInterval(int1);
}
//Alpha fades MC "one", gives MC "one" MC "two"'s image, and deletes MC "two"'s image, returning to the state at the beginning of the loop
function interval2()
{
setInterval(fadeOutMC, fade_speed, one); //fader
_root.one.txt.htmlText=_root.two.txt.htmlText;
_root.two.txt.htmlText="";
clearInterval(int2);
}
fade_speed= 100;
//Function used to alpha fade MC "one"
function fadeOutMC(mc) {
if (getProperty(mc, _alpha)>0) {
setProperty(mc, _alpha, mc._alpha-10);
} else {
setProperty(mc, _alpha, 0);
clearInterval(fadeOutInterval);
}
}

Very respectfully,
Jerble

View Replies !    View Related
Fade Out FadeIn Slideshow
Hi all,

I'm trying to create a slide show that fades in a image waits for 2 sec then fades it out and fades in the next in the sequence and so on. I want each one to fade in and out. In the example below I'm using an array to store ref. to the images, I have two mc's, one to load one image and then the other to load the next when the first has faded out (that's the idea). The thumbs load fine and the first image loads in then out but I carnt call the function to start it again. I know this code looks a mess, can anyone revive it. or suggest another way.

Download fla here


ActionScript Code:
photo_arr = ["images/1", "images/2", "images/3", "images/4", "images/5", "images/6", "images/7", "images/8"];
for (var n = 0; n<photo_arr.length; n++) {
    var photos = thumbs_mc.createEmptyMovieClip(photoHolder_mc+n, n);
    photos.loadMovie(photo_arr[n]+"_th.jpg");
    photos._x = 60*n;
}
numPause = 2500;
amo = 10;
var one = holder_mc.createEmptyMovieClip("loader1_mc", 2);
var two = holder_mc.createEmptyMovieClip("loader2_mc", 1);
this.createEmptyMovieClip("watcher_mc", 100);
function alphaIn() {
    thisLoader.onEnterFrame = function() {
        if (this._alpha<=100) {
            this._alpha += amo;
            if (this._alpha>=100) {
                timerInterval = setInterval(alphaOut, numPause, data );
            }
        }
    };
}
function alphaOut() {
    if (this._alpha<=100) {
        thisLoader.onEnterFrame = function() {
            this._alpha -= amo;
            if (this._alpha<=0) {
                this._alpha == 0;
                this.onEnterFrame = null;
                clearInterval(timerInterval);
                imageGen(data)
            }
        };
    }
}
function createLoader(i, data, num) {
    thisLoader = eval("holder_mc.loader"+i+"_mc");
    thisLoader._alpha = 0;
    thisLoader.loadMovie(data[counter]+".jpg");
    watcher_mc.onEnterFrame = function() {
        var picLoaded = thisLoader.getBytesLoaded();
        var picBytes = thisLoader.getBytesTotal();
        if (isNaN(picBytes) || picBytes<4) {
            return;
        }
        if (picLoaded/picBytes>=1) {
            alphaIn();
            two.swapDepths(one);
           
            delete this.onEnterFrame;
        }
    };
}
function loadImages(data, counter) {
    if (i == undefined || i == 2) {
        i = 2;
        createLoader(i, data, counter);
        i = 1;
    } else if (i == 1) {
        createLoader(i, data, counter);
        i = 2;
    }
}
function imageGen(data) {
    if (counter == undefined || counter == data.length) {
        counter = 0;
    }
    loadImages(data, counter);
    counter++;
}
imageGen(photo_arr);

View Replies !    View Related
Can't Get XML Slideshow To Fade In Sync
I'm writing this script to grab data from an XML file, and fade between 2 MC of images and text. There are 2 layer each with the same instance of a clip. It loads the info into the background, once it's loaded the JPEG and 3 secs have passed it moves it to the front and fades in over the other image. Then it repeats. I can get it to work except that when I use the fadein function (which uses onEnterFrame), by the third or 4th image it keeps switching and fading out of sync. If I just use a command to give it 100% opacity instantly it works fine. But I don't know how to fade it nice... is here a problem with using 2 instances of onEnterframe? And sometimes it doesn't load the images right... is there a better way to do this?

Here's my code:


Code:
stop();
//Load XML File
my_xml = new XML();
my_xml.onLoad = myLoadHandler;
my_xml.load("http://www.siriusad.com/bott/images/test.xml");
my_xml.ignoreWhite = true;
frontImage = image1_mc;
backImage = image2_mc;
timesUp = false;
firstRun = true;
//loadhandler
function myLoadHandler(success) {
if (success == true) {
rootNode = my_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentIndex = 0;
slideshow();
} else {
trace("XML Load Error");
frontImage._alpha = 100;
frontImage.theText_mc.head_txt.text = "XML Load Error";
}
}
//function for fade in
function fadeIn() {
backImage.onEnterFrame = function() {
if (backImage._alpha<100) {
backImage._alpha += 5;
} else {
delete this.onEnterFrame;
frontImage._alpha = 0;
go_btn.onPress = function() {
getURL(clickURL);
};
slideshow();
}
};
}
//front back image function
function setFrontBack() {
if (backImage == image2_mc) {
frontImage = image2_mc;
backImage = image1_mc;
} else {
frontImage = image1_mc;
backImage = image2_mc;
}
}
function setTimesUp() {
trace("Time is up");
timesUp = true;
}
function preload() {
backImage.theImageLoader_mc.onEnterFrame = function() {
trace("timesUp: "+timesUp);
//trace(this.getBytesLoaded()+" of "+this.getBytesTotal()+"bytes loaded");
//if MC image is loaded and 3 seconds has passed
if (this.getBytesLoaded()>=this.getBytesTotal() && timesUp == true) {
delete this.onEnterFrame;
timesUp = false;
backImage.swapDepths(frontImage);
fadeIn();
//if I use these 2 instead of the fadein it works fine
//backImage._alpha = 100;
//slideshow();
}
};
}
//slideshow function
function slideshow() {
trace("- - - - - - - - - - - - - - - -");
trace("starting slideshow");
trace("currentIndex: "+currentIndex);
//set Timer
if (firstRun) {
trace("it IS the first run, ignoring interval");
firstRun = false;
setTimesUp();
} else {
trace("it's not the first run, setting interval");
setInterval(setTimesUp, 2000);
setFrontBack();
}
//set variables for this slide
headText = rootNode.childNodes[currentIndex].firstChild.nodeValue;
jpegURL = rootNode.childNodes[currentIndex].attributes.jpegURL;
clickURL = rootNode.childNodes[currentIndex].attributes.link;
//set data info back frame
backImage.theText_mc.head_txt.text = headText;
backImage.theText_mc.head_shdw_txt.text = headText;
//load image
backImage.theImageLoader_mc.loadMovie(jpegURL);
//Have to do it this to give the loader time to initilize...
setInterval(preload, 500);
if (currentIndex>=totalSlides-1) {
currentIndex = 0;
} else {
currentIndex++;
}
trace(headText+" | "+jpegURL+" | "+clickURL);
trace("- - - - - - - - - - - - - - - -");
}
Here's the FLA:
http:http://www.siriusad.com/bott/slideshow.fla (680k);

BTW, I'm using FLash MX 2004

View Replies !    View Related
How Do I Fade To Black In A Slideshow?
It's been years since I've used Flash, so I'm a bit rusty. But I am trying to use the slideshow presentation template and do transitions between the slides, but I'm not getting the results I want.

I'm putting in the preset behaviors for fade in and out, and what I get is a crossfade. What I want is a fade to black, and a fade up from black (a dip to black), and not a crossfade. Is there a simple scripting way to do this that I can put on the presentation (master) slide? If been playing with setInterval to delay the transition but I can't get it to work. Thanks.

View Replies !    View Related
Alpha Fade In And Out For My Slideshow
Hi everyone. I had to make a simple slide show for a client and they wanted it done in flash. I am not very good in flash and am having a problem trying to get the first image and text to fade in once the user clicks on the category they want.

I want both the image and the text to fade out and have a new image and new text to fade in when the user clicks the next or previous button. I would also like it if I could have the text be timed so that it will fade in AFTER the image it goes with fades in.

Right now the slide show is really ugly, I will make it pretty once I have it built and working correctly, so don't judge the look...haha.

Anyway, here is the .swf file which is what it looks like now...my .fla file was too big to upload on here. If someone can help me, I can email the .fla file to you. I would post the code, but I have so much in different places that I don't know where to start as far as what you will need. THanks so much!

I can't see the swf file that I uploaded when I click on it...hmmmm

View Replies !    View Related
Slideshow - Load & Fade
Hi all,

I'm thinking its time for a funky seemless slideshow, put I need help. What I want to accomplish is:

1. 1st image is loaded, displayed for x seconds...
2. 2nd image is preloaded behind the scenes
3. when 2nd image is fully loaded fade out 1st image and fade in 2nd image

Hopefully this will result in a seemless slideshow with no waiting... now all I have to do is start making it so if anyone can point me in the right direction any help would be greatly appreciated.

Thanks again.

View Replies !    View Related
XML Slideshow Doesn't Fade In?
Anyone else having this problem? I did Kirupa's tutorial on the XML/Flash image gallery. I traced the image paths to make sure that it's loading the right images (which it is) but for some reason they will not fade in. I can get them to appear if i change the picture._alpha to 100, but there's no point in me making it in flash if i can't get them to fade in and out. Anyone get this similar issue?

Thanks!

Travis

View Replies !    View Related
Fade In/Out Slideshow Images
*sigh*

Okay Here's the thing...I know this has been asked in many different ways, but as much as I searched and cut and pasted, I can't seem to get an answer or get my code to work. I currently have an xml slideshow and I would like to have my images transistion with a nice fade in and out technique. What is the exact code and where do I put it? Any help would be appreciated.

Here's my AS code...

Code:

slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("images.xml");
slides_xml.ignoreWhite = true;
//
// Show the first slide and intialize variables
function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = currentSlideNode=rootNode.firstChild;
updateSlide(firstSlideNode);
}
}
//
// Updates the current slide with new image and text
function updateSlide(newSlideNode) {
imagePath = newSlideNode.attributes.jpegURL;
x = newSlideNode.attributes.xCoor;
y = newSlideNode.attributes.yCoor;
slideText = newSlideNode.firstChild.nodeValue;
loadMovie(imagePath, targetClip);
targetClip._x = x;
targetClip._y = y;
}
//
// Event handler for 'Next slide' button
next_btn.onRelease = function() {
if (currentSlideNode.nextSibling == null) {
nextSlideNode = rootNode.firstChild;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
} else {
nextSlideNode = currentSlideNode.nextSibling;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
};
//
// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
if (currentSlideNode.previousSibling == null) {
previousSlideNode = rootNode.lastChild;
updateSlide(previousSlideNode);
currentSlideNode = previousSlideNode;
} else {
previousSlideNode = currentSlideNode.previousSibling;
updateSlide(previousSlideNode);
currentSlideNode = previousSlideNode;
}
};
/// Right-Click Function
function doSomething() {}
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("This movie is copyrighted by Your Company Name", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
Many Thnx!

View Replies !    View Related
Fade Out With The Kirupa Slideshow
I've followed the slideshow tutorial found at http://www.kirupa.com/developer/mx20...slideshow3.htm

I was wondering if there was any way to make the photos fade out after they appear? thanks.

View Replies !    View Related
Kirupa Slideshow With Fade Out
I'm using the nice and simple (but effective) 'Photo Slideshow Using XML and Flash - http://www.kirupa.com/developer/mx20..._slideshow.htm.

I'm not so bothered about using the preloader in between images but i was wondering if someone could tell me out to make the image fade out and into the next one without any white space in between.

Any help would be greatly appreciated.

Thanks

View Replies !    View Related
Alpha Fade In And Out For My Slideshow
Hi everyone. I had to make a simple slide show for a client and they wanted it done in flash. I am not very good in flash and am having a problem trying to get the first image and text to fade in once the user clicks on the category they want.

I want both the image and the text to fade out and have a new image and new text to fade in when the user clicks the next or previous button. I would also like it if I could have the text be timed so that it will fade in AFTER the image it goes with fades in.

Right now the slide show is really ugly, I will make it pretty once I have it built and working correctly, so don't judge the look...haha.

Anyway, here is the .swf file which is what it looks like now...my .fla file was too big to upload on here. If someone can help me, I can email the .fla file to you. I would post the code, but I have so much in different places that I don't know where to start as far as what you will need. THanks so much!

I can't see the swf file that I uploaded when I click on it...hmmmm

View Replies !    View Related
Xml Slideshow With Fade&zoom- Help
Last edited by veronicas : 2008-07-28 at 06:04.
























Hi there,

I have worked through a slideshow tutorial which has a fade and zoom in, as a client wanted this effect for their site:

http://www.indigolodges.com/en/winte...-lanterne.html


My problem is i need to zoom from center, not top left- i know this is possible but cant seem to find it online. Any help would be much appreciated

this is my current code

delay = 3000;
init = false;
//-----------------------
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();
zoom(picture,100,90);
} else {
content = "file not loaded!";
}
};

xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
p = 0;


import mx.transitions.*;
import mx.transitions.easing.*;
function zoom(what,startSize, endSize) {
var ease = Strong.easeOut;
var myTween = new Tween(what, "_yscale", ease, startSize, endSize, 1, true);
var myTween = new Tween(what, "_xscale", ease, startSize, endSize, 1, true);
}



function fadeIn() {
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;


}else{
delete onEnterFrame;
slideshow();

}
}
};
};

function fadeOut() {
onEnterFrame = function() {
if (picture._alpha > 5) {
picture._alpha -=5;
}else{
picture._alpha = 0;
delete onEnterFrame;
nextImage();
}
};
};

function nextImage() {
if (p<(total-1)) {
p++;
picture._alpha = 0;
zoom(picture,100,90);
if (loaded == filesize) {
picture.loadMovie(image[p]);
desc_txt.text = description[p];
picture_num();
fadeIn();
}
}
};

function firstImage() {
init = true;
picture._alpha = 0;
picture.loadMovie(image[0]);
desc_txt.text = description[0];
picture_num();
fadeIn();
};

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) && !init) {
p = 0;
firstImage();


} else if (p == (total-1) && init) {
p = -1;
fadeOut();
}else{
fadeOut();
}
}
};

View Replies !    View Related
Swap Depths With Fade And Resize
Now the title is just my idea of how this could possibly work but I could be way off the mark as I am still a novice really. Basically I am going to have four or five cards that are fanned out, so they overlap.

What I would like to do is to zoom in on the first card a little and make the rest fade out, then take card 1 back to its original size and for the others to fade back in.

Next the same would happen with card 2, although as it is underneath the overlap of card 1 I would also need to bring it to the front. I presume this is where I would use the swap depths, but need that to interact with the fade and resize!

The same process would then be applied to cards 3 and 4. None of this would be run with buttons though, it would just be a gradual progression.

I've started reading up on swap depths and can make the basics happen from the tutorial on this site and I also know the basics of fading in and out, but currently this involves a lot of tweening and frames. What I really need is to pull all of this together in actionscript and that's where it all falls down!

If you have any useful tutorials to help me on my way or can suggest some actionscript that puts it all together it would be great.

It is fairly clear in my mind what I need to do but if it is not coming out that way in this message don't hesitate to ask me questions.

Many thanks in advance,

snaphappy

View Replies !    View Related
Image Slideshow (fade Into Next With Alpha)
Hi. I'm trying to run a slideshow with each picture fading into the next. i have no idea what the syntax is for this. my basic idea is like this:

// start ------------------------------------------
if (frame > 10) {
for (x = 100; image1.jpg._alpha > 0; X--) {
image1.jpg._alpha = x;
}
}

if (x = 0) image1.jpg._alpha = 100; // once the alpha runs out, this pic is finished so reset and move to other pictures
// end ------------------------------------------


i don't know how to go about doing this with the action script though. i just want to swf to load and begin showing picture. i have the pictures set up but i don't know how to change their _alpha attributes in run time. please point me in the right direction. any help is appreciated.

thanks,
-twistfinger

View Replies !    View Related
Simple Slideshow With Fade Transitions
objective: create a slideshow with back and forward button with actionscripting
conditions: after last image is presented, and after press the "forward" it loads a new movie with loadmovie ("abc.swf",1) condition. Same as the "back" when u arrive at image 1.
The transition effect will be fade between images.

back (loads movie abc.swf) img1 img2 img3 forward (loads movie cba.swf)

hope to be as clear as possible.

View Replies !    View Related
Last Image In Slideshow To Fade Out And Stay There
Hi all,

I've created an image slideshow using XML and AS. I would like the last image (in the XML file) to stop and stay there, but the way that I have it currently the last image goes away. Ideally I would like the last image to stop and fade out a little and then have a button to have the slideshow replay again. So after the last image, I'd like "Replay" text to appear. Any suggestions as to how I can accomplish this?

Also I seem to get the output error message:

Error opening URL "file:///C|/Documents%20and%20Settings/My%20Documents/Folder/FILENAME/undefined"

I'm assuming this is a path/directory error, but I don't know the reason why. My path and files are all in the appropriate location. Any help would be greatly appreciated!

Below is my AS and logically it should work properly but the last image does not fade out and I can't get the restart button to appear. At least for now I'd like the last image to stay. Here's my AS:

delay = 3000;

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
//preloader._visible = true;
}
}
xmlData = new XML(); //assign a variable to the new XML object
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML; //tell xmlData to invoke the loadXML func when loaded
xmlData.load("images.xml");

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

function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
slideshow();
}
}

function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
//Changed p = 0 before; that was resetting your slideshow to go back to the start. The new code says if the current picture is the last one, fade out the picture in 100 milliseconds
endFadeOut = setInterval(fadeOut, 100);
//This assumes that you have made a movie clip called restart_mc that is a button
_root.attachMovie("restart_mc", "restart_mc1", _root.getNextHighestDepth(), {_x:Stage.width/2, _y:Stage.height/2});
restart_mc1.onRelease = function(){
} else {
nextImage();
}
}
//Fade function which checks to see if the alpha is greater than 0 and decreases it by 10 until it equals 0
function fadeOut(){
if (picture._alpha > 0){
picture._alpha -= 10;
}
}

//This would be your restart actions:
restart_mc1.onRelease = function(){
firstImage();
restart_mc1.removeMovieClip();
}

View Replies !    View Related
Help With Creating A Simple Fade In/out Slideshow
I have Flash MX (not pro). I simply want to have a front page with about 5 or 6 rotating photos that fade in and out on a loop. I know this must be dead simple, basic stuff - but can someone point me in the right direction (total newbie obviously).

View Replies !    View Related
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!

View Replies !    View Related
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();
}
}
}

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved