Hey there,
Ok, so forgive me, I’m very new to Fuse, but it seems like the way to push forward. I’m trying to create a simple slidshow of 6 images with some text that fades in and out, then it moves on to the next slide.
I’m not quite sure what I’m doing wrong, but I can tell that its something to do with trying to reuse a Fuse object with a new MC.
Heres my code, if anyone has any suggestions, that’d be killer!
[AS]
import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse,PennerEasing,FuseFMP);
var fbot:Fuse = new Fuse();
var ftext:Fuse = new Fuse();
var ftop:Fuse = new Fuse();
function afterFuse():Void{
trace(“fuse complete”);
}
var current:Number = 1;
var newDepth:Number = 0;
var topImageLoaded:Boolean = false;
function showFirstImage(){
newDepth++;
_root.attachMovie(‘image’+current, ‘image’ + newDepth, newDepth);
imageName = this[‘image’+newDepth];
fbot.push({target:imageName, start_alpha:0, end_alpha:100, seconds:2, ease:"linear", func:showText});
fbot.start();
}
function showTopImage(){
if(current<6){
current++;
} else {
current = 1;
}
newDepth++;
_root.attachMovie('image'+current, 'image' + newDepth, newDepth);
imageName = this['image'+newDepth];
ftop.push({target:imageName, start_alpha:0, end_alpha:100, seconds:2, ease:"linear", func:showText});
ftop.start();
}
function showBottomImage(){
if(current<6){
current++;
} else {
current = 1;
}
newDepth++;
_root.attachMovie('image'+current, 'image' + newDepth, newDepth);
imageName = this['image'+newDepth];
fbot.push({target:imageName, start_alpha:0, end_alpha:100, seconds:2, ease:"linear", func:showText});
fbot.start();
}
function showText(){
trace(‘goin’);
newDepth++;
_root.attachMovie(‘line’+current, ‘line’+newDepth, newDepth);
textName = _root[‘line’+newDepth];
textName._x = 380;
textName._y = 270;
FuseFMP.writeFilter(textName, “Blur”, {blurY:50, blurX:50, quality:1});
ftext.push({target:textName, end_alpha:100, Blur_blurX:0, Blur_blurY:0, seconds:1, ease:“linear”, func:startTimer});
ftext.start();
}
function startTimer(){
var timer:Number = setInterval(hideText, 3000);
}
function hideText():Void {
clearInterval(timer);
ftext.push({target:textName, end_alpha:0, Blur_blurX:50, Blur_blurY:50, seconds:1, ease:"linear", func:chooseImage});
ftext.start();
}
function chooseImage(){
if (topImageLoaded){
showBottomImage();
} else {
showTopImage();
}
}
showFirstImage();[/AS]