View Full Version : Fading photo transitions
herrmann
08-07-2008, 07:28 PM
I'm very new to Actionscript and I have a question about a photo loop I'm creating for a website.
Click here (http://clients.herrmann.com/loeb/flash_intro/intro2.html) for an example. I want to slow down the square transition on the photos, but I would like the speed of the transition on the text boxes to remain as it is now. Is that something I can apply in the script on the main timeline or do I need to do that on the frames that hold the specific image?
Any help or suggestions are appreciated. Thanks!
atomic
08-07-2008, 07:32 PM
Can you attach your .fla?
herrmann
08-07-2008, 07:44 PM
File size is too big... I placed it on an ftp site:
http://clients.herrmann.com/file_manager/index.php
username and pw: actionscript
Thanks.
atomic
08-07-2008, 10:08 PM
The uploaded .fla seems a lot slower than the one in your link in your initial post?
What have you done? Lower the framerate?
herrmann
08-07-2008, 10:39 PM
I increased the time delay of the createSegments and the alpha fade in the newImage function... this is what they used to be:
createSegments();
top._x = bottom._x=maskes._x=0;
top._y = bottom._y=maskes._y=0;
time.stamp = getTimer();
function checkTime() {
if (getTimer()>=time.stamp+time.delay) {
time.delay = 50;
time.stamp = getTimer();
addSegment();
}
}
function newImage() {
for (var i = 0; i<maskTotal; i++) {
faders[i]._alpha = 30;
faders[i].image.gotoAndStop(bottomNum);
faders[i].faded = false;
container.push(faders[i]);
}
if (bottomNum == image.total) {
bottomNum = 1;
} else {
bottomNum++;
}
faders.splice(0, maskTotal);
bottom.image.gotoAndStop(bottomNum);
fadeNow = true;
addSegmentNow = true;
time.stamp = getTimer();
time.delay = 2000;
}
herrmann
08-08-2008, 07:05 PM
Any ideas?
atomic
08-08-2008, 08:04 PM
So is this new speed ok for you, or is just that you want to have the text transitions as it was before?
herrmann
08-08-2008, 08:38 PM
The new speed of the photo transitions is good, but I would like the text transitions to be quicker. Can I apply a function so that it only affects those text images?
atomic
08-08-2008, 09:26 PM
If you just only change the checkTime function below, it somewhat works, although I'm sure there's a better condensed way to identify odd numbers only in a range of numbers...
function checkTime() {
if (getTimer()>=time.stamp+time.delay) {
// text pictures below... odd numbers...
if(bottomNum==3 || bottomNum==5 || bottomNum==7 || bottomNum==9 || bottomNum==11 || bottomNum==13 || bottomNum==15){
time.delay = 50;
}else{
time.delay = 150;
}
time.stamp = getTimer();
addSegment();
}
}
herrmann
08-08-2008, 09:44 PM
Thank you so much! That works. Can I also apply this to the levels of the "faders[i]._alpha" under the newimage function? (so as to speed up the actual fade of the squares)
atomic
08-08-2008, 10:09 PM
Grrrrreat! ;)
Best way to find out is to try it my friend!
herrmann
08-08-2008, 10:22 PM
will do! Thanks again!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.