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




Loading Swfs From Array For Slideshow/gallery - Help Needed



I'm a kind of an AS noob and would appreciate any help - did a lot of trial and error to fix to no avail (please forgive SO much commented out stuff in my file). Any help greatly appreciated - if you need anything else to give me any info, let me know. THANKS!!!!It seems to not want to load anything other than the swf in index 1 of the array.i have 3 swfs (for a calender image movie, will have more once i can get working) that load in on their intro and stop (later I will at a timer to time a sequenced progression). Upon clicking the button it is supposed to go to an play the currently loaded movies 'outro' frame label and pass the 'currentIndex' variable to the main timeline on the last frame of the currently loaded swf which then loads the clicked swf. I was doing it this way to call the swf by a number so i could run a timed sequential move of them where a frame on the timeline calls the next in the sequence.Attach CodeLOADED SWFs (FINAL FRAME OF OUTRO):calenderTarget.loadMovie(swfArray[currentIndex], 1);MAIN MOVIE:stop();var swfArray:Array = new Array("pic1.swf", "pic2.swf", "pic3.swf");this.createEmptyMovieClip("calenderTarget", 1);calenderTarget.loadMovie(swfArray[0],1);var currentIndex:Number = 0;button1.onRelease = function(){currentIndex = 0;calenderTarget.gotoAndPlay("outro");}button2.onRelease=function(){currentIndex = 1;calenderTarget.gotoAndPlay("outro");}button3.onRelease = function(){currentIndex = 2;calenderTarget.gotoAndPlay("outro");}



Adobe > ActionScript 1 and 2
Posted on: 07/02/2008 11:21:46 AM


View Complete Forum Thread with Replies

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

[F8] Slideshow Problem, With External Swfs And Image Gallery
hi, below i have copied over the code that i am using on my slideshows. I have one main flash file and several external swfs which have a different slideshow in each. The slideshow is calling external images and text in from an xml file.

The problem I am having is that the a)pictures loop, which is ok but when you go to another section on the main swf and call in another external swf, then go back to the original section, the external swf does not play in order, and it speeds up. What can i do to remedy this as it is frustrating! :-)

code on button in main swf

on (press) {
gotoAndPlay(3);
blank2_mc.unloadMovie("inprogress.swf");
}



on (press) {
gotoAndPlay(3);
blank2_mc.loadMovie("inprogress.swf");

}



slideshow in external swf


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("inprogress.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 += 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 slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}

}
}

Thanks in advance.

Slideshow + Transitions Loading Multiple SWFs
So I went through the wonderful slideshow/gallery tutrorial on this site.

And I used a version of the loading mutliple SWFs with transition tutorial.

They work fine separately. And they even work together some times. But for somereason when I call to load the slide show it want to use the wrong transition from the main timeline.

Here is the link to the site. Click on STYLISTS in the nav. If you have done the tutorial the transition uses a alpha fade. That is what I want and it works sometimes. but other times it uses the square scale transition, but that is only supposed to happen when the clip forst loads into the empty MC. Also sometimes the XML files is not seem like it is loaded and the words "test" are in the dynamic fields which is how it appears in the .fla file.


Any suggestions as to what might be happening?

[Flash8] Loading External SWFs In A Slideshow Format, With A Menu AND A Timer
Awesome, I love typing out a long, detailed question, then having the forum tell me I'm not logged in, erasing the whole message. Way to test my patience. Gaaahhh.

Anyway, we'll try this again: I've been searching for about 3 days for various solutions to this problem, but have yet to find something specific enough, so I guess it's time to post it.

I'm redesigning my travel blog and using a Flash header that loads a series of external SWFs in a slideshow format, to show some of the site's content features. See the progress on it here:

http://www.thevagabondproject.com/main

The site's still very much in-dev, but you'll see that the Flash header advances through 3 slides (just drafts, mind you) and stops. That's totally cool with me, as eventually it will have 5 slides, and will have to end on the last slide, which will be a Yahoo Maps API. What I'm trying to accomplish with this header is:

1. Load the series of external SWFs (slide1.swf, slide2.swf, slide3.swf, slide4.swf, map.swf), in order, advancing from one to the next every 5 seconds, and stopping on map.swf, like a slideshow.

2. Allow the user to skip ahead or go back to other frames by clicking on their number/label in the menu in the bottom right (1, 2, 3, 4 and MAP).

3. Show which slide is being viewed by changing the "on" or "rollover" state of the button in the menu (you'll see the buttons change to blue on rollover) as the slides advance.

4. Show the title of the slide shown in the dynamic text box ("Last seen in...") as the slides advance.

You'll see that I've accomplished #1, but at the expense of #2. Originally, loading the external SWFs using the buttons was easy, using this code:


Code:
slideoneBtn.onRelease = function() {
theLoader.loadClip("location/of/slide1.swf", dropZone);
function onLoadInit(mc:MovieClip) {
trace("content has been loaded into "+mc);
}
}
So on and so forth, for each button. (dropZone is the name of the movie clip that each SWF is loading into) No problem there, until I tried adding this code to advance to the next SWF after 5 seconds, until stopping at the end:


Code:
var mcl:MovieClipLoader = new MovieClipLoader();
var list:Object = new Object();
mcl.addListener(list);

var myMovies:Array = new Array("location/of/slide1.swf", "location/of/slide2.swf", "location/of/slide3.swf");
var cont:Number = 0;

function loadSwfs(){
mcl.loadClip(myMovies[cont], dropZone);
}

list.onLoadInit = function(){
clearInterval(interval);
if(cont < myMovies.length){
cont++;
interval = setInterval(loadSwfs, 5000);//defines the wait for next movie load
}
else{
trace("Load complete");
}
}

loadSwfs();
While that code works in itself, (thanks to the authoring of a kirupa forum answer) it also deactivates my buttons. Lame. Eventually I'll also want to add transition animation between the frames, etc, but for now the question is: how do I use AS2.0 to advance to the next slide every 5 seconds, while still allowing the user to skip around? If possible, I'd also like the timer to stop running if a user clicks a button.

I'm sure I'm just misunderstanding some fundamentals of ActionScript, being a novice, but any help would be greatly appreciated – please let me know if any of this needs more explanation. Thanks in advance for your time.

Help Needed In Loading Swfs..into Flash File
Hi ..

I am making one flash presentation....
I have 4 files..main..pre1..pre2..pre3...i am loading pre1, pre2 and pre3 on the first frame of main file.
the code is...



Code:
loadMovieNum("pre1.swf", 9);
loadMovieNum("pre2.swf", 10);
loadMovieNum("pre3.swf", 11);

and last frame of main.fla...



Code:
stop();
_level9.mainmovie.gotoAndPlay("start");
On pre1...first frame....

Code:
stop();
action and...movieclip are there...

Inside that movie clip...
first frame...

Code:
stop();
ans second frame...with lable name START...

on every button....to proceed to the next step the code is...


Code:
on(release)
{
_level9.mainmovie.gotoAndPlay("step0n"); (n is the number)
}
and the last button of pre1 has...


Code:
on (release)
{
_level10.mainmovie10.gotoAndPlay("step04"); (where step04 is in the pre2 file...)

}
and last frame of the pre1 has this code....



Code:
stop();
_level10.mainmovie10.gotoAndPlay("start2");
where "start2" is the lable name on the second frame of movieclip...which is in file pre2


Pre2 and Pre3 has the same file structures and coding.....
The problem is...when presentation plays on its own (without clicks)..it goes smoothly..but when user proceeds with the clicks...then..pre2.swf loads automatically twice...means when pre2.swf is playing...somewhere between pre2 will b loaded again and it will b repeated...

can anybody tell me whats the problem here....
Help would be appriciated..
Thank you...

Help Needed In Loading Swfs..into Flash File
Hi ..

I am making one flash presentation....
I have 4 files..main..pre1..pre2..pre3...i am loading pre1, pre2 and pre3 on the first frame of main file.
the code is...



Code:
loadMovieNum("pre1.swf", 9);
loadMovieNum("pre2.swf", 10);
loadMovieNum("pre3.swf", 11);

and last frame of main.fla...



Code:
stop();
_level9.mainmovie.gotoAndPlay("start");
On pre1...first frame....

Code:
stop();
action and...movieclip are there...

Inside that movie clip...
first frame...

Code:
stop();
ans second frame...with lable name START...

on every button....to proceed to the next step the code is...


Code:
on(release)
{
_level9.mainmovie.gotoAndPlay("step0n"); (n is the number)
}
and the last button of pre1 has...


Code:
on (release)
{
_level10.mainmovie10.gotoAndPlay("step04"); (where step04 is in the pre2 file...)

}
and last frame of the pre1 has this code....



Code:
stop();
_level10.mainmovie10.gotoAndPlay("start2");
where "start2" is the lable name on the second frame of movieclip...which is in file pre2


Pre2 and Pre3 has the same file structures and coding.....
The problem is...when presentation plays on its own (without clicks)..it goes smoothly..but when user proceeds with the clicks...then..pre2.swf loads automatically twice...means when pre2.swf is playing...somewhere between pre2 will b loaded again and it will b repeated...

can anybody tell me whats the problem here....
Help would be appriciated..
Thank you...

[F8] Gallery Swfs Loading DELAY-- Please Help
I have a gallery with a scrollpane that contains a movie clip of scrollable thumbnail image buttons that enlarge to full size to the left of the scrollpane by calling a different swf for each image.

The thumbnail buttons are activated on rollover, and so I want them to open right away, because if there is a delay, the user thinks it is an onclick button, which defeats the purpose of having it be a rollover.

This site is an example of how it should be:
http://ruthsteinberg.com/

and here is an example of the way mine works:
http://rufushale.com/newgallery2.html

I have only made three of the bitmaps in the scrollpanel into buttons to save time: the top, the third down, and the fifth down.

What is causing the delay in opening???

Urgent Help Needed AS Problem Loading Child Swfs
Hi, I'm new to this board but I've looked around trying to find the answer to my problem and it sounds like I might actually find the answer. So here's the problem: I have a parent swf that loads 5 child swfs. Everything loads fine but after the xml loads the data there is no functionality on the child swfs other than the listen command to use the left and right keys to switch between images. The scrolling and buttons on the child swf become deactivated.

I THINK I've traced the problem to the activateButtons() function. I've tried modifying it with no luck. If I comment out the function then the child swf works and the parent swf doesn't. Again, this is only an assumption, not conclusive.

Both swfs work fully independantly. Only some functions of the child swf work loaded into the parent swf.

I got the code for the parent swf online and I can't even remember where, but here it is (modified):


Code:
makeButtons();
import mx.transitions.Tween;
import mx.transitions.easing.*;
Object.Main = this;
var distanceMove = 545;
onLoad.moveButtons(0);
function galleryChoice(q) {
tArray = new Array();
my_xml = new XML();
for (var j = 0; j<curLength; j++) {
this.th_nav["thmb"+j].removeMovieClip();
}
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.firstChild.childNodes[q];
curLength = gallery.childNodes.length;
for (var i = 0; i<gallery.childNodes.length; i++) {
tArray.push(gallery.childNodes[i].attributes.movie);
}
}
delay = setInterval(makeButtons, 10);
};
my_xml.load("samples.xml");
}
function makeButtons() {
tnNr = 0;
clearInterval(delay);
for (var i = 0; i<tArray.length; i++) {
var thb = container.thumb.duplicateMovieClip("thmb"+i, 1000+i);
//
//trace(pArray[i]);
thb._x = 165+(i*48);
//container.thmb5.menuTitle
//trace(thb.menuTitle.text = pArray[i]);
thb.txt.text = pArray[i];
}
loadButtons();
}
function loadButtons() {
var tbox = container["thmb"+tnNr].box;
tbox.loadMovie(tArray[tnNr]);
temp = this.createEmptyMovieClip("tmp"+tnNr, 999);
temp.onEnterFrame = function() {
bt = tbox.getBytesTotal();
bl = tbox.getBytesLoaded();
if (bt == bl && bt>4) {
nextButton();
delete this.onEnterFrame;
} else {
activateButtons();
}
};
}
function nextButton() {
if (tnNr<tArray.length-1) {
tnNr++;
loadButtons();
} else {
activateButtons();
}
}
function activateButtons() {
for (var i = 0; i<tArray.length; i++) {
var but = container["thmb"+i];
but.id = i;
//trace(but.id);
but.onRelease = function() {
moveButtons(this.id);
lastPos=this.id;
};
but.onRollOut = function() {
//moveButtons2(this.id);

};
}
}
function moveButtons(pos) {

//trace(lastPos);
for (var j = 0; j<tArray.length; j++) {
startX = 165+(j*48);

if (j<=pos) {
var myTween:Tween = new Tween(container["thmb"+j], "_x", mx.transitions.easing.Strong.easeOut, container["thmb"+j]._x, startX, 3, true);
} else {
var myTween:Tween = new Tween(container["thmb"+j], "_x", mx.transitions.easing.Strong.easeOut, container["thmb"+j]._x, startX+distanceMove, 3, true);
}
}
}
function moveButtons2() {
for (var j = 0; j<tArray.length; j++) {
startX = 165+(j*65);
var myTween:Tween = new Tween(container["thmb"+j], "_x", mx.transitions.easing.Strong.easeOut, container["thmb"+j]._x, startX, 1, true);
}
}
galleryChoice(0);
Here is the child swf code:


Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
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;
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("web.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();
};
/////////////////////////////////////
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 += 7;
}
}
};
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();
}
}
}
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();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 7;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
I really appreciate any help I can get, and this is really urgent. THANKS!

-JoshDV

Loading External Swfs Into An Array
Hi everyone,

It's been ages since I've had to do any flash, and I find myself kicking myself for forgetting something quite simple - How do I make a loop that will load the swf files from a folder into an array? So for example, a folder contains 01.swf, 02.swf, etc, and to load them into an array where 01 = 01.swf, 35 = 35.swf?

Any help would be GREAT.

Thanks guys!

Loading External Xml Driven Image Gallery Swfs
Hi

I am trying to get my main movie to load in external swf's. The movies that load in are xml driven image galleries. I can get the swf to load but as it is controlled by an external xml file it does not work. I have setup my directory structure so that each image gallery movie is in its own folder with its associated files:

I am using this AS to call the movies:

on (release) {
_root.theClip_mc.loadMovie("gallerys/people/people.swf");
}

In the people directory is a file called source.xml which is needed to make the movie display the image in the gallery.

I get the error output message:

Error opening URL 'file:///Macintosh%20HD/Users/pongtoe/Documents/WEBSITES/2222/source.xml'

I guess I need some kind of actionscript that will call the source.xml file as well as people.swf

It all works if all the swfs live in the same directory but as there are about 9 seperate galleries that are all xml driven they cant.

Any help much appreciated.

Thanks!

[F8] Help With Code - Loading Multiple Swfs Array With Preloader
I have a main movie player that consists of play, rewind, forward, stop buttons and will preload 8 swfs (scenes) before it plays the first one in the array so that the movie will play smoothly. I was able to create the array and preload the movies but I could not make the first preloaded movie to play after the preloading is done. Also is there a way I can setup the preloader to calculate the total size of all the scenes instead of tracking the size of each scenes? Thanks in advance for your help..


Code:
var movieArray:Array = new Array("scene_one.swf", "scene_two.swf", "scene_three.swf", "scene_four.swf", "scene_five.swf", "scene_six.swf", "scene_seven.swf","scene_end.swf");
var moviePath:String = "";
var movieNum:Number = 0;
var movieLoadedTotal:Number = 0;
var movieListener:MovieClipLoader = new MovieClipLoader();
var movieListenerObject:Object = new Object();

_root.createEmptyMovieClip("containerMC", _root.getNextHighestDepth());
movieListenerObject.onLoadStart = function(targetMC:MovieClip) {
movieLoadedTotal++;
trace("- - - - - - - - - - - - - - - - - - - - - - -");
trace("LOADING_START (""+targetMC+"")");
};
movieListenerObject.onLoadProgress = function(targetMC:MovieClip, loadedBytes:Number, totalBytes:Number) {
trace("LOADING_STATUS (""+targetMC+""): "+loadedBytes+"/"+totalBytes);
};
movieListenerObject.onLoadComplete = function(targetMC:MovieClip) {
trace("LOADING_COMPLETE (""+targetMC+"")");
};
movieListenerObject.onLoadInit = function(targetMC:MovieClip) {
trace("LOADING_INIT (""+targetMC+"")");
trace("- - - - - - - - - - - - - - - - - - - - - - -");
if (movieLoadedTotal<movieArray.length) {
trace(movieLoadedTotal+"/"+movieArray.length+" loaded");
movieNum++;
movieListener.loadClip(moviePath+movieArray[movieNum], _root.containerMC);
} else {
trace("ALL DONE!");
_level0.containerMC.loadMovie("scene_one.swf");
_level0.containerMC.gotoAndPlay(2);
}
};
movieListenerObject.onLoadError = function(targetMC:MovieClip, errorCode:String) {
trace("LOADING_ERROR ("+targetMC+"): "+errorCode);
};
movieListener.addListener(movieListenerObject);
myTrace = function (textVar:String) {
_root.debugMC.debugTXT.text += textVar+"\n";
};
_root.attachMovie("debug", "debugMC", 99999);
_root.debugMC._x = Stage.width/2;
_root.debugMC._y = Stage.height/2;


movieListener.loadClip(moviePath+movieArray[movieNum], _root.containerMC);

Dynamic Menu W/multi-d Array For Loading Swfs. Help?
Hello,
I have created a simple navigation system that is created dynamically based on how many items you put in an array. It then positions itself accordingly on stage. Once a nav item is clicked a SWF is then loaded onto the stage.

Currently it works with minor glitches...but I have cheated slighty (shown on Line 120 of full code below):
Code:

SlideshowLoader.load(new URLRequest(String("slideshow"+ (evt.currentTarget.num +1) + ".swf")));

I would like advice on how to better parse the url of the swf to be loaded into the evt.currentTarget of the navigation system from the itemArray.

I am attaching a file with appropriately named swf files that are to be loaded as well as providing the full code below. Please note I am not attaching caurina tweener.

Thanks in advance to anyone that can help.

Code:

//========================================
// ActionScript 3.0
// Navigation system that loads swf movies
//========================================

//import
import caurina.transitions.*;


// set vars


var currBtn:MovieClip;
var space:Number = 0;
var overColor:uint = 0xb29451;
var upColor:uint = 0x725f35;
var navPosX:Number = 30;
var navPosY:Number= 150;
var ruleSpace:Number = 10;
var navLength:Number;
var url:String;
var SlideshowLoader:Loader = new Loader();





var itemArray:Array = new Array();
itemArray.push(new Array("Load SWF 1", "slideshow1.swf"));
itemArray.push(new Array("Load SWF 2", "slideshow2.swf"));
itemArray.push(new Array("Laad SWF 3", "slideshow3.swf"));


setupNav();

setupSlideshow();


function setupNav():void {
   for (var i:int=0; i<itemArray.length; i++) {
      var b:MovieClip = new Item();
      b.x = navPosX;
      b.y = navPosY + ruleSpace+ i * (b.height + space);
      b.txt.text = (String(itemArray[i][0]));
      trace("label = " + itemArray[i][0]);
      trace("swf = " + itemArray[i][1]); 
            
      b.buttonMode = true;
       b.txt.mouseEnabled = false;
      addChild(b);
      setupBtn(b, i); // #2 see parameters in setupBtn
      hr_t.x = navPosX;
      hr_t.y = navPosY;
      hr_b.x = navPosX;
      hr_b.y = navLength = navPosY + b.height * i + (ruleSpace*4);
      }
}

function setupSlideshow():void {
   var _URL:URLRequest = new URLRequest(itemArray[0][1]);;
   SlideshowLoader.load(_URL);
   SlideshowLoader.x = 200;
   SlideshowLoader.y = 30;
   addChild(SlideshowLoader);
}



function setupBtn(mc:MovieClip, index:int):void { // third parameter _url?
   mc.alpha = .5;
   mc.dot_mc.scaleX = .1;
   mc.num = index;
   mc.addEventListener(MouseEvent.CLICK, onBtnClick, false, 0, true);
   mc.addEventListener(MouseEvent.ROLL_OVER, onBtnOver, false, 0, true);
   mc.addEventListener(MouseEvent.ROLL_OUT, onBtnOut, false, 0, true);
}

function onBtnOver(evt:MouseEvent):void{
   evt.currentTarget.alpha = 1;
   evt.currentTarget.dot_mc.scaleX = .5;
   Tweener.addTween(evt.currentTarget, {x:55, time:1.5});
}


function onBtnOut(evt:MouseEvent):void{
   if (currBtn !=evt.currentTarget) { // #3 if currBtn is NOT the currentTarget
   evt.currentTarget.alpha =.5
   evt.currentTarget.dot_mc.scaleX = .1
   Tweener.addTween(evt.currentTarget, {x:30, time:1.5});

   }
}



function onBtnClick(evt:MouseEvent):void{
   if (currBtn) {
      currBtn.alpha = .5;
      currBtn.dot_mc.scaleX = .1;
   ;
      SlideshowLoader.load(new URLRequest(String("slideshow"+ (evt.currentTarget.num +1) + ".swf")));
      
   trace(evt.currentTarget.num);
}
currBtn = MovieClip(evt.currentTarget); //#4  makes this mc as current target

}

Image Gallery Thumbnail OnRelease Array Or XML Loading Problem
I'm using Flash CS3, but this project began in 8 and uses AS 1 and 2, so I figured this was the more appropriate section.

So I have a basic photo album for prototyping that is populated by values from an XML file. There are 9 maximum thumbnails (3 x 3) in each album. This all works.

Upon onRelease of each thumbnail a pop up larger-view movie clip appears to display the respective larger image. The viewer movie clip appears fine and in the correct position. The problem is the larger image does not get loaded into the holder clip within the viewer. Output is telling me that the value that I'm pulling from the XML file is undefined.

Both the thumbs and the larger images are using the same XML file and the same array. All of the pertinent code is within a class. All the correct files are in the folder they should be in. It is not a file not found error. Typos have been accounted for. The code for populating the thumbs is almost identical to the code for the larger image. It's just that one works, and the other doesn't.


