To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 01-31-2003, 01:31 PM   #1
flashvragen
Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 43
fade in fade out pictures with actionscript

I need a actionscript for the following problem.

load external *.jpgs with loadmovie in a movieclip. The picture fade in and fade out. Then the next picture will fade in and fade out.

In Flash MX folder samples is a tutorial called load_images.fla This tutorial works with click on the button.

What I want is that the movie play itself.

ThanXS
flashvragen is offline   Reply With Quote
Old 01-31-2003, 03:32 PM   #2
aaron.martone
forever depreciated™
 
aaron.martone's Avatar
 
Join Date: Dec 2002
Location: Florida, USA
Posts: 448
lol.

You sorta make it sound like we're all a buncha flash junkies here to accept requests for work on custom flash coding. I don't think many vets here will give the entire code; instead we try to inspire people to learn flash than just hand over the code.

One needs to understand in order to become enlightened, my child. *gong plays*

You should brainstorm out an idea on how a system like that works. To me, I would setup an array of jpeg sources, and then systematically run them through a function who's purpose is to alpha fade in, wait a couple seconds, and alpha fade out; then a little check to move the array to the next index (and a cross check to start back at the beginning if you were at the end of the array, and do it all over again.
__________________
(am)™ :: aaron.martone ::
http://www.aaronmartone.com

"I see in layers; I think in ActionScript; Life is my animation and animation is my life.... oh, and I like corn dogs."
aaron.martone is offline   Reply With Quote
Old 02-01-2003, 08:28 AM   #3
flashvragen
Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 43
Solution

square._alpha = 0;
whichPic = 1;
_root.onEnterFrame = function() {
if (square._alpha>2 && fadeOut) {
square._alpha -=2;
}
if (square._alpha<2) {
loadMovie("../images/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
whichPic++;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha +=2;
} else {
if (whichPic>=6) {
stop();
} else {
fadeOut = true;
}
}
};
flashvragen is offline   Reply With Quote
Old 10-06-2009, 08:21 PM   #4
stefsterhb
Junior Member
 
Join Date: Apr 2009
Posts: 3
Hey do you now how to have the slideshow loop?


Posts: 43

Solution
square._alpha = 0;
whichPic = 1;
_root.onEnterFrame = function() {
if (square._alpha>2 && fadeOut) {
square._alpha -=2;
}
if (square._alpha<2) {
loadMovie("../images/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
whichPic++;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha +=2;
} else {
if (whichPic>=6) {
stop();
} else {
fadeOut = true;
}
}
};
stefsterhb is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:56 AM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.