Topic: How can I change the default transition to a crossfade?

Can someone please post step by step code for changing the stock fade transition to a crossfade (fade from one photo into another).

Thanks.

Re: How can I change the default transition to a crossfade?

as we were told before transitions can easily be changed (topic: "questions before purchasing SV-Pro")... but how...?

will anybody please help us here in customizing the actionscript for a soft crossfade... i guess this is really a key topic in simpleviewer-pro customization matters...!

what i know is: the solution must be a brief rework of some code lines in the image.as file... but... my actionscript know-how is not yet as good as it takes to dare to tackle such a problem...

and... i have bought simpleviewer-pro... so i am asking as a customer...! wink

thx for any continuative reply...

Re: How can I change the default transition to a crossfade?

c'mon Felix, we paid our money. Why are you ignoring this important question???  :cry:

Re: How can I change the default transition to a crossfade?

Solution found:


function hideImage(){   
        //mFadeTween.continueTo(100,1);
        //mFadeTween.fforward();
        //mFadeTween.continueTo(0,Options.imageFadeLength);
        //mFadeTween.onMotionFinished = Delegate.create(this,fadeOutDone);
        mClip_mc.swapDepths(999998);
        mImageArea.fadeOutButtons();
    }


    function showImage(){
       
        resizeImage();
        mClip_mc.alpha = 0;
        mClip_mc._visible = true;
       
        //bring to top
        mClip_mc.swapDepths(999999);
       
        //wait imageFadeLength frames to fade up
        mFadeTween.continueTo(0,1);
        mFadeTween.fforward();
        mFadeTween.continueTo(0,Options.imageFadeLength);
        mFadeTween.onMotionFinished = Delegate.create(this,onFadeWaitDone);       
    }

Re: How can I change the default transition to a crossfade?

Cool - thanks for posting your solution. Unfortunately I don't have time to provide individual tech support for every issue.

Felix Turner
SimpleViewer Support Team.

Re: How can I change the default transition to a crossfade?

The given method fails if the images are not the same size/area: the old one doesn't fade.

A simpler mod is just to add the line:

mFadeTween.fforward();

as the last instruction in function showImage() to fast-forward wait while the previous image fade out; it then runs simultaneously with the new image's fade in.