Code:
class Photos extends MovieClip {
//
public var a:Number;
public var i:Number;
//
public function Photos() {
//load in XML
_root.photoXML = new XML();
_root.photoXML.ignoreWhite = true;
_root.photoXML.load("xmlData/photos.xml");
_root.photoXML.onLoad = function(success){
if(success) {
this.XmlConnect();
}
}
}
public function goPhotos() {
//
//First build arrays:
_root.photosArray = new Array();
_root.totalPhotos = _root.photoXML.childNodes[0].childNodes.length;
// fill arrays ::
for (a=0; a<_root.totalPhotos; a++) {
if(_root.photoXML.childNodes[0].childNodes[a].attributes.blockNum == _root.blockNum and _root.photoXML.childNodes[0].childNodes[a].attributes.locNum == _root.locNum+1) {
_root.photosArray.push({photoName:_root.photoXML.c hildNodes[0].childNodes[a].attributes.title, photoFile:_root.photoXML.childNodes[0].childNodes[a].attributes.filename});
}
}
trace("photosArray length = "+_root.photosArray.length);
//
for(a=0;a<10;a++) {
_root.detail.photoSec.photosHolder["img"+a].img._alpha = 0;
_root.detail.photoSec.photosHolder["img"+a].img._visible = false;
}
//
for(a=0;a<_root.photosArray.length;a++) {
_root.detail.photoSec.photosHolder["img"+a].img.loadMovie("images/sm_"+_root.photosArray[a].photoFile+".jpg",a);
_root.detail.photoSec.photosHolder["img"+a].img._visible = true;
_root.detail.photoSec.photosHolder["img"+a].img._alpha = 100;
}
//
//
//
_root.detail.audioSec.vLoader.vHolder.unloadMovie( );
_root.detail.audioSec.audioControlsHolder.vStat.gr abBar._x = 0;
_root.detail.audioSec.vLoader.gotoAndStop(1);
//
//
//
}
public function hidePhotos() {
for(i=0;i<_root.photosArray.length;i++) {
_root.detail.photoSec.photosHolder["img"+i].enabled = false;
}
}
public function showPhotos() {
for(i=0;i<_root.photosArray.length;i++) {
_root.detail.photoSec.photosHolder["img"+i].enabled = true;
}
}
public function launchLargePhotoViewer(photoNum) {
/*_root.detail.photoSec.photosHolder["img"+_root.locNum].onRelease=function():Void {
_root.detail.largeViewerHolder.removeMovieClip();
_root.detail.createEmptyMovieClip("largeViewerHolder", _root.detail.getNextHighestDepth());
_root.detail.largeViewerHolder.attachMovie("largeViewer", "largeViewer"+i, _root.detail.largeViewerHolder.getNextHighestDepth (), {_x: 251.1, _y:-27.9});
_root.detail.largeViewerHolder["largeViewer"+i].createEmptyMovieClip("img", _root.detail.largeViewerHolder["largeViewer"+i].getNextHighestDepth());
_root.detail.largeViewerHolder["largeViewer"+i].img.loadMovie("images/md_"+_root.photosArray[i].photoFile+".jpg", i);
_root.detail.largeViewerHolder["largeViewer"+i].img._x = _root.detail.largeViewerHolder["largeViewer"+i]._x + (_root.detail.largeViewerHolder._width - _root.detail.largeViewerHolder["largeViewer"+i].pic._width)*.5;
_root.detail.largeViewerHolder["largeViewer"+i].img._y = _root.detail.largeViewerHolder["largeViewer"+i]._y + (_root.detail.largeViewerHolder._height - _root.detail.largeViewerHolder["largeViewer"+i].pic._height)*.5;
}*/
for (i=0;i<_root.photosArray.length;i++) {
_root.detail.photoSec.photosHolder["img"+i].onRelease=function():Void {
_root.detail.largeViewerHolder.removeMovieClip();
_root.detail.createEmptyMovieClip("largeViewerHolder", _root.detail.getNextHighestDepth());
_root.detail.largeViewerHolder.attachMovie("largeViewer", "largeViewer"+i, _root.detail.largeViewerHolder.getNextHighestDepth (), {_x: 251.1, _y:-27.9});
_root.detail.largeViewerHolder["largeViewer"+i].createEmptyMovieClip("img", _root.detail.largeViewerHolder["largeViewer"+i].getNextHighestDepth());
_root.detail.largeViewerHolder["largeViewer"+i].img.loadMovie("images/md_"+_root.photoXML.childNodes[0].childNodes[i].attributes.filename+".jpg", i);
_root.detail.largeViewerHolder["largeViewer"+i].img._x = _root.detail.largeViewerHolder["largeViewer"+i]._x + (_root.detail.largeViewerHolder._width - _root.detail.largeViewerHolder["largeViewer"+i].pic._width)*.5;
_root.detail.largeViewerHolder["largeViewer"+i].img._y = _root.detail.largeViewerHolder["largeViewer"+i]._y + (_root.detail.largeViewerHolder._height - _root.detail.largeViewerHolder["largeViewer"+i].pic._height)*.5;
}
}
}
}
I appreciate any insight into this conundrum.

ETA: photoFile is the culprit of 'undefined'

XML Photo Gallery W/Thumbs - Code For Loading SWFs Instead Of JPGs For Thumbs?
Hi, all,

I'm using Flash CS3 and have built a slide show using the excellent XML Photo Gallery tutorial, as well as adding sound thanks to another post in this forum. It's all working like a charm. The only bad thing is: I want to place .swfs files where the dynamic text is right now, and can't figure out how to do it.

What I really want is one large image/JPG on each slide, and below that, instead of the dynamic text shown in the tutorial example, a smaller .swf file should appear. (For this project, the text itself needs to be animated, and I can't do that with the <caption>/dynamic text option; I need to insert an SWF.) I'd really like to do this using XML since that's working so nicely otherwise.

Can anyone provide me with the actionscript code to use in the context of this photo gallery? I'm not advanced enough yet to know where or how to place code that doesn't fall into this gallery/AS format.

(I'm not being lazy: I have looked all over these forums for hours, read through about 60 pages of tutorials, went through the whole XML Photo Gallery with Thumbnails hoping I could somehow alter that to meet this project's needs... no dice. I had gotten far enough in that tutorial to be able to insert an empty movie clip where I want it, but could only figure out how to fill it with JPGs from the XML, not SWFs... and in any case the images did not then work correctly while advancing the slides.)

Here is my current Actionscripit code:

************************************************** *****

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
audio = [];
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;
audio[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("infant_images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.SPACE) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = false;
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];
sound = new Sound();
sound.loadSound(audio[p],true)
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
sound = new Sound();
sound.loadSound(audio[p],true);
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
sound = new Sound();
sound.loadSound(audio[0],true)
}
}
function loadSound() {
if (loaded == filesize) {
createEmptyMovieClip("sound_mc",2);
sound_mc.sound_obj = new Sound();
sound_mc.sound_obj.loadSound( sound[p], true);
sound_mc.sound_obj.play();
}
}

************************************************** *****

(It's not showing the preloader and is missing the counter AS on purpose; I don't need those items for this project...)

Thank you for any help you can give!!

Slideshow With External .swfs
I am creating a slideshow that loads 1 external swf into each frame on the main timeline. the navigation is a simple previous next. here is my code:


Code:
//FOR THE NAV
prev_btn.onRelease = function () {
prevFrame();
}
next_btn.onRelease = function () {
nextFrame();
}

//FOR FRAME 1 OF THE SLIDE SHOW
stop();
photo.loadMovie("this_1.swf");

//FOR FRAME 2 OF THE SLIDE SHOW
stop();
photo.unloadMovie("this_1.swf");
photo.loadMovie("this_2.swf");
HELP?

Slideshow With Multiple SWFs And Preloaders?
Hi, I posted once in this forum a couple weeks ago regarding a slideshow that I am creating in flash mx 2004. I've encountered a new problem with my file size.

The slideshow contains 100 photos, each within their own movie clip. The movie is split into 5 scenes, containing 20 photos each (there is also an intro scene, for a total of 6 scenes). As you can imagine, this makes for quite a large swf file, which does not download quickly.

You can actually view the current version of the slideshow online:
http://www.eastcomultimedia.com/slid...slideshow.html

It seems to me the best way to make it more usable on internet browsers is to make each scene into its own swf file with a preloader, then re-structure the original flash movie to reference each of those individual swf files using the loadMovie function.

Honestly, I don't have the first clue how to do this. How do I get the imported swf's to flow seemlessly into one another? How do I structure my navigation so that I can navigate within the loaded swf's AND simultaneously within the main timeline?

Any help or suggestions would be greatly appreciated. Thanks.

Loading SWFs Into FLAs And Making The SWFs Transparent HELP
I have a set of buttons inside a movieclip, inside a movie clip (if that makes sense).

When the buttons are clicked I need them to load a content .swf file into frame 2 at at specified position (x=20, y=140)

I also need the .swf being loaded in to have a transparent background.

How can I achieve this?

I cannot include the .fla files for your perusal because the KirupaForum uploader can't upload bigger than 2mb and my zip file is 5.28mb or something like that.

Loading SWFs Into FLAs And Making The SWFs Transparent HELP
I have a set of buttons inside a movieclip, inside a movie clip (if that makes sense).

When the buttons are clicked I need them to load a content .swf file into frame 2 at at specified position (x=20, y=140)

I also need the .swf being loaded in to have a transparent background.

How can I achieve this?

I cannot include the .fla files for your perusal because the KirupaForum uploader can't upload bigger than 2mb and my zip file is 5.28mb or something like that.

