Yet Another - Simple Dynamic Slide Show
Hi Guys,
Ok, i've done a search for slide shows, but none are really what I'm looking for, of course I could have easily overlooked the one post that would have helped me since there is an overwhelming amount.
What I would like to acheive is an automated slideshow, it grabs pictures, loads them, displays them for a set amount of time, goes to the next until it reaches the end the goes back to the start. No transitions, just a dynamically updatable automated slide show, *inhale*
The thread I found that is most similar to what i need is:
http://www.flashkit.com/board/showth...hreadid=471327
The replier was nice enough to supply a .fla, which was helpful except being the AS n00b that I am I couldn't figure out how to add the 'automated' part to the slideshow I want to modify it into.
Calling the gurus, Thanks,
ZeypheR
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-01-2003, 04:42 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Simple Slide Show
Whats the easiest route to take to make a fading slide show like the one below? Any help would be greatly appreciated
http://www.potterybarn.com/
Help With Simple Slide Show
I'm embarrassed to post this, it's so simple I'm sure, but it's really kicking my behind.
Lets say I have 3 jpgs (converted to MC's) on the stage. I would like to, via actionscript, after 5 seconds have the first one fade 0% alpha. Then another 5 seconds passes. Then the 2nd jpg MC fades to 0% alpha, leaving the 3rd. And that's it! I've been able to get either to work, but not both. Would anyone mind giving enlightenment to a weary soul?
Thank you!
Simple Slide Show
Does anyone know how to do a picture slideshow similar to the one found on http://entertainment.msn.com/, without the user control buttons, but with the "blinds" effect?
Simple Slide Show Help
Hi. I'm using Flash MX. I searched through the forums to look for some tutorials on creating a slide show. I tried to look at some of the files there but most of them wouldn't open for me, I assume because they were made in Flash MX 2004.
I found the following tutorial on the kirupa site(http://www.kirupa.com/developer/mx/photogallery.htm) and was trying to modify it to behave exactly like the one on this site (http://www.808inc.com), where the images fade in above the previous image and their are no forward and previous buttons.
I'm not very good at actionscripting so any help would be greatly appreciated. Thanks!
Simple Slide Show Help
Hi. I'm using Flash MX. I searched through the forums to look for some tutorials on creating a slide show. I tried to look at some of the files there but most of them wouldn't open for me, I assume because they were made in Flash MX 2004.
I found the following tutorial on the kirupa site(http://www.kirupa.com/developer/mx/photogallery.htm) and was trying to modify it to behave exactly like the one on this site (http://www.808inc.com), where the images fade in above the previous image and their are no forward and previous buttons.
I'm not very good at actionscripting so any help would be greatly appreciated. Thanks!
Simple Slide Show Help
Hi I am trying to do a really simple slide show.
I have 4 words that I want to rotate between by either fading into each other or bluring into each other.
Is there a tutorial I can follow for something like this?
Help Me Make A Simple Slide Show
can some1 show me how to make a slide show in Flash
i want it to cycle through the images when started and also have buttons to speed up, slow down, pause and of course play.
i think its something to do with setInterval?? clearInterval?? im not sure how to use them in actionscript
thanx ppl
Simple Slide Show Template
Hey, anyone have a simple template for showing pictures? I don't want to use PowerPoint, but need something where I can click on little thumbnail images and have them enlarge. It's for an office lecture I'm doing. I have about 20 pictures and would like to have a template where all I have to do is click on them and they go to full size, click again and they go back to being a thumbnail. Any suggestions?
Any «SIMPLE» Slide Show Tutorials Out There?
Hello,
It seems eveywhere I look, guys want to make slide shows as fancy and complex as can be.
All I want to do is a dynamic slide show that will play 20 images from a folder. No fades in or out, no dynamic menu, no automation, no music, just the images with a >btn and a <btn.
Any idea? Any help is greatly appreciated, Oh God I'm lost with actionscript since objects got in there... I know it's for the best, but I still don't get it
Thanks
Zap
Simple Flash Slide-show
Hi,
Can someone help me find a simple images slide show that has nothing on it but displays and fades from one image to the next in an images directory?
Any help is appreciated.
Thanks,
Trint
How Do Simple 'slide Show' In Flash ?
I need to create a flash movie that shows a series of photographs in sequence. I need three buttons, one that toggles on/off the slide show, one that steps thru the pictures forwards manually and one that steps thru the pictures backwards manually.
I'd also like the photo changes to be fade-in/fade-out type transitions.
Is this simple or complex? I'm new to Flash but need to produce this in a hurry for a client.
The client needs to be able to change the photographs in the movie himself (he has Flash too).
Attempting To Make A Simple Slide Show
Hello all, I have just found Flash Kit, and it looks like I'll be getting quite an education.
I am pretty much a newbie with a basic understanding of Flash (as in, I comprehend how to do stuff, but somehow when I do, I stumble and get freaked!)
I am trying to make a slide show that will come up when a button is clicked.
This will be for a wedding planner site, on a page with other like buttons with like slide shows, so it'll be something like; "click here to see John & Nancy's wedding"
I tried using a button & a movie clip, they worked great independently, but together NO.
I feel like it's totally simple and I am just trying too hard (it's been 3 days of attempts)
So, bang me on the head and give me the simple solution I know is there!
Thanks!
Simple Slide Show With Rollver Links
Hi,
I am making very simple slideshow.
There are 6 images coming fadein and fade out one by one. I have 6 buttons in it. On rollover specific image should appear with fade in. On roll out the same slideshow should be continued as before.
Is there any simple and effective way to do this?
Thanks in advance
Slide Show Image Dispears 3 Minutes After Slide Show Is Stopped - Why?
I have created a slide show with a stop button. The buttons stops; but after about 3 minutes of being stopped, the image just disappears and all I see is the movie's background. Does anyone know why this is occuring? If so, is there a quick fix for this issue?
PS: I used one of the goToAndPlay Key Frame events built right into my software; I assume it was this (to make movie stop):
Code:
on(release) {
stop();
}
Simple Panning Slide Show Flash Actionscript Help
I'm trying to make a simple panning slide show. Right now I animated the images to pan but now I'm trying to get the movie clip to reset to it original position once its panned all the way across. Here is the action script I'm using to move the movieclip. The way I have it reseting is by clicking but how can I change this to happen when the clip reaches a specific place on the x axis. Here's what I have (My movie clip's instance name is pictures)
onClipEvent(enterFrame) {
speed = -1;
this._x += speed;
}
on (release) {
_root.pictures._x = 1383;
}
Dynamic Slide Show With XML
Dear friends,
We are describing you in details of a flash presentation problem -
" Ita a presentation where the pictures will come from the external image folder through xml file. On the stage of the presentation there is "previous" and "next" button to call the images one by one. On the left side there has a movieclip name "tmc", in which an array(14 array,viz nat, fra,........., nef, xef) is being created. Now as we r clicking on the next or previous button,image according to xml placement is coming and from the "tmc" movieclip one by one text is animating. It is happening for each image. That mean it should have same no. of images with the text in "tmc" movieclip and no. of arrayes. For exam. 14 images in xml file, 14 heading under "tmc"movieclip and 14 arrayes.
On the first frame of layer 1 the scripts are :
stop();
txtcount=0;
names=new Array();
if((_root.ftime==null) || (_root.ftime=="uma") || (_root.ftime=="")){
trace("yes");
num=0;
}
else{
num=num-1;
}
labels = new Array("nat", "fra", "ref"); //this is the array in "tmc"movieclip//
slide = false;
function loadimg(num) {
if(_root.names[_root.names.length-2]!=_root.names[0]){
_root.names[_root.names.length-2].removeMovieClip();
}
//for side text animation which is in "tmc"movieclip//
if(_root.txtcount==3){
_root.txtcount=0;
}
trace("num "+num);
_root.tmc.gotoAndPlay(_root.labels[_root.txtcount]);
_root.txtcount++;
// load image from image folder through xml //
link = _root.links[num];
trace("link "+link);
lev=num;
if((_root.end) || (_root.names.length==_root.link.length)){
for(i=0;i<_root.names.length;i++){
_root.names[i].removeMovieClip();
}
_root.names.length=0;
_root.end=false;
}
name="holder"+lev; //"holder"is a movieclip for placing the images on flash//
holder.duplicateMovieClip(name,lev);
_root[name].loadMovie(link,1);
names.push(_root[name]);
this.onEnterFrame = function() {
// trace the percentage of the movie that has loaded//
percen = (_root[name].getBytesLoaded()/_root[name].getBytesTotal())*100;
percen=Math.ceil(percen);
if (!isNan(percen) && (_root[name].getBytesTotal()!=18)) {
trace(percen+"% loaded");
} else {
trace("0% loaded");
}
if ((percen == 100) && (_root[name].getBytesTotal()!=18) && (_root[name].getBytesLoaded()==_root[name].getBytesTotal())) {
_root[name]._height = 600;
_root[name]._width = 800;
delete this.onEnterFrame;
}
};
//captions, which will come with each image through the xml file//
_root.loadmc._visible=false;
bottom.testing.text=_root.captions[num];
_root.ftime=5;
}
function loading() {
if(_root.num==_root.links.length){
_root.num=0;
_root.end=true;
}
_root.circle._visible = false;
loadimg(_root.num);
_root.num++;
}
trace("uma"+num);
_root.intervalID = setInterval(loading, 5000);
Now what client want is that under some head in the "tmc" movieclip more than one image will come and by the time that specific menu heading in the "tmc" will be hilighted.
So this is the problem all about. Please help us and we are awaiting for your reply as early as.
Thanking you,
Subhabrata Roy
Avijit Sarkar
Dynamic Slide Show Help
Hey all,
I've implemented the dynamic slideshow example found here on kirupa.com - you know, your basic 'have xml doc tell flash what jpegs to load into an empty movieclip' type of deal.
However, I've modified it such that when these images are loaded in, they're centered to the Stage - and also, I've implemented some code that will check to see if the image is larger than .7 of the stage (the intended viewing area), and resizes it if it is.
It works just fine when it iterates through the first time, but when it loops back to the first image, things start getting rescaled according to the size of whatever the largest image was, with the effect that the images effectively 'shrink' when it loops.
Can anybody help me figure out how to make my dynamic slideshow have centered, auto-resized images? I don't want to be forced to make all images the same size, or specify their dimensions in the XML doc.....
Code for resize/center (placed on the empty movie clip that contains the loaded images):
onClipEvent(enterFrame)
{
checkPictureSize();
centerPicture();
}
onClipEvent(load){
function checkPictureSize()
{
scalar = (this._height / this._width);
if (this._width > (Stage.width * .7))
{
this._width = (Stage.width * .7);
this._height = (this._width * scalar);
}
}
function centerPicture()
{
wDiff = (Stage.width - this._width);
hDiff = (Stage.height - this._height);
this._x = wDiff/2;
this._y = hDiff/2;
}
}
AS2 - Dynamic Slide Show
I have purchased the following app http://www.ultrashock.com/#/asset/40...olio-menu.html as it is close to the slideshow navigation my client is requesting. Although they need it to look like http://www.wyevale.co.uk. I searched the internet but to no avail. I tried programming it myself without success - I keep any getting errors. Your help would be much appreciated.
Dynamic Slide Show Problem
hi,
i'm trying to put together a dynamic slide show that loads jpegs from an XML file into a series of dynamically generated empty movie clips.
i'm basically using createEmptyMovieClip to create as many empty movie clips as there are jpegs, setting the _visible property of all empty movie clips to false, loading my jpegs into each empty movie clip using loadMovie, and toggling the _visible property of the current slide to true.
this all makes perfect sense to me in theory, but in practice, i can't seem to change the _visible property of the empty movie clips... or rather, i am able to change the _visible property of the movie clips (i confirmed that the property was actually changing through a series of trace tests), but the change has no effect on the jpeg contained in that movie clip... the jpeg remains visible at all times!
i tried replacing all instances of myMovieClip._visible = false with myMovieClip._alpha = 0 and that works perfectly. i also replaced myMovieClip._visible = true with myMovieClip._alpha = 100, and that also works.
the question is WHY?? why can't i toggle the _visible property in my script? i was able to make the jpegs appear and disappear by creating a button that toggled myMovieClip's _visible property... how come i can't do it in my current script?
here's the relevant portion of my script... thanks a lot
function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
//create my empty movie clips.
for (i=0; i < totalSlides; i++) {
targetMC = "slide"+(i+1);
_root.createEmptyMovieClip(targetMC, i);
_root[targetMC]._x = 0;
_root[targetMC]._y = 0;
_root[targetMC]._visible = false;
}
preloadSlides();
showCurrentSlide();
}
}
//load the jpegs into the empty movie clips.
function preloadSlides() {
for (i=0; i < totalSlides; i++) {
targetMC = "slide"+(i+1);
imagePath = currentSlideNode.attributes.jpegURL;
_root[targetMC].loadMovie(imagePath);
currentSlideNode = currentSlideNode.nextSibling;
}
}
function showCurrentSlide() {
_root[currentSlide]._alpha = 0;
currentSlide = "slide"+currentIndex;
_root[currentSlide]._visible = true;
}
Help, Dynamic Text With Slide Show [FL MX]
I got from DEVNET a slide show code and a load variable text code.
I put a dynamic text box on the botton of the
slide show, and I would like that, when the next or the back buttons are pressed, the variable will change according with the picture that will be showing.
image1.jpg will have the scroller.text = var1
image2.jpg will have the scroller.text = var2
image3.jpg will have the scroller.text = var3
I tried to include the following code and it didn't work:
if (input = 1) {
scroller.text = this.var1;
} else {
if (input = 2) {
scroller.text = this.var2;
} else {
if (input = 3) {
scroller.text = this.var3;
Thanks in advance for any help.
Rogerio
Here are the two codes:
loadVarsText = new loadVars();
loadVarsText.load("test.txt");
loadVarsText.load("test2.txt");
loadVarsText.load("test3.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
} else {
trace("not loaded");
}
if (input = 1) {
scroller.text = this.var1;
} else {
if (input = 2) {
scroller.text = this.var2;
} else {
if (input = 3) {
scroller.text = this.var3;
};
//initialize variables and properties
square._alpha = 0;
whichPic = 1;
//initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<3 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};
back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("./images/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>3) {
input = 3;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};
Dynamic Scrolling Slide Show
Have searched here and on the web, but I have been unsuccessful in finding a tutorial. I am looking to create a dynamic scrolling slide show. I am looking for it to scroll horizontally, load an external txt file that tells the flash file how many and where to load the external files from. Then load these external files in linear fashion and scroll based on the total length of the files.
Thank you for any help in advance.
Dynamic Slide Show Problems
Want the slideshow to scroll both horizontally and vertically (at same time). Have no problems going horizontal using the follwing script on a button:
on (rollOver) {
setProperty ("_root.menuclip.markerback", _x, "7750");
}
But when I try and add the _y co-ordinate it does not work:
on (rollOver) {
setProperty ("_root.menuclip.markerback", _x, "7750");
setProperty ("_root.menuclip.markerback", _y, "436");
}
Have looked over the internet for a solution to my problem and found a couple that use a different method of scripted movement, but the end result is totally different to what I want. Hopefully one of you flash gurus' will know where I am going wrong!
Thanks in advance for any help/suggestions you may come up with.
Dynamic Jpg Slide Show Problem
Hello
I've searched and found a lot of info concering dynamic jpgs and stuff, but I just have a very simple problem.
I want to dynamically load 50 jpgs in a slide show...nothing fancy, just one image after the other. It's just that they loop through so fast that all I get is the last image. I wanted to pause for about 3 secs before showing each pic. Here's my code I'm using so far...
for (var i = 1; i<51; i++) {
loadMovieNum(i +".jpg", 1);
//I would like to pause right here for 3 secs
}
The images are only 200x150 so they load pretty fast. Can someone please please help me. Your assistance is greatly appreciated. Have a very blessed day.
Greg
Problem With Dynamic Slide Show, Please Help
im trying to make a dynamicly loading slide show. I the first slide loads no problem but the external varriable that is hte total number of slides is not registering so the button (on the next slide button is coded) only reloads the first slide. please down load the file and take a look at it. thanks so much. im going crazy here
Help With Scripting A Dynamic Slide Show
I am trying to help a friend with his online comic website (like penny arcade or PVP) Bongo-online and I’m doing the site primarily with flash and I want it to be easily updatable by him. I want to make the comic section have forward and back, etc to make it easy to navigate but I want to be able to make it easy to update. Is there a way to code it so that it the "forward" button looks for the next picture in a numbered series loaded from an external source? Like the first comic is comic1.jpg and then you click next and it goes to comic2 and then next again will take you to comic3.jpg but if there isn't a comic3.jpg it automatically and simply goes back to comic1.jpg. The idea is that it is very easy to update and all he would have to do is simply add another comic to the directory. Also, features like most recent comic and last comic would be useful.
I have no idea if this is possible or not or where to even begin coding it.
If you have a better idea on how to get this type of functionality that is easily updateable please let me know...I know I could do this in flash pretty easy but my friend doesn't really know flash and I don't want to teach him so i want him to be able to do his updates with out having to load the .fla. He does know html though.
I know it is possible to load external jpgs...I have used code that looks something like this...
code:
root.createEmptyMovieClip("imageHolder1", 1);
imageHolder1._x=320;
imageHolder1._y=75;
loadMovie("archive.jpg","imageHolder1");
Dynamic Photo Slide Show
I'm in need of a little help in writting a code to loop some photos to fade in (and wait like 20 seconds) and out. I have multiple photos in my library and created a movie clip placeholder to fit them. This is basically where I need some help. Should I just import them from outside the file with loadMovie or is there an easier way?
Dynamic Slide Show Help Needed Please
Hey guys,
Had alot of hits on the other post but it wasnt responded to so i think i was asking too much from you all,
i realise you have lives unlike me (always working)
could someone please be able to do two(or one thing if you can)
1. in the following code
choice = Math.round(Math.random()*2);
switch (choice) {
case 0 :
location.loadMovie("image0.swf");
break;
case 1 :
location.loadMovie("image1.swf");
break;
case 2 :
location.loadMovie("image2.swf");
break;
}
could anyone tell me how to count how many swf there are in a target folder
and putting the value in like this
choice = Math.round(Math.random()*ValueCalledin);
instead of listing all the files and
2. set a limited time for that swf to play before it calls in the next random swf
im my very unexpert like way i thought (im a total AS beginner) that the script may look something like this
this.location = "Myfolder/";
choice = Math.round(Math.random(".swf")*value);
switch (choice) {
case random :
this.location.loadMovie(".swf");
for the first bit, i dont know lol
dont laugh too hard at my attempt lol
Help With Dynamic Text And Slide Show
I got from DEVNET a slide show code and a load variable text code.
I'm trying to add feature in the codes that when the next button or the back button
on the slide show is pressed will appears a text on the dynamic text box that I put in the botton of the slide show, releated wich the picture is showing on the slide show.
// image1.jpg will have the scroller.text = var1
// image2.jpg will have the scroller.text = var2
// image3.jpg will have the scroller.text = var3
I try to included the following code and with out any surprise it didn't work:
if (input = 1) {
scroller.text = this.var1;
} else {
if (input = 2) {
scroller.text = this.var2;
} else {
if (input = 3) {
scroller.text = this.var3;
Thanks in advance for any help.
Rogerio
Here are the two original codes from DEVNET:
loadVarsText = new loadVars();
loadVarsText.load("test.txt");
loadVarsText.load("test2.txt");
loadVarsText.load("test3.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
scroller.text=this.var1;
} else {
trace("not loaded");
}
};
//initialize variables and properties
square._alpha = 0;
whichPic = 1;
//initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<3 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};
back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("./images/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>3) {
input = 3;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};
________
Dynamic Scrolling Slide Show. Anyone?
I need to make a slideshow in flash where the stage stretches 100% width of the browser window and the images load in dynamically. I'm pretty well schooled in Flash, but I have never done this before. The images also need to scroll across the stage and stop scrolling on rollover. When you click on one of the images, it shows you a large popup of that particular image. Any help would be appreciated. Thanks!
JPearson311
Dynamic Slide Show Problems
Hi I am trying to create a slideshow with no buttons, I just want it start loading the images fading trhough them. The images should all be loaded from a external folder.
here is the code I have so far, but I can figure out how to make it load without hitting the next button.
square._alpha=0;
i.e. alpha=0
mypic=1;
_root.onEnterFrame = function() { // _root main movie timeline, when movie starts call function
next.onPress = function()
{
if (mypic < 10 && !fadeIn && !fadeOut)
{
fadeOut=true;
mypic++;
}
if (mypic >= 10)
{
mypic=1;
}
}
back.onPress = function()
{
if (mypic > 1 && !fadeIn && !fadeOut)
{
fadeOut = true;
mypic--;
}
if (mypic == 1 && !fadeIn && !fadeOut) // if image is on 1 go to the last image in series
{
fadeOut=true;
mypic=10;
}
}
{
if (square._alpha <10)
{
loadMovie("images/img"+mypic+".jpg", "square")
fadeOut=false;
fadeIn=true;
}
if (square._alpha > 10 && fadeOut)
{
square._alpha -= 10;
}
if (square._alpha < 100 && fadeIn && !fadeOut)
{
square._alpha += 10;
}
else
{
fadeIn=false;
}
}
}
Thank you for your help.
Andy
Help With Dynamic Text And Slide Show
I got from DEVNET a slide show code and a load variable text code.
I'm trying to add feature in the codes that when the next button or the back button
on the slide show is pressed will appears a text on the dynamic text box that I put in the botton of the slide show, releated wich the picture is showing on the slide show.
// image1.jpg will have the scroller.text = var1
// image2.jpg will have the scroller.text = var2
// image3.jpg will have the scroller.text = var3
I try to included the following code and with out any surprise it didn't work:
if (input = 1) {
scroller.text = this.var1;
} else {
if (input = 2) {
scroller.text = this.var2;
} else {
if (input = 3) {
scroller.text = this.var3;
Thanks in advance for any help.
Rogerio
Here are the two original codes from DEVNET:
loadVarsText = new loadVars();
loadVarsText.load("test.txt");
loadVarsText.load("test2.txt");
loadVarsText.load("test3.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
scroller.text=this.var1;
} else {
trace("not loaded");
}
};
//initialize variables and properties
square._alpha = 0;
whichPic = 1;
//initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<3 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};
back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("./images/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>3) {
input = 3;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};
________
MX Slide Show Using PHP For Dynamic Variables
i'm trying to set up a slide show that using external images, and variables received from a PHP script.
these are examples of variables received from php:
imageNum=4
Img0=image3.jpg
Img1=image1.jpg
Img2=image4.jpg
Img3=image2.jpg
dur=8000
the images would all need to be preloaded first, and then displayed in a movie clip called "holder". the slide show would play the images in order from Img0 through Img3. each image would be displayed 8 seconds (dur), and then go on to the next image, etc. if an image is clicked on, the next image in sequence is displayed. finally, the slide show would stop when it reached the last image (specified by "imageNum"). at the end of the movie, data collected will be posted back to a mysql database via php.
sorry, in advance, if my script seems stupid. i'm new to actionscript, and i'm having trouble creating the loop.
this is what i have:
Code:
x = 0;
for (x=0; x<_root.imageNum; x++) {
newImage = _root["Img" + x];
}
loadMovie("images/"+newImage,_root.imagesHolder.holder);
imagesHolder.onPress=function(){
loadMovie("images/"+newImage,_root.imagesHolder.holder);
}
startTime=getTimer()
_root.onEnterFrame=function(){
elapsed=getTimer()-startTime;
if(elapsed>_root.dur){
for (x=0; x<_root.imageNum; x++) {
newImage = _root["Img" + x];
}
loadMovie("images/"+newImage,_root.imagesHolder.holder);
startTime=getTimer();
}
}
stop();
i've having a few problems. first, all the images load instantaneously, but i wanted to set up with a variable delay between images (in this case "dur" equals 8 seconds).
second, i have no idea how to make a clicked image go to the next in sequence without breaking the loop.
third, i can't get the operator "<=" to work, so instead i just used
Code:
x<_root.imageNum
but it seems it should be
Code:
x<=_root.imageNum
i'd really appreciate some help. thank you.
Dynamic Flash Slide Show
Hi,
I'm looking for putting a slide show of the hot products on the home page.
The hot products are searched from in datatbase table (PHP + MySql).
I need to display 4 images at a time which needs to be scrolling from left to right. When I click on the picture it should go to a particular link.
Is there any way the flash file could read the images & links from a text file or any other formatted file like xml?
I did a search in google which brought many results but most of them dont allow links.
As I have no idea about scripting in flash, I would really need your kind help.
Awaiting for some replies
Faheem
Hong Kong
Flash Dynamic Slide Show
Im looking for a way (using flash MX) to dynamically retrieve and display photos in a region of a page.... ideally, the images would fade from one to the other.
I'd like it to automatically retrieve the JPEG image filenames from a particular folder OR if it helps I can create a recordes or array of all the filenames.
Has anyone seen anything similar to this out on the web or has anyone had any experience building something like this?
Thanks!
Help, Using Dynamic Text And Slide Show [FL MX]
// I got from DEVNET a slide show code and a load variable text code.
// I would like to do a code that when the next button or the back button
// on the slide show is pressed it appears the a text releated wich the picture is showing
// image1.jpg will have the scroller.text = var1
// image2.jpg will have the scroller.text = var2
// image3.jpg will have the scroller.text = var3
// I tried the following code and with out any surprise it didn't work:
// if (input = 1) {
// scroller.text = this.var1;
// } else {
// if (input = 2) {
// scroller.text = this.var2;
// } else {
// if (input = 3) {
// scroller.text = this.var3;
// Thanks in advance for any help.
// Rogerio
loadVarsText = new loadVars();
loadVarsText.load("test.txt");
loadVarsText.load("test2.txt");
loadVarsText.load("test3.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
} else {
trace("not loaded");
}
};
//initialize variables and properties
square._alpha = 0;
whichPic = 1;
//initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<3 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};
back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("./images/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>3) {
input = 3;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};
Flash Dynamic Slide Show Problem
I have been working on a slide show for way too long. I am trying to modify a script I found to work for me. Here is what I need:
1. after stopping the show, when you press on loop again, the picture needs to change immediately, rather than wait and appear not to work
2. when using the manual controls, and get to the end, it should loop back to beginning, just as it does in the automatic mode
3. when the show plays the 1st time, the 2nd image does not display, it is completely skipped.
The working url can be seen at http://www.borisphotography.com/port.asp
If anyone is willing to help me with this here is the code I have so far:
***********************************
function slideshow() {
input++;
if (input>=maxImageNumber) {
input = 0;
}
fadeOut = true;
whichpic = input;
}
//added lines 10, 11, 12 to make the slide show auto play automatically
clearInterval(intervalID);
showTimer = delay*4000;
intervalID = setInterval(slideshow, showTimer);
// end of added lines
square._alpha = 0;
whichPic = 0;
picturelist = new loadvars();
// creates the load vars object
picturelist.load("testshow.txt");
// loads vars from file txt
picturelist.onLoad = function(success) {
// check to see if vars are loaded before executing
if (success) {
maxImageNumber = picturelist["n"];
// trace(maxImageNumber);
// trace(picturelist["n"]);
slideshowButton.onRelease = function() {
clearInterval(intervalID);
showTimer = delay*4000;
intervalID = setInterval(slideshow, showTimer);
};
stopslides.onPress = function() {
clearInterval(intervalID);
};
// initiate change to new image when buttons are clicked
next.onPress = function() {
clearInterval(intervalID);
showTimer = delay*2000;
if (whichPic<picturelist["n"]-1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic+1;
}
};
back.onPress = function() {
clearInterval(intervalID);
if (whichPic>0 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic+1;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie(picturelist["picture"+whichPic], square);
// change this line if you want to hard code source files
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 5;
} else {
fadeIn = false;
}
// limit input field
if (input>maxImageNumber-1) {
// trace(input);
// trace(picturelist["n"]);
input = maxImageNumber-1;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
clearInterval(intervalID);
}
};
************************
Any help is greatly appreciated!
Setting Intervals For Dynamic JPG Slide Show
I'm trying to figure out the best way to set a time interval for a dynamic jpg slide show in which the .jpg's are coming off an array (as are the text for dynamic text fields). Tried a couple of ideas but nothing works. Here's my code pre-setInterval.
I'm thinking maybe I should put it in the nextPhoto function. I don't know.
----------
playlist = ["photo1", "photo2", "photo3"];
tracklist = ["This is Photo One", "This is Photo Two", "This is Photo Three"];
count = 0;
playing = "true";
photoNum = 0;
this.movieLoader.loadMovie(playlist[count]+".jpg");
this.photo_txt.text = tracklist[count];
function playPhoto() {
this.movieLoader.loadMovie(playlist[count]+".jpg");
this.photoNum = count+1;
this.photo_txt.text = tracklist[count];
}
function nextPhoto() {
if (count<(playlist.length-1)) {
count++;
} else {
count = 0;
}
playing = "false";
playPhoto();
}
function prevPhoto() {
if (count>0) {
count--;
} else {
count = playlist.length-1;
}
playing = "false";
playPhoto();
}
stop();
Question Re: Dynamic Slide Show Construction
Hello,
I have a client that wants a slide show with like 25 different photos, all the same size to basically cycle though on an endless loop. They want it all automatic, no buttons or anything...just starts and runs, fading from one image to another, with maybe like a 7 second delay on each photo.
The issue is, I want to find a quick way to do this without making a huge file with all the images embedded into the movie, each one on it's own layer with tweening and all that...that's simple to do, but I don't have the time...
What I'm envisioning is being able to load the images externally, having them fade in, sit for 7 seconds, then fade out into the next image...and just loop, with Actionscript driving the whole thing....
Is there an example out there or tutorial on something that works similar to this? I'm not much of a 'scripter', so I'd need all the help I can get...
Thanks much for any advice!!
Dynamic Slide Show - Sluggish Performance
I'm developing a product slide slow to be takin to conventions. To enable my bosses to swap out different parts depending on the convention they are attending I wrote it so the movie clip loads a text file line deliminated that lists image names, seconds to display, and text to display under the images. The images are loaded up front, takes about a second for the flash script to start responding but after that its ok. Average image size is 800x600 pixels, 20kb to 200kb depending on the image.
The transition I have coded is each image is displayed for designated time, then a white box movie clip slides down from the top to fully cover the image. The current image is set to ._alpha = 0, and the next image is set to ._alpha = 100. The sliding box movie clip slides up reveling the new image.
What I noticed is that On the UPWARDS transition the flash gets very sluggish, about 4fps. On the DOWNWARDS transition however, fps only drops to 16fps (default 20). I suspect it has to do with the idea that NOT showing an image portion is less intensive that SHOWING an image portion. But I'm having a hard time believing there would be that much of a difference.
Can any one think of a way to improve the process?
Heres my actionscript for the movie:
PHP Code:
// open file and part list of images for display
var galleryLoader = new LoadVars();
// flag for when loading is complete
var galleryLoaded = false;
var galItems = new Array();
// vars for gallery focus
var galIndex = -1;
var galIndexTime = null;
var galTransition = true;
var faderIn = true;
// frames per second
var FPS = 20;
var idealFPS = 20;
var frameCount = 0;
var lastSecond = getTimer();
var DispText = null;
var finished = false;
function timeScale (ideal) {
return ideal / _root.FPS;
}
_lockroot = true;
this._lockroot = true;
var controlstop = false;
// Splash Delay
var splashDelay = 3000;
var splashTime = 0;
var showSplash = true;
// define file parsing function
galleryLoader.onData = function( raw:String ) {
// check for error loading text file
if( raw == undefined ) {
trace("Error loading gallery.txt");
return;
}
var lines = raw.split("
");
for( var index in lines ) {
var itemProperties = lines[index].split(",");
var galItem = new Object();
galItem.dispTime = itemProperties[1];
galItem.dispText = itemProperties[2];
galItem.filePath = itemProperties[0];
//trace("Assigning dispText to: " + itemProperties[2]);
galItem.isloaded = false;
galItem.handle = _root.createEmptyMovieClip("item" + index, getNextHighestDepth());
_root.fader.swapDepths(galItem.handle);
//trace("Creating new loader for " + galItem.filePath);
galItem.onLoadError = function (target_mc:MovieClip, errorCode:Error) {
trace ("ERRORCODE:" + errorCode);
trace (target_mc + "Failed to load its content");
}
galItem.loader = new MovieClipLoader();
galItem.loader.parent = galItem;
galItem.loader.onLoadInit = function (target_mc:MovieClip) {
this.parent.isloaded = true;
//for(prop in this.parent)
// trace("this."+prop+" = "+ this.parent[prop]);
//trace("Entered on load init for " + galitem.filePath);
// if width is too large, resize image maintaining aspect ratio
//if(target_mc._width > Stage.width) {
var ratio = target_mc._width/target_mc._height;
target_mc._width = Stage.width -10;
target_mc._height = target_mc._width / ratio;
//}
// if height is too large, resize image maintaining aspect ratio
if(target_mc._height > Stage.height) {
var ratio = target_mc._width/target_mc._height;
target_mc._height = Stage.height -10;
target_mc._width = target_mc._height * ratio;
}
// make invisible
target_mc._alpha = 0;
// position center screen
target_mc._x = Stage.width / 2 - target_mc._width / 2;
target_mc._y = Stage.height / 2 - target_mc._height / 2;
//trace(_root.fader);
//trace("Load Init finished ..");
}
galItem.loader.loadClip(galItem.filePath, galItem.handle);
_root.galItems[_root.galItems.length] = galItem;
//trace("Filename: " + galItem[0] + ", Display time: " + galItem[1] + "s, Display text: " + (galItem[2].length < 2 ? 'none':galItem[2]));
}
//trace(_root.galItems);
//trace(_root);
}
// create movie clip to do fading
var fader = createEmptyMovieClip("fader", getNextHighestDepth());
fader.moveTo(0, 0);
fader.beginFill(0xffffff, 100);
fader.lineTo(Stage.width, 0);
fader.lineTo(Stage.width, Stage.height);
fader.lineTo(0, Stage.height);
fader.endFill();
// load images
galleryLoader.load("parts/list.txt");
// main loop
_root.onEnterFrame = function () {
// monitor fps always first
var newSecond = getTimer();
if(newSecond - lastSecond >= 1000) {
FPS = frameCount;
frameCount = 0;
lastSecond = newSecond;
} else
frameCount++;
/*// new method // old method prefered
var fpsdiff = getTimer() - lastSecond;
FPS = 1000/fpsdiff;
lastSecond = getTimer();
*/
// splash image
if(showSplash || controlstop) {
if(getNextHighestDepth() - _root.splash.getDepth() > 2)
_root.splash.swapDepths(getNextHighestDepth());
if(_root.splash._width != Stage.width || _root.splash._height != Stage.height) {
_root.splash._width = Stage.width;
_root.splash._height = Stage.height;
}
if(splashTime == 0 || controlstop) { splashTime = getTimer(); showSplash = true; }
if(getTimer() - splashTime > splashDelay) {
_root.splash._alpha = 0;
showSplash = false;
}
return;
}
// dont start unless all images are loaded
if(galleryLoaded == false) {
for(var index in galItems) {
if(galItems[index].isloaded == false) {
return;
}
}
}
// make text box
if(_root.DispText == null) {
_root.DispText = createTextField("picturetxt", getNextHighestDepth(), 0, Stage.height - 40, Stage.width, 40);
var myTextFormat = new TextFormat();
myTextFormat.font = "Arial";
myTextFormat.size = 24;
myTextFormat.bold = true;
myTextFormat.align = 'center';
myTextFormat.color=0xff0000;//black
_root.DispText.setNewTextFormat(myTextFormat);
}
// prevents needless loops through gallery items
galleryLoaded = true;
if(galIndexTime == null)
galIndexTime = getTimer();
if(getTimer() - galIndexTime > galItems[galIndex].dispTime * 1000)
galTransition = true;
// if we are transitioning, slide box in and hide current image, unhide next image and slide box out
// if we are the last image, make sure we stop;
if(galTransition) {
if(faderIn) {
if(fader._height < Stage.height)
fader._height += 15 * timeScale(idealFPS);
else {
fader._height = Stage.height;
// swap images
if(galItems[galIndex] != undefined)
galItems[galIndex].handle._alpha = 0;
if(galItems[galIndex+1] != undefined) {
galItems[galIndex+1].handle._alpha = 100;
}
faderIn = false;
// swap text
if(galItems[galIndex+1].dispText.length > 2) {
_root.DispText.text = galItems[galIndex+1].dispText;
} else {
_root.DispText.text = "";
}
}
} else if(faderIn == false) {
if(fader._height > 0){
fader._height = Math.max(fader._height - 15 * timeScale(idealFPS), 0);
} else {
fader._height = 0;
galIndex++;
galIndexTime = getTimer();
galTransition = false;
faderIn = true;
if(galIndex >= galItems.length) {
finished = true;
galIndex = -1;
reset();
}
}
}
}
}
// call back for external movie handlers
_root.reset = function() {
// hide any showing images
for(var i in galItems) {
galItems[i].handle._alpha = 0;
}
// hide any showing text
_root.DispText.text = "";
// show splash
_root.splash._alpha = 100;
_root.splash._width = Stage.width;
_root.splash._height = Stage.height;
// reset vars
showSplash = true;
splashTime = 0;
controlstop = true;
galIndex = -1;
faderIn = true;
galIndexTime = null;
galTransition = true;
faderIn = true;
// fader._alpha = 0;
}
Flash Presentation (dynamic Slide Show)
My goal is to convert a .ppt slide show into a program where the user can select the order in which the slides appear. I have been going through the help files in Flash and I have yet to see a way to do it easily. I think I could do it by keeping an array on the root of the order I want, then on each slide looking at that to see which one should come next, etc.... I'm thinking that there is an easier way. My original plan was to do it in regular "Flash mode" and not in the presentations, but I saw this option so I assumed that it would be easier to use it. Please let me know of any advice / tips, even if it means using a different program. Thanks!
MovieClip Slide Show W/Dynamic Captions + XML
Anyhelp anyone? This is the closest thread I came to achiving this..
but no fla to see visuals while creating in the process..
any help?
http://i61.photobucket.com/albums/h7...deShowinMC.jpg
http://www.gotoandlearn.com/forum/vi...asc&highlight=
Dynamic Slide Show With White Boxes Showing Up
I have been trying to build this application for a number of weeks now and have run into something that simply stumps me.
I have a photo gallery that loads photos, an mp3 and (eventually) a txt file that will have captions, photo credits and transition times.
Now when the first two pics load and transition, they have these weird white boxes covering the photos. When the transition between the photos is done, the white box goes away.
i have no idea where these shapes are coming from. The mp3 is not set to stream, I can interchange the photos and the problem persists, I have tried changing the depths.
THEY ARE GHOSTS IN THE MACHINE and are slowly driving me mad.
please help.
MX - Slide Show With Dynamic Resize And Cross Fade
Can anyone help me clean up this gallery coding. It works, but I wondered if anyone could indicate weaknesses in the scripting - maybe point me in the right direction!? You can download a zipped file here: zipped gallery folder . (Files generated on Mac). At the moment this movie scales a frame and loads a jpg into it onload. Then it generates buttons which run the slide show with scaling and crossfade. I've seen it done before - and better - but I wanted to generate my own movie.
Thanks ........... in anticipation!
So I'm either or a ?
Dynamic Masking And Image Fade Slide Show
Hii,
I want to pick image from external source and want to dynamic mask those images and make a slide show to change images with fade in fade out effect.
In other words i want both these effect dynamically. I want to display thses images in a customized photo frame type area and then give fade in fade out affect.....
Can anyone help me.
Thanks
Slide In Photo Slide Show(actionscript Newbie)
Hello good pple of the forum,
I have about four jpeg pictures, wat i want to do is a slide show. What i want is a movie whereby the first pic would slide up vertically, followed by the second pictures, third and fourth.
Thank you so much for your anticipate reply.
Cheers
|