Hi,
i’d like to make a loop of 3 images that fade in one after another with some time between the fades, i’d like to do it in code.
any1 got an idea how to do it.
thanx in advance
Hi,
i’d like to make a loop of 3 images that fade in one after another with some time between the fades, i’d like to do it in code.
any1 got an idea how to do it.
thanx in advance
wait a little bit, i’m working on something…i think i can help you!
did you try working with tween’s?
this is the action script for one picture,
import mx.transitions.Tween;
import mx.transitions.easing.*;
var tw1:Tween = new Tween(picture,"_alpha",Strong.easeOut,0,100,5,true);
picture.onRelease = function() {
if(this._alpha < 50) {
fadeIn(this);
}
else {
fadeOut(this);
}
}
function fadeIn(who) {
var tw:Tween = new Tween(who,"_alpha",Strong.easeOut,0,100,1,true);
}
function fadeOut(who) {
var tw:Tween = new Tween(who,"_alpha",Strong.easeOut,100,0,1,true);
}
make a movie clip with the instance name of picture and in that mc put the first picture…
the rest i think you can handle
ok take this, i think it will help you…if not, reply here!
thhanx a lot, but i can’t open the file. i suppose you’re using studio 8, i’m still using mx2004
yes, i’m using flash 8, i will make for mx2004
i can’t save for mx2004, make like this:
2 layers, action and movieclip
in movieclip layer make 2 keyframes(and in action layer the same)
pass this code in the first keyframe:
import mx.transitions.Tween;
import mx.transitions.easing.*;
stop();
var tw1:Tween = new Tween(picture,"_alpha",Strong.easeOut,0,100,5,true);
picture.onRelease = function() {
if(this._alpha < 50) {
fadeIn(this);
}
else {
fadeOut(this);
nextFrame();
}
}
function fadeIn(who) {
var tw:Tween = new Tween(who,"_alpha",Strong.easeOut,0,100,1,true);
}
function fadeOut(who) {
var tw:Tween = new Tween(who,"_alpha",Strong.easeOut,100,0,1,true);
}
import mx.transitions.Tween;
import mx.transitions.easing.*;
stop();
var tw1:Tween = new Tween(picture,"_alpha",Strong.easeOut,0,100,5,true);
picture.onRelease = function() {
if(this._alpha < 50) {
fadeIn(this);
}
else {
fadeOut(this);
prevFrame();
}
}
function fadeIn(who) {
var tw:Tween = new Tween(who,"_alpha",Strong.easeOut,0,100,1,true);
}
function fadeOut(who) {
var tw:Tween = new Tween(who,"_alpha",Strong.easeOut,100,0,1,true);
}
now play the movie…
now you can customize as you want, this depands on you.
give a short info if it’s working!
:: Copyright KIRUPA 2024 //--