Loading External Swfs Into Externally Loaded Swfs.
ive got some buttons on my main timeline that im using to load external swfs into an empty mc. the buttons are coded with the following:

on(release){
if(_root.currMovie == undefined){
_root.currMovie = "1";
emptyMC1.loadMovie("1.swf);
} else if (_root.currMovie != "1") {
if (emptyMC1._currentframe >=
emptyMC1.midframe) {
_root.currMovie = "1";
emptyMC1.play();
}
}
}


1.swf also has some buttons that load external swfs into a second empty mc. those buttons are coded with the following:

on(release){
if(this.currMovie == undefined){
this.currMovie = "2";
emptyMC2.loadMovie("2.swf");
} else if (this.currMovie != "2") {
if (emptyMC2._currentframe >=
emptyMC2.midframe) {
this.currMovie = "2";
emptyMC2.play();
}
}
}


1.swf loads into emptyMC1 ok, and 2.swf loads into emptyMC2 ok.

when i press any of the buttons on the main timeline, the outro animation of 1.swf plays correctly, but the outro animation of 2.swf does not. is there a way to the buttons so that the emptyMC's unload sequentially?

Help With Integrating Slideshow Maker Swfs Into Flash
Hi there.

I'm creating a portfolio site for a photographer and need to be able to have him easily manage changing the images in the galleries by himself, so I figured I'd use Slideshow Maker Professional to make the gallery slideshows and then it'd be easy to teach him how to change photos.

At any rate, I'm having trouble getting the swfs to load into the flash website itself. It seems to require the file slides.xml (which of course changes with each gallery slideshow) and I'm at my wits' end trying to figure out how to make this work.

Here's the test site and the fla file.

Any help would be hugely appreciated!

Thanks!

Candy

Slideshow Help Needed
I want to create a slideshow that will fade in and hold the image for a few seconds and then fade in the next object. I'm not worried about fading the image out as the next one will just cover the previous. The photos which are chosen by the user are saved in an array.

Here's the code i have for the slideshow so I dont know what I'm doing wrong.

function fadeIn(){
_root.slide[next]._width = 200;
_root.slide[next]._height = 150;
if(slide[next]._alpha < 100){
slide[next]._alpha += 10;
}
next++;
}

_root.onEnterFrame = fadeIn();

I know I probably need to put in a setInterval but I'm not sure quite how.

Thanks in advance for the help.

Help Needed With Slideshow
We've made this simple slideshow but we got problems! It seems that it preloads the images twice! Can you please help? You'll need to simulate 14.4 modem in flash because else you cant see the problem.

-Slemming

Slideshow Help Needed, Please
Yes, another slideshow question!
I did a massive search resulting in the following code. But still it is unstable,
for I am a not so good in complex AS code.

I had a problem of cross fading and swapping depths. I resolved it now by incrementing the jpg holdermc _name and its depth. I delete them also, so i dont have a memory overload(i hope!)

Can somebody take a look at my code and advice me..
Also the pause and resume timer seems to be a bit dodgy!
Thank you



HTML Code:
_global.Gallery = function(naam, holder) {
this.holder = holder;
this.naam = naam;
this.PicArray = ["http://www.link.org/0.jpg", "http://www.link.org/1.jpg"];
this.fadeSpeed = 25;
this.stopTime = 2000;
this.startShow();
};
var G = Gallery.prototype;
// so we can trace the name of this object \
G.toString = function() {
return this.naam;
};
// M E T H O D S \
G.startShow = function() {
this.container_mc = this.holder.createEmptyMovieClip("container", 0);
this.showPicAtIndex(0);
};
//--
G.nextImage = function() {
this.showPicAtIndex((this.index+1)%this.PicArray.length);
};
//--
G.prevImage = function() {
this.showPicAtIndex((this.PicArray.length+this.index-1)%this.PicArray.length);
};
//--
G.showPicAtIndex = function(n) {
trace("called show at index"+n);
//
this.index = n;
//
i = (i+1)%2;
//
var mc = this.container_mc.createEmptyMovieClip("loader_mc"+i, i);
mc._alpha = 0;
mc.loadMovie(this.PicArray[this.index]);
//
this.FadeIn(mc);
};
//--
G.FadeIn = function(CurrentMc) {
this.FadeInID = setInterval(function (mc, MyObj) {
mc._alpha += 10;
if (mc._alpha>=100) {
clearInterval(MyObj.FadeInID);
// call the timer functio to show this for x seconds
MyObj.showImage(mc);
}
updateAfterEvent();
}, this.fadeSpeed, CurrentMc, this);
};
//--after the image has been shown for a length of time start fading out the image
G.FadeOut = function(CurrentMc) {
this.FadeOutID = setInterval(function (mc, MyObj) {
mc._alpha -= 10;
if (mc._alpha<=0) {
clearInterval(MyObj.FadeOutID);
//remove the current mc, so we dont get a memory overload
removeMovieClip(mc);
}
updateAfterEvent();
}, this.fadeSpeed, CurrentMc, this);
//start the next image after 250 ms so that the two will cross fade
//---!!!
//very dodgy!!
//so we get a sort of cross fade
//---!!!
this.NextID = setInterval(function (MyObj) {
MyObj.nextImage();
clearInterval(MyObj.NextID);
}, 250, this);
};
//--show the image for a length of time before calling the fadeOut()
G.showImage = function(CurrentMc) {
if (!this.paused) {
this.DelayID = setInterval(function (mc, MyObj) {
trace("called fadeOut"+mc);
MyObj.FadeOut(mc);
clearInterval(MyObj.DelayID);
}, this.stopTime, CurrentMc, this);
} else {
this.pausedAt = CurrentMc;
}
};
//--
G.pause = function() {
this.paused = true;
};
G.resume = function() {
this.paused = false;
this.showImage(this.pausedAt);
this.pausedAt = null;
};
a = new Gallery("a", _root.holder);
_root.onMouseDown = function() {
a.pause();
};
_root.onMouseUp = function() {
a.resume();
};

Slideshow Help Needed
I am using the slide show tutorial from the kirupa main site,

My problem is that i want to be able to load swf's into the slide show and play for the full length of the swf, but the delay feature overides this after 3 seconds and moves onto the next image.

how do i over come this

the code im using is

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("assets/xml/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();
};
// ///////////////////////////////////
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;
}
}
};
var myInterval;
function nextImage() {
p++;
p %= image.length;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
clearInterval(myInterval);
if (btn.playing) {
slideshow();
}
}
}
function prevImage() {
clearInterval(myInterval);
if (btn.playing) {
slideshow();
}
if (p>0) {
p--;
} else {
p = image.length-1;
}
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();
clearInterval(myInterval);
if (btn.playing) {
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);
nextImage();
}
}
btn.t.text = "Stop";
btn.playing = true;
btn.onPress = function() {
if (this.playing) {
this.playing = false;
clearInterval(myInterval);
this.t.text = "Play";
} else {
this.playing = true;
nextImage();

this.t.text = "Stop";
}
};

Slideshow Help Needed
Hi

I've got the below script for a horizontally sliding slideshow, i need help with 2 things though;

1. I want the slides to appear in the movie stationary and not sliding from right to left when the movie loads

2. I want the slides to stop sliding right/left when they reach the end of the array?? At the moment they just keep sliding

this.createEmptyMovieClip("theScene", 1);
theScene._x = 80;
theScene._y = 45;
objectsInScene = new Array();
for( var i:Number = 0; i < 8; i++ )
{
attachedObj:MovieClip = theScene.attachMovie( "pane" + i, "pane" + i, i );
var attachedObj:MovieClip = theScene.attachMovie( "pane" + i, "pane" + i, i, {_x: ( i * 150) } );
}
theScene.onEnterFrame = function()
{
this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*15;
}
if (this._x>0)
{
this._x = 0;
}
if (-this._x>(this._width-Stage.width))
{
this._x = -(this._width-Stage.width);
}

Any help would be great

Thanks
Andy

