Good idea. On a couple of my machines (one Mac, one Win) the speed was so fast
that the fade was almost undetectable, so I went with:
repeat with N = 100 down to 1
set the blendLevel of stack "screencover" to N
wait 4 milliseconds with messages
end repeat
... and a similar repeat with N = 1 to 100.
That made the fade last .4 sec to about 1 sec depending on the machine, which is
an acceptable range for my need. Thanks for the ideas!
Phil
On 9/17/10 5:16 PM, Scott Rossi wrote:
Phil:
I don't know if you tried Klaus's suggestion (programmatically setting the
blendLevel), but you'll have more control compared to using the built-in
dissolve effect, and if I'm not mistaken the dissolve will look like crap on
Windows without QT installed. Just a suggestion.
on mouseUp
put the screenRect into pTargetScreenRect
showBlackScreen pTargetScreenRect
wait 3 seconds with messages
send "showNormalScreen" to me
end mouseUp
command showBlackScreen pTargetScreenRect
# pTargetScreenRect = the rect of your target screen
-- make a 'cover' stack to fill screen
create inv stack "screencover" -- temp stack, no need to save it
set the backgroundColor of stack "screencover" to black
set the blendLevel of stack "screencover" to 100 -- transparent
palette stack "screencover" -- make this stack the frontmost layer
set the rect of stack "screencover" to pTargetScreenRect -- size to
screen
show stack "screencover" -- but it's still transparent
-- make the screen go dark
repeat with N = 19 down to 0
set blendLevel of stack "screencover" to N * 5
wait 20 millisecs with messages
end repeat
end showBlackScreen
command showNormalScreen
-- make the screen look normal again
repeat with N = 1 to 20
set blendLevel of stack "screencover" to N * 5
wait 20 millisecs with messages
end repeat
delete stack "screencover" -- end the stack's existence
end showNormalScreen
Best Regards,
Scott Rossi
Creative Director
Tactile Media, UX Design
Recently, Phil Davis wrote:
Thanks so much everyone! Great tips all. Here is my final code, tested on
Mac
OS X 10.5.8 and Windows 7:
command showBlackScreen pTargetScreenRect
# pTargetScreenRect = the rect of your target screen
-- make a 'cover' stack to fill screen
create inv stack "screencover" -- temp stack, no need to save it
set the backgroundColor of stack "screencover" to black
set the blendLevel of stack "screencover" to 100 -- transparent
palette stack "screencover" -- make this stack the frontmost layer
set the rect of stack "screencover" to pTargetScreenRect -- make it same
size as screen
show stack "screencover" -- but it's still transparent
-- make the screen go dark
lock screen -- hide changes until all is ready for display
set the blendLevel of stack "screencover" to 1 -- almost opaque (0 causes
flash on Win 7)
set the defaultStack to "screencover" -- to make dissolve work right
unlock screen with effect dissolve fast -- to reveal black stack
end showBlackScreen
command showNormalScreen
-- make the screen look normal again
lock screen -- hide changes until all is ready for display
set the defaultStack to "screencover" -- to make dissolve work right
set the blendLevel of stack "screencover" to 100 -- transparent
unlock screen with effect dissolve fast -- to reveal normal screen
delete stack "screencover" -- end the stack's existence
end showNormalScreen
Best -
Phil
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
Phil Davis
PDS Labs
Professional Software Development
http://pdslabs.net
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution