Ghizza
06-04-2005, 10:51 PM
Hello everybody,
I have a symbol with this simple script that loads a different frame every three seconds.
stop();
tempo = getTimer();
this.onEnterFrame = function() {
if ((getTimer()-tempo) > 3000) { // three seconds
frm = Math.ceil(Math.random()*7);
tempo = getTimer();
gotoAndStop(frm);
}
}
In each frame I place a different small .gif
I import the symbol in the main scene and every three seconds I have a new image displayed in the stage.
Now I'd like to apply an alpha transition between the images, so that in each frame:
1 - the image gradually fades in (alpha 0%-100%)
2 - the frame stops for 3 seconds and i have my image displayed
3 - the alpha of the image gradually fades to 0%
4 - the movie "jumps" randomly to another frame
Can I apply this alpha transition with AS?
Is there a better code or for my request?
I'm sorry but I'm really a newbie (from Italy).
Thanks in advance.
Ghizza
I have a symbol with this simple script that loads a different frame every three seconds.
stop();
tempo = getTimer();
this.onEnterFrame = function() {
if ((getTimer()-tempo) > 3000) { // three seconds
frm = Math.ceil(Math.random()*7);
tempo = getTimer();
gotoAndStop(frm);
}
}
In each frame I place a different small .gif
I import the symbol in the main scene and every three seconds I have a new image displayed in the stage.
Now I'd like to apply an alpha transition between the images, so that in each frame:
1 - the image gradually fades in (alpha 0%-100%)
2 - the frame stops for 3 seconds and i have my image displayed
3 - the alpha of the image gradually fades to 0%
4 - the movie "jumps" randomly to another frame
Can I apply this alpha transition with AS?
Is there a better code or for my request?
I'm sorry but I'm really a newbie (from Italy).
Thanks in advance.
Ghizza