Auto Slideshow Help Needed
Ok, I need help here...i created this picture slideshow for a website for work...i didn't put a whole lot of work into it, just enough to please my boss (by the way I'm no professional developer). IS there a way to decrease the size of it (it's at 319Kb now) or to make it better?

Slideshow

Any feedback on this would be great too (move mouse over parts of the map)
Map

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

Help Needed With Simple Slideshow
Hi!

I have this code to load an x number of photo's into my flash file:

Code:
var thisPhoto = new Array();
for (i=0;i<thisSlides;i++) {
trace (thisPhoto[i] = this["typePhoto"+i]);
// set contentPath for 1st slide:
_root.mediaContainer.photoHolder.contentPath = thisPhoto[0];
}
I use a Loader component to show the first photo:

Code:
_root.mediaContainer.photoHolder.contentPath = thisPhoto[0];
Now, my question:
I want to display the next photo after 2 seconds...and the next photo after that also after 2 seconds etc...so actually it should be a simple slideshow

Has anyone got some idea how to do this? I tried some things with setInterval, but no succes so far...

Regards,
Vic.

Help Needed To Position The Slideshow
I wanted to build a slideshow for myself but actionscripting seems like a mammoth task for me. i downloaded a suitable FLA file from this website – http://www.abrahamyan.com/exp.htm
Trying my very best to figure out if i could undedrstand & modify it and after many hours of study perhaps i got some glue but still unable to put to work. This slideshow component help to load dynamic images into the center stage. i want is to register the loaded dynamic images to be aligned from left and valigned from top during scaleing instead of scaleing at the center. I know I should've checked with the owner first but the email link of the website is broken. I will be very much appreciated if anyone could offer me any help or tips. Thanks in advance

Help Needed Slideshow Problems.
OK I have mad a simple slide show in flash and the actionscipt is equally as simple as I am a complete noob and dont know what Im doing.

The problem is that my slide show plays once, then loops back to the beginning (all good so far) then it freezes at the end of slide2. Whats going on? Why does it work the first time and then stop on the second run? Can anyone help please?

Here is the code I am using:

To move to the next slide I have:

stop();
function goNext(){
currentSlide.gotoNextSlide();
clearInterval(timer);
}
var timer = setInterval(goNext, 500);

To move to the 1st lside I have:

stop();
function goNext(){
_root.presentation.gotoSlide(_root.presentation.slide1);
clearInterval(timer);
}
var timer = setInterval(goNext, 500);

Thanks

Loading Swfs Into Swfs: Undesireable Result
Situation:
I am using one swf to import other swfs dynamically based on user input (menu with buttons that are dynamically configured once the SWF has loaded).

I built the framework/base (I will refer to this as mainframe.swf) movie in Flash, I then built the populating SWFS in Swish Max (they will be called ad.swf).

When I load the swish max movies into the flash, they show up in the right location and everything, but if the imported movie (ad.swf) has items/shapes that over hang the bounds of the movie, the show up in the framework swf.

and example can be seen here, the issue is in the second ad (CFP):
https://fieldnet3.massmutual.com/fnm...ig002-temp.xml

I want to restrict the visible area of the loaded movie to the original movie that is it populating ( I replace a content holder.swf with ad.swf using a loadMovie). In the movie I am loading int the framework, I have created a white mask to block anything outside of the grey box. This just proves to obscure the buttons, title etc. in the mainframe.swf

The buttons are loaded dynamically as movie clips and I have assigned them to a level 10 levels above the movieclip that holds the ads, this doesn't seem to make them take precedence....

Any one have any ideas on how I can make the movie clip on the edges or make the buttons raise up?

Code availabe as needed.

Allen

Loading/Unloading - Swfs Inside Of Swfs
Here we go...

---------------------------------------------
I have a main.swf.

Main.swf contains 4 buttons(about, portfolio, contact, clients).

These for buttons call in external swfs(ex. portfolio.swf) into an empty movie clip on the main.swf stage.

inside portfolio.swf are three more buttons(print, web, logos)

When you click on one of these buttons they need to call in another external swf(web.swf) and also remove itself(portfolio.swf)
---------------------------------------------

That is where I run into my problem.


this is the code i am using for the original buttons on the main.swf:


Code:
function initMovieLoad(path) {
movieToBeLoaded = path;
if(!initializedExternalMovies) {
initializedExternalMovies = true;
loadNewMovie();
} else {
target.gotoAndPlay('midpoint');
}
}

_global.loadNewMovie = function() {
target.unloadMovie();
target.loadMovie(movieToBeLoaded);
target._y=-130;
target._x= -160;
}


var mc:MovieClip = this.createEmptyMovieClip('target', this.getNextHighestDepth());

initMovieLoad('intro.swf');

this.homeBTN.onRelease = function() {
initMovieLoad('home.swf');
}

this.aboutBTN.onRelease = function() {
initMovieLoad('about.swf');
}

this.portfolioBTN.onRelease = function() {
initMovieLoad('portfolio.swf');
}

this.clientsBTN.onRelease = function() {
initMovieLoad('clients.swf');
}

this.contactBTN.onRelease = function() {
initMovieLoad('contact.swf');
}


I thought I could just place this code inside the portfolio.swf and boom, everything would be set. but it didnt work.

I need to know how to call from the main.swf that web button inside of the portfolio.swf to bring in the web.swf



Any ideas would help at this point. THX

Jpeg Gallery Help: Slow Loading + Trouble With Loading Gallery Swf Into Other Swf
HI (PC MX2004)

I am using the code below to load dynamically load jpegs into the swf. I am then loading that swf into another swf using loadMovie on a button. I have two unavoidable problems. Firstly when I click a button to load the swf all I get is the 'loading' text. then I click a different button for a different swf gallery and those images work fine. Then I click back on the first button and the images. I have attached a test file to illistrate this.

Secondly with the code below, the jpegs are fine up to about 7/8 then it slows down. I need to be able to have up to 25 images in each gallery. Is it something in the code or am I better off changing to an xml gallery? Much appreciated

link to show patheticness of transitions is http://www.louisasloan.com/gallery/drawings.html




Code:
code: //on layer called var//

var totalNumPics=1;
var maxDepth=1000;
var cpicnum=0;
var xi=50;
var yi=20;
var btnWidth=25;
var path="pics/1image";
var currentpic=0;



//on layer called functions//


function fadeout() {
if (this._alpha<0) {
this.onEnterFrame = undefined;
} else {
this._alpha -= 15;
}
}
function fadein() {
if (this._alpha>95) {
this.onEnterFrame = undefined;
} else {
this._alpha += 15;
}
}
function loadNextPic() {
if (_root.cpicnum<_root.totalNumPics) {
var pic_mcl = new MovieClipLoader();
var listener:Object = new Object();
listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
trace(target+".onLoadProgress with "+bytesLoaded+" bytes of "+bytesTotal);
_root.percent = int(bytesLoaded*100/bytesTotal);
};
listener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number) {
_root.percent = "Done!";
var param = {_x:(_root.xi+_root.cpicnum*_root.btnWidth), _y:_root.yi};
var temp = _root.attachMovie("btn", "btn"+_root.cpicnum, _root.getNextHighestDepth(), param);
temp.num = _root.cpicnum+1;
if (_root.cpicnum == 0) {
_root["picHolder"+_root.cpicnum].onEnterFrame = _root.fadein;
}
_root.cpicnum++;
loadNextPic();
};
var temp = _root.attachMovie("picHolder", "picHolder"+cpicnum, maxDepth--, {_alpha:0, _x:50, _y:50});
pic_mcl.loadClip(_root.path+_root.cpicnum+".jpg", temp);
pic_mcl.addListener(listener);
}
}
loadNextPic();
// I added the below code to solve previous problem of loaded swf taking charge stage and emptying all other swfs. i am not sure if that is correct terminology but it fixed problem somehow on stage
this._lockroot = true;

Slideshow Actionscript Solutions NEEDED
Looking for action script solutions with the capability of running a slide show seperated into sections, each section contains a series of vector imported logo designs.
The major problem is keeping my file sizes to a minimum, while showcasing the variety of work in each section of the portfolio site.
It is a simple next and previous button run, indexed with alphabetical sections within each sub-category.
Any help would be greatly appreciated, Thanks.
Hanoshi

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!

