The Fade In/Out behavior in the library palette (animation/automatic) will probably do the job for you, one presets it to either fade in or out either automatically at the start of a sprite run or triggered by a call like:
sendSprite 10, #mFadeActivate
It's time based and doesn't freeze the score during fades, unless a score script is looping omn a single frame, expect to have to allocate some frames for the fade to take place over.
This behavior uses the lingo blend sprite property.
It's easy to setup an automatic fadein as a button first appears (triggered by on beginSprite), it's tougher to have a button fade it'self out as it is terminated.
on endSprite handler gets called as the sprite is about to terminate, but it's too late at that point to begin a timed fadeout. The useer action that initiates the section exit would have to start the timed fadeout, not actually exiting until the fade time has finished.
one brute force way to make a menu fade out:
instead of a navigation button script being:
on mouseUp
go to "section2"
end
-- it could be
on mouseUp
global destination
destination = "section2"
go to "menuexit"
end
menuexit wound be a marker on the menu page that starts a score animation that does a blend tween of the buttons.
a score script at the end of the fade out frames would be
on exitFrame
global destination
go to destination -- specified by last user button click
end
Main Topics
Browse All Topics





by: MediaMacrosPosted on 2005-05-18 at 05:39:14ID: 14026438
You can change it with lingo by changing hte blend state, but if you want it to be easy look at the DM Fade or DM Pack 1 transitions from www.dmtools.com