View Full Version : Old "Credit" Function
JerryQuinn
11-05-2005, 06:42 PM
We've finally upgraded from AMS 4 to 6 and I can't quite recreate the old "credit" splash image when exiting the application. I did manage to figure out that "Dialog.SplashImage("AutoPlay\\Images\\Credit.jpg", 5, true);" on ShutDown for Project Settings almost does it, but the application is still open behind it which looks a little weird. Anyone have any ideas on how to close out the application and then show the credit splash image for a specfified interval? Thanx in advance.
TJ_Tigger
11-05-2005, 08:41 PM
Certainly, just use Application.Hide to hide your project window, and then show the splash image, start a timer or use the Application.Sleep and when that is done, have it exit.
Tigg
yosik
11-05-2005, 11:44 PM
Why not do it simpler (sorry Tigg...).
1. Create your credit page (which now could also include any object you want...) and point all your "exit" buttons to it.
2. Inside the onTimer event of that page, just add Application.Exit.
3. Inside the onShow event, add Page.StartTimer(n) where n is the time you want the credit page to remain on.
Good luck
Yossi
Corey
11-05-2005, 11:53 PM
That's an excellent idea Yossi. You could even add a resize action to that page if you want a custom size exit splash. :yes
rhosk
11-06-2005, 02:00 AM
I see what you're saying Yossi as far as choice of a shutdown page, but why all this timer stuff?
Window.Hide(Application.GetWndHandle());
Dialog.SplashImage("AutoPlay\\Images\\Credit.jpg", 5, true);
done :)
yosik
11-06-2005, 02:37 AM
Sorry Ron, but you're wrong.
What happens AFTER the Splash? You are stuck with the app still running and need to close it.
The way I proposed mimicks almost exactly the way ver 4 did it. And, Corey, you are 100% right about the custom size (and add a mask with setMask.DLL...).
Yossi
rhosk
11-06-2005, 03:05 AM
Yossi, the actions I presented are on the shutdown event, the "exit" is already invoked :)
yosik
11-06-2005, 05:57 AM
Ah...OK. Understood...Sorry. :)
Yossi
JerryQuinn
11-06-2005, 07:32 AM
Thanks to all for your ideas and dialogue.
Window.Hide(Application.GetWndHandle());
Dialog.SplashImage("AutoPlay\\Images\\Credit.jpg", 4, true);
works just fine for my purposes when it's tied to "On Shutdown" in Project Actions, but I'll certainly keep Yosik's idea (and Corey's embellishment) in mind if I want to go a little slicker and end with a video of our revolving logo along with the credit info intead of just a static graphic.
TJ_Tigger
11-06-2005, 11:02 AM
If you do go the route of directing all the exit functions to a particular page, take a look at the built-in function QueryAllowProjectClose ( ). This will catch the application whenever it tries to close so you can make sure they are directed to the credit page.
Tigg
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.