Help Needed On Making A TweenMax Slideshow
I wanna create a slideshow like:

http://www.htc.com/www/product.aspx

Where each product slide off the page and came in another with a next and previous button

But I am stuck with this actionscript 3.0:

stop()
import gs.TweenMax;
import gs.easing.*;

TweenMax.from(pix01_mc, 1, {blurFilter{blurX:50}, x:900, ease:Expo.easeOut, delay:1});
TweenMax.from(pix02_mc, 1, {blurFilter{blurX:50}, x:900, ease:Expo.easeOut, delay:1});
TweenMax.from(pix03_mc, 1, {blurFilter{blurX:50}, x:900, ease:Expo.easeOut, delay:1});
TweenMax.from(pix04_mc, 1, {blurFilter{blurX:50}, x:900, ease:Expo.easeOut, delay:1});
TweenMax.from(pix05_mc, 1, {blurFilter{blurX:50}, x:900, ease:Expo.easeOut, delay:1});

function onNextClick(evt:MouseEvent):void {
nextFrame();
}
next_btn.addEventListener(MouseEvent.CLICK, onNextClick);

function onPrevClick(evt:MouseEvent):void {
prevFrame();
}
prev_btn.addEventListener(MouseEvent.CLICK, onPrevClick);


Im kinda new at this Adobe Flash.
It will be greatly appreciated if anyone can advice.

Thanks.

Help Needed On Making A Generic Slideshow
I wanna create a slideshow like:

http://www.htc.com/www/product.aspx

Where each product slide off the page and came in another with a next and previous button

But I am stuck with this actionscript 3.0:

stop()
import gs.TweenMax;
import gs.easing.*;

TweenMax.from(pix01_mc, 1, {blurFilter:{blurX:50}, x:900, ease:Expo.easeOut, delay:1});
TweenMax.from(pix02_mc, 1, {blurFilter:{blurX:50}, x:900, ease:Expo.easeOut, delay:1});
TweenMax.from(pix03_mc, 1, {blurFilter:{blurX:50}, x:900, ease:Expo.easeOut, delay:1});
TweenMax.from(pix04_mc, 1, {blurFilter:{blurX:50}, x:900, ease:Expo.easeOut, delay:1});
TweenMax.from(pix05_mc, 1, {blurFilter:{blurX:50}, x:900, ease:Expo.easeOut, delay:1});

function onNextClick(evt:MouseEvent):void {
nextFrame();
}
next_btn.addEventListener(MouseEvent.CLICK, onNextClick);

function onPrevClick(evt:MouseEvent):void {
prevFrame();
}
prev_btn.addEventListener(MouseEvent.CLICK, onPrevClick);


Im kinda new at this Adobe Flash.
It will be greatly appreciated if anyone can advice.

Thanks.

Gallery Slideshow
I have a 4 pictures that I need to appear one by one in a loop in a frame. Each picture is also a clickable link to a website and the swf also have four bars. Each bar is associated with one picture and on mouseover the associated picture appears in the panel.

Each should stay for 3 secs and then the next picture should appear.

help will be welcome

This is the code on one of the buttons for the mouseover


Code:
btn_treasure.onRollOver = function () {
treasure_slide._visible = 100;
rush_slide._visible = 0;
oasis_slide._visible = 0;
equator_slide._visible = 0;
}
btn_treasure.onRollOut = function () {
}

Slideshow With Gallery
i was wondering if anyone knows of a tutorial for a slideshow and gallery together in one. basically i was wanting to have an area on the stage that would display the enlarged images and i wanted some thumbnail images under or next to the display area. if a person clicks on the thumbs they would enlarge onto the display area are but also want to allow them to play slideshow and even pause it and it would cycle through the same images as what the thumbs are. I can do the ideas individually but not sure how to combine them

Slideshow/gallery Help Please.
Hello, I am new to Flash and I recently purchased the new CS3.

I need a slideshow type object for my website. I don't want it to have a next button or for the user to have any control over it. I just want it to scroll through pictures and maybe add some fade effects (use seen this type of object many times before). How would I go about making one of these? Is this considered a slideshow?

I know CS3 has a template for a slideshow but it has the control panel with it and I'm assuming it would be easier if there was a pre-made slideshow that I can edit that is more related to what I'm trying to do...

Thanks.

XML Gallery/SlideShow
Ya, thats right, another xml gallery. Stringy motivated me!!
Preview one
Preview two
zip file here
zip file two with external text
zip file three with thumbs and images

Phoenix68 added a version that has the main image resize with the browser window here


Zip files were updated at 12/12/2005. Re-download if you have an older version. Couple bugs fixed

Some things to note.
XML nodes are set up like this

Code:
<image color="0x8E94AF">
<description>image 1</description>
<pic>splat.jpg</pic>
<link>http://kirupa.com</link>
</image>
<image color> is the main background color
<description> is description
<pic> is the name of jpg. IMAGES HAVE TO BE IN A FOLDER CALLED IMAGES!
<link> is the link to go to when the main image is clicked.

The two examples are the exact same fla. This is what you have control over in the configuration layer.

a: The thumb display, wether full screen or use buttons and the way the thumbs come in, either slide up from the bottom or just blink in.
b: Colors: Thumb background, thumb preloader bar, info drop down box background, button background if "buttons" is choosen, arrow color, main image background box and hover caption background. I didnt give the option to change the text color because most will want to use thier own font anyway.
c: You also have total control over how everything is tweening. The main image box, the thumb slide left and right if "buttons" is choosen, the way the thumbs slide up if "slide" is choosen. And also the speed of how everything moves. Even the fade speed of the main image, in and out.
d: the border size around the image
e: if the first image loads or not
f: what you want the hover caption to say for the rollover and even if the node is left empty.

Here is a couple of FAQ's that I know will be asked.
1: How come I get an error that Im missing an .as file.
You need the laco tween component to make it work. Download the component here
Download the extension manager here if you dont already have it.

2:How do I change the speed of the timer.
Double click the timer_mc and just adjust the timeline.

Also, "nobuttons" and "blink" kinda work weird together. The thumbs load faster than the mc can center it self if the thumbs are cached. It doesn't break or anything, it's just cosmetic only.

The code for the fullscreen thumbs was taking from the flashlevel menu by Voetsjoeba. I do not take credit for this. But everything else is mine. And a big thanks to Scotty for helping me with a little math. Damn thumbs

Any questions let me know. I will try to answer as many as I can. But dont expect me to change anything. I think I gave you enough options as it is Any bugs you find post them here, Im only human


Josh

edit: there is no MX version, sorry.

double edit: Im already getting pms with people asking me how to install the lacoz tween and use it. I added a second zip file above that loads all the configurations from a text file. There is no .fla in that zip. If you dont have the lacoz tween installed, then whats the point

XML Gallery And Slideshow Help
First off let me say that this forum is a lifesaver. I managed to figure out the links in xml file myself, but I cant seem to get the next/previous buttons working the way I want them to.

I have got them to work to the point where they will bring up the next image, this is until it gets to the end of the xml node, then it wont start over from the beginning if I hit next.

Can someone help me -

Here is my code:


Code:
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
url = [];
delay = [];
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;
url[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
delay[i] = xmlNode.childNodes[i].childNodes[3].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() {
clearInterval(myInterval);
prevImage();
};
next_btn.onRelease = function() {
clearInterval(myInterval);
nextImage();

};

play_btn._visible = 0;
p = 0;
pause_btn.onRelease = function() {
clearInterval(myInterval);
pause_btn._visible = 0;
play_btn._visible = 100;
};
play_btn.onRelease = function() {
myInterval = setInterval(pause_slideshow, delay[p]);
pause_btn._visible = 100;
play_btn._visible = 0;
};

/////////////////////////////////////
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() {
pause_btn._visible = 100;
play_btn._visible = 0;
previous_btn._visible = 100;
next_btn._visible = 100;
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
url_btn = url[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
pause_btn._visible = 100;
play_btn._visible = 0;
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
url_btn = url[p];
picture_num();
}
}
function firstImage() {
previous_btn._visible = 0;
next_btn._visible = 100;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
url_btn = url[0];
picture_num();
slideshow();


}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}

function slideshow() {
myInterval = setInterval(pause_slideshow, delay[p]);
}

function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}

Slideshow / XML Gallery Help
Hi there, this is my first post! I am not a programmer, but have managed to combine the slideshow, image gallery and hover features of the provided scripts to create a slideshow that you can control with the previous and next buttons. I have also been able to connect it to an access database so you can control the images / info through Content Management console . . . . . once this has been sorted I will post the code here, if its any use to anyone.

Here is the script!

delay = 5000;
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
url = [];
link = [];
caption = [];
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;
url[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
link[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
caption[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;

}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images_sort.asp");
// ///////////////////////////////////
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();
};
// ///////////////////////////////////
p = 0;
spacing = 10;
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;
if (Math.round(filesize/loaded) == 1 &&

picture._width != 0 && picture._height != 0) {
var w = picture._width+spacing, h =

picture._height+spacing;
border.resizeMe(w, h, id);

}
}
};
//getURL statement
picture.onRelease = function() {
getURL(link[p], "_blank");
};
//
//Hover Caption
picture.onRollOver = function() {
captionFN(true, caption[p], this);
this.onRollOut = function() {
captionFN(false);
};
};
//
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
link_txt.text = url[p];
cap.desc.text = caption[p];
picture_num();
slideshow();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
link_txt.text = url[p];
cap.desc.text = caption[p];
slideshow();
picture_num();

}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
link_txt.text = url[0];
cap.desc.text = caption[0];
slideshow();
picture_num();
}
}
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();
}
}

};

//Hover Caption Function
captionFN = function (showCaption, captionText, bName) {
if (showCaption) {
_root.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
cap.desc.text = captionText;
cap._width = 5*cap.desc.text.length;
cap._alpha = 100;
//
if ((bName._width+bName._x+cap._width)>Stage.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _root._xmouse+xo+10;
cap._y = _root._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};

It works great, apart from when I interupt the slideshow, the image selection goes mental - it starts ignoring where it is and what the interval is set to.

Has anyone alny ideas . . . . . .!

Thanks in advance

Pete

Xml Gallery ... Keep On Slideshow?
I tried to use the XML menu V3.0 from http://www.kirupa.com/forum/showthread.php?t=124931

and put the Xml gallery with Thumbnails but not slideshow, the problem is that the gallery displayed as slide show!!!

anyone know what is going on?!

I tried the first image scripts

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

or

function firstImage() {

if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture.image[0].pause;
}
}


can anyone give me some hints!??!

Photo Viewer Slideshow Urgent Help Needed
Here is the deal, I am a relatively new to web design. I have worked with html for a while, but Flash scares the crap out of me. I have spent days messign with it and the results can barely be seen. My wife has started a photography business, that is starting to go but she needs her photograph albums to be viewable online. Every photographer in our area uses some type of flash display, so I have been working hard to understand how I could create this for her ASAP, so that potential clients would have something to actually look at.

I used Bitmap to draw two designs for the tpye of photoviewers that I am thinking of. If anyone has source files with projects similar to this I would greatly appreciate it and be indebted to you! Any help is appreciated!

Thanks!

red

Resizing Slideshow...SORRY I NEEDED TO POST VERY DESPERATE
Sorry to extend the never ending chain of "resizing slideshow" posts. However, I REALLY REALLY need to fix this problem.

I went to the really long post for the "how did they do this? resizing slideshow." I downloaded vman's file which included the steps.
When I upload the files, which all look exactly like vman's, they don't show up.
Here is how I set it up:
Root Directory:
<folder: Arra>
<folder: pics1>
- pic1.jpg
- pic2.jpg
<folder:thumbs1>
-1.jpg
-2.jpg
DynamicGallery.swf
Popup.php
Filecounter.php
Thumbcounter.php

Everything seems to be set up right but the images don't load...PLEASE HELP

Slideshow Pause-fadeOut-fadeIn. Help Needed.
Hi there, I'm making a banner for a personal site that cycles through a set of images loaded from XML (makes it easier to add/remove images whenever I need to) and I have used the slidshow script located here: http://www.kirupa.com/developer/mx20..._slideshow.htm for the base.

What I have so far is working as expected, my images load with a fade in effect pause for a moment then cut off and the next image loads with the fade in effect (loop).

My problem is that I would like the images to fade out (quicker than the fade in) after the short pause but I cant work out where in the script I need to execute this.

Here is the script so far:

Code:
pauseDelay = 6000;
this.fadeInSpeed = 3;
this.fadeOutSpeed = 6;
// -----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].attributes.src;
}
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 (this.picture._alpha<100-this.fadeInSpeed) {
this.picture._alpha += this.fadeInSpeed;
}
}
};
p = 0;
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() {
pauseInterval = setInterval(pause_slideshow, pauseDelay);
function pause_slideshow() {
clearInterval(pauseInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
/*
MovieClip.prototype.fadeOut = function() {
if (this.picture._alpha>this.fadeOutSpeed) {
this.picture._alpha -= this.fadeOutSpeed;
} else {
nextImage();
}
};
*/
I got the prototypes for the fade in and fade out from another script on Kirupa and managed to succesfuly merge the fade in into the onEnterFrame function, but I am lost with the fade out, I've tried many different things but for the life of me have no idea where or how the fade out function should be.

Any help will be much appreciated, I know there is a guru or two here that could point me in the right direction in 2 seconds .

Cheers.

Resizing Slideshow...SORRY I NEEDED TO POST VERY DESPERATE
Sorry to extend the never ending chain of "resizing slideshow" posts. However, I REALLY REALLY need to fix this problem.

I went to the really long post for the "how did they do this? resizing slideshow." I downloaded vman's file which included the steps.
When I upload the files, which all look exactly like vman's, they don't show up.
Here is how I set it up:
Root Directory:
<folder: Arra>
<folder: pics1>
- pic1.jpg
- pic2.jpg
<folder:thumbs1>
-1.jpg
-2.jpg
DynamicGallery.swf
Popup.php
Filecounter.php
Thumbcounter.php

Everything seems to be set up right but the images don't load...PLEASE HELP

Timed Slideshow/Gallery
Can someone give me a clue to get started here.

I would like to make a dynamic slideshow. (in that it is pulling variables from an asp page)

I want it to change pictures with the click of a button but also have the picture change after 20 seconds or so on its own.

Because it is dynamic I cant just move along the timeline as you might normally. I need to somehow create a certain number of movies based on the imagenum variable from the asp and then move to the next movie either on a button click or after a time duration.

Has anyone done anything similar? Help?

Photo Gallery & SlideShow, Need Some Help
Hi,

First to say is, that iam really noob with Action Script, Only could understand (play & stop) 0_0


I download form flashkit some Fla file for dynamic flash Gallery

Ok..


I came up with only changing the Pics.... 0_o

I need help now with changing the code to add two things ( or three if you count the note* )

1- Fade in and out
2- Auto Change pic

This code is what is show on the first fram on the first layer


Code:
MovieClip.prototype.loadjpg = function (picName, holderName) {
var h = ((holderName == undefined) ? "holder" : (holderName));
this.createEmptyMovieClip(h, 1);
this._visible = false;
this[h].loadMovie(picName);
var id = setInterval(function (mc) {
if (mc[h]._width > 0) {
mc._alpha = 99;
clearInterval(id);
mc._visible = true;
mc.onComplete();
} else {
mc.onLoading();
}
}, 80, this);
};
_root.ind = 1;
viewer.pic.loadjpg("new shots/1.jpg");
viewer.pic.onEnterFrame = function () {
this._width = 394;
this._height = 320;
};
stop();



Anyone can show me how please hit me with it.


Note*

some times the Pics are too big which when it loads, it only shows some it. so if you can help with resize the whole pic, please advice.


Thanks in Advanced...

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