Search Results

Search found 42 results on 2 pages for 'splashscreen'.

Page 1/2 | 1 2  | Next Page >

  • Splashscreen ProgressBar in Eclipse RCP has "dirty" corners

    - by pimpf0r
    Hi there, I am using the RCP Splash Screen along with the built-in ProgressBar (AbsolutePositionProgressMonitorPart). The splash image has a blue background color, but the background of the progressbar seems to be white, which leads to some white corners. There is no "setBackground" on BasicSplashHandler nor does getContent().setBackground(Color) has any noticeable effect. I don't want to be too picky, but since the splash is the first thing you see from the application, I think its very important to be tidy. So, do you have any idea how to get rid of these corners?

    Read the article

  • SplashScreen covers any MessageBoxes in wxPython?

    - by Kevin
    I have a SplashScreen shown while my application loads in the background. Unfortunately, if any errors occur during the application's initialisation a MessageBox is shown - but is behind the splash. This prevents the user from seeing the message, and from dismissing it (the only way to quit is through task manager). Q: Is there any way of hiding the SplashScreen if any errors occur, or allowing MessageBoxes to display above it? I am using wxPython 2.8.10.1 with Python 2.6.5 on Windows.

    Read the article

  • Load first page on splashscreen using phonegap on android

    - by Syg
    Hi i'm using phonegap in conjunction with Jquery mobile. I'm trying to immediately fetch the main page, while showing the user a splashscreen. In PhoneGap for Android i'm using this super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl("file:///android_asset/www/index.html", 2000); While this loads the splash, it also delays the loading of index.html. It it possible to start fetching it right away? Also, if not with phonegap, has anybody done this using JQM instead of phonegap? UPDATE: After using it with a slower loading first page (doing a json request) it kinda looks like the splash screens shows for a longer period of time, so this appears to be the default behavior

    Read the article

  • How to open AsyncTask from a Thread

    - by Abhishek
    In my application I have created a SplashScreen that will b shown for 5 Seconds and after that it executes an if else case depending upon the values stored in the Preference file. If Preference file contains values then the AsyncTask code will run else the Login form will load. When i try to run my application. The thread is going to the Login form with the help of intent but when it comes to AsyncTask my application shows a force close error message. This is my SplashScreen code: public class SplashScreen extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.splashscreen); Thread timer = new Thread() { public void run() { try { sleep(5000); } catch(InterruptedException e) { e.printStackTrace(); } finally { if(GoGolfPref.getEmail(SplashScreen.this)!=null && GoGolfPref.getPass(SplashScreen.this)!=null) { new LoadingScreen(SplashScreen.this, SplashScreen.this).execute("login_page", Login.url+GoGolfPref.getEmail(SplashScreen.this)+"/"+GoGolfPref.getPass(SplashScreen.this)); } else { Intent in = new Intent(SplashScreen.this, Login.class); startActivity(in); finish(); } } } }; timer.start(); } } This is the error I am getting: 08-29 07:25:58.040: E/AndroidRuntime(2365): FATAL EXCEPTION: Thread-10 08-29 07:25:58.040: E/AndroidRuntime(2365): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() 08-29 07:25:58.040: E/AndroidRuntime(2365): at android.os.Handler.<init>(Handler.java:121) 08-29 07:25:58.040: E/AndroidRuntime(2365): at android.app.Dialog.<init>(Dialog.java:101) 08-29 07:25:58.040: E/AndroidRuntime(2365): at android.app.AlertDialog.<init>(AlertDialog.java:63) 08-29 07:25:58.040: E/AndroidRuntime(2365): at android.app.ProgressDialog.<init>(ProgressDialog.java:80) 08-29 07:25:58.040: E/AndroidRuntime(2365): at android.app.ProgressDialog.<init>(ProgressDialog.java:76) 08-29 07:25:58.040: E/AndroidRuntime(2365): at com.pnf.gogolf.LoadingScreen.<init>(LoadingScreen.java:130) 08-29 07:25:58.040: E/AndroidRuntime(2365): at com.pnf.gogolf.SplashScreen$1.run(SplashScreen.java:32) How to get this working? Thanks in advance...

    Read the article

  • iphone problem adding splashscreen

    - by zebra
    hi all, i've a little problem, i've add a default.png in my app and it work. I've modify my file, delete file and reference and upload my new file. On my iphone the image does not appear, only some second of blackscreen and after my app start. In the simulator the splashscreen appear. I've try to delete my app on iphone, make a clean all and rebuild & install but nothing... I've try to make clean all, close xcode, delete default.png to my project directory (sometimes exist, sometimes no), open xcode, add my file and build & install on my iphone but nothing... Any ideas?

    Read the article

  • Show SplashScreen Programmatically

    - by leo
    I'm currently working on a Java Application and it's my first Java App. So I created a file Splash.png and placed it into the source folder resourcesof the application. I already managed it to show the Splash image on startup, with the JVM param -splash:resources/Splash.png, but my question is; How can I show this splash screen again, but programmatically? I need this functionality for the About menu item.

    Read the article

  • Disable Outlook 2003 splash screen when auto-starting

    - by serhio
    I want to hide the splash screen of Outlook 2003. I currently have it set to auto-start and hide to icon. Every time I start my computer I see the Outlook splash screen which makes me think that it's slowing down the OS to become "operational" after startup. What do I change in settings to not have the splash screen display on startup?

    Read the article

  • Ubuntu purple splash screen with blinking pixels?

    - by joxnas
    I had ubuntu 9.10 I upgraded to 10.04 after solving some problems (freeze at boot). Since then, I don't have the ubuntu's logo showing up when I boot, but a purple screen with some blinking pixels. I didn't care much about it... but today my computer took too long at that screen (normally it was just 1/4 second, but today it was like a minute..). And it happened like 4 or 5 times in a row (Only at the 5th time I realised that it was not freezing up, but it simply would took more time) After a reboot, it is again 1/4 second of purple screen but I don't want this problem to return.. so I want to get rid of the purple screen (I think it is an indicator of the problem) Well, I already installed the graphic drivers (going to system admnistration hardware drivers). But it didn't solve anything. (I don't know if it is even related) I searched in google, found something old (2006) and I think it maybe has some relation with my problems .. http://ubuntuforums.org/archive/index.php/t-294692.html But couldn't understand the conversation (i'm a linux novice) Sorry for my horrible english.. I would appreciate any help! My hardware: ATI Mobility Radeon 4650 HD P7450 2.13Ghz Core 2 Duo

    Read the article

  • other ways to change splash screen

    - by gcc
    I want change my splash screen .But when I download any splash screen packet in computer , I cannot install them .Every time ,computer gives me same warning "that packet is not a format wanted" -warning like this- I am asking "are there any other way to install splash screen?". note : I am also used 'Art manager' but it did not work properly.

    Read the article

  • How can I use Window.ShowActivated = false with Maximized window?

    - by Anthony Brien
    I have an application that has a splash screen shown before I create my main window. I want to avoid the main window stealing the focus when it gets created if the user has focused another application while the splash screen was shown. My application's startup looks like this: private void Application_Startup(object sender, StartupEventArgs e) { SplashScreenService.Start(); // Initializing stuff... ... // Ready to open the main window. MainWindow mainWindow = MainWindow(); mainWindow.ShowActivated = SplashScreenService.HasFocus(); mainWindow.ShowDialog(); } To prevent the main window from getting activated, I'm setting Window.ShowActivated to false, only if the splash screen has lost the focus. But this causes an exception: InvalidOperationException: Cannot show Window when ShowActivated is false and WindowState is set to Maximized. Indeed, my MainWindow sets the WindowState to Maximized (restored from previous session settings). I don't understand why there is such a limitation with the ShowActivated feature. I couldn't find any documentation about this issue. I tried forcing WindowState to Normal when ShowActivated is false, and it prevents the exception, but it also activates the window! Maybe changing the window state actually causes an activation? Is there a trick I can use to work around this? I want to restore my main window in a maximized state, and not have the main window steal focus away from other applications if the user has focused away from my app during the splash screen.

    Read the article

  • Why is my WPF splash screen progress bar out of sync with the execution of the startup steps?

    - by denny_ch
    Hello, I've implemented a simple WPF splash screen window which informs the user about the progress of the application startup. The startup steps are defined this way: var bootSequence = new[] { new {Do = (Action) InitLogging, Message = "Init logging..."}, new {Do = (Action) InitNHibernate, Message = "Init NHibernate..."}, new {Do = (Action) SetupUnityContainer, Message = "Init Unity..."}, new {Do = (Action) UserLogOn, Message = "Logon..."}, new {Do = (Action) PrefetchData, Message = "Caching..."}, }; InitLogging etc. are methods defined elsewhere, which performs some time consuming tasks. The boot sequence gets executed this way: foreach (var step in bootSequence) { _status.Update(step.Message); step.Do(); } _status denotes an instance of my XAML splash screen window containing a progress bar and a label for status information. Its Update() method is defined as follows: public void Update(string status) { int value = ++_updateSteps; Update(status, value); } private void Update(string status, int value) { var dispatcherOperation = Dispatcher.BeginInvoke( DispatcherPriority.Background, (ThreadStart) delegate { lblStatus.Content = status; progressBar.Value = value; }); dispatcherOperation.Wait(); } In the main this works, the steps get executed and the splash screen shows the progress. But I observed that the splash screen for some reasons doesn't update its content for all steps. This is the reason I called the Dispatcher async and wait for its completion. But even this didn't help. Has anyone else experienced this or some similar behaviour and has some advice how to keep the splash screen's update in sync with the execution of the boot sequence steps? I know that the users will unlikely notice this behaviour, since the splash screen is doing something and the application starts after booting is completed. But myself isn't sleeping well, because I don't know why it is not working as expected... Thx for your help, Denny

    Read the article

  • iPhone OpenGL Splash Screen? How?

    - by Kyle
    My app is based pretty much on the EAGLView in the SDK. It doesn't incorporate a ViewController. Rather it simply inits GL and starts painting immediately.. Currently, my app will load a very small PNG and displays it as quickly as possible. On a 3GS this is rather instant, but on a 3G it can take about 2 seconds. In the latter case of the 3G, the user is looking at a black screen for that time. Is this behavior allowed by Apple? Is there any way to alter this SDK example so that it makes use of 'default.png'? It doesn't seem so straight forward to me. I want my user to see an image as quickly as possible, and I also don't want to be rejected for such a little quirk like this as well. In the guidelines, they encourage you to use default.png for standard applications to show a sort of mockup of the interface while it actually loads. I want to initialize OpenGL, and ALSO display this. This default.png is loaded before the app screen launches. This is EXACLTY what I want to make use of. Any help is appreciated. Thanks!

    Read the article

  • Having a Backgroundworker refresh splash screen

    - by Jiri
    Hi, Would it be theoretically possible to make BackgroundWorker in a class to periodically refresh existing splash screen form, or is that impossible? (I know that it's probably bad design, but currently I do not see any better way.) Please keep in mind that: I do not want the background worker to do the loading as it would be terribly hard to implement. I can't use the inbuilt splash screen support I'm aware of DoEvents alternative but I do not want to go this path, it would very hard to implement as well, and not reliable.

    Read the article

  • Splash screen moves up before closing

    - by rturney
    In C# I am having a problem with the splash screen. When it is time to close and the main Form1 appears, it moves over to the upper right corner of Form1. It then disappears. I have never had this occur before and have just about run out of ideas to fix it. I want the splash screen to disappear in the center screen and not move over to the upper corner of the opening Form1. Here is the code: public Form1() { Splash mySplash = new Splash(); mySplash.TotalValue = 7; //or however many steps you must complete mySplash.Show(); mySplash.Update(); InitializeComponent(); //--<begin>-------------- this.Hide(); this.WindowState = FormWindowState.Normal; mySplash.Progress++; printDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage); printBOM.PrintPage += new PrintPageEventHandler(printBOM_PrintPage); printList.PrintPage += new PrintPageEventHandler(printList_PrintPage); mySplash.Progress++; // using old Kodak Imaging OCX ! axImgEdit1.Image = "\\\\Netstore\\eng_share\\EView\\BOB-eView9.tif"; axImgEdit1.DisplayScaleAlgorithm = ImgeditLibCtl.DisplayScaleConstants.wiScaleOptimize; axImgEdit1.FitTo(0); axImgEdit1.Display(); mySplash.Progress++; //~~~~~~~~~~~~~~~~~~~~Getting printer info~~~~~~~~~~~~~~~~~~~~~~~~~ List<Win32_Printer> printerList = Win32_Printer.GetList(); int i = 0; foreach (Win32_Printer printer in printerList) { prnName = printer.Name; prnPort = printer.PortName; prnDriver = printer.DriverName; if (i == 0) { prnNameString = prnName; prnDriverString = prnDriver; prnPortString = prnPort; } else { prnNameString += "," + prnName; prnDriverString += "," + prnDriver; prnPortString += "," + prnPort; } i++; } mySplash.Progress++; EViewMethods.defaultPrn[0] = Settings.Default.DefaultPrinter; //defaultPrn[] is string array holding the default printer name, driver and port EViewMethods.defaultPrn[1] = Settings.Default.DefaultPrinterDriver; EViewMethods.defaultPrn[2] = Settings.Default.DefaultPrinterPort; //making this printer the system default printer object printerName = Settings.Default.DefaultPrinter; ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Printer"); ManagementObjectCollection collection = searcher.Get(); foreach (ManagementObject currentObject in collection) { if (currentObject["name"].ToString() == printerName.ToString()) { currentObject.InvokeMethod("SetDefaultPrinter", new object[] { printerName }); } } mySplash.Progress++; EViewMethods.reCenterEVafterDwgClose = Settings.Default.ReCenterEVafterDwgClose; if (Settings.Default.ReCenterEVafterDwgClose == true) recenterEViewAfterDrawingViewerClosesToolStripMenuItem.Checked = true; else recenterEViewAfterDrawingViewerClosesToolStripMenuItem.Checked = false; //------------------------------------------------------- EViewMethods.screenBehavior = Settings.Default.ViewStyle; normalToolStripMenuItem.Checked = false; clearViewToolStripMenuItem.Checked = false; clearviewDULevLRToolStripMenuItem.Checked = false; clearviewdULevLLToolStripMenuItem.Checked = false; clearviewdURevULToolStripMenuItem.Checked = false; clearviewdURevLLToolStripMenuItem.Checked = false; clearviewdURevLRToolStripMenuItem.Checked = false; smallScreenToolStripMenuItem.Checked = false; //Form1.ActiveForm.SetDesktopLocation(588, 312); //all screen behavior mode will begin centered on the screen EViewMethods.eviewUserPrefLocation = Settings.Default.FormEviewLocation; //------------------------------------------------------- EViewMethods.syncListToDwgNum = Settings.Default.SyncListDwgNum; if (EViewMethods.syncListToDwgNum == true) synchronizeListToActiveDwgToolStripMenuItem.Checked = true; else synchronizeListToActiveDwgToolStripMenuItem.Checked = false; toolStripStatusLabel1.Text = ""; toolStripStatusLabel2.Text = Settings.Default.ViewStyle; toolStripStatusLabel3.Text = Settings.Default.DefaultPrinter; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Assembly asm = Assembly.GetExecutingAssembly(); AssemblyName asmName = asm.GetName(); EViewMethods.eviewVersion = asmName.Version.ToString(); radioPartInfo.Checked = true; disableAllSearch(); EViewMethods.userName = Environment.UserName; EViewMethods.openConnection(); mySplash.Progress++; EViewMethods.loadFavorites(listFavorites); mySplash.Close(); mySplash.Dispose(); this.Show(); this.ActiveControl = comboEntry; }

    Read the article

  • What is the alternative to MilRelease api from MilCore.dll?

    - by Anand
    Hi I am trying to port my application from windows Vista to Windows 7. In my WPF application I am showing a splash screen, for which I have used WIC components. I am creating some resources using IWICImagingFactory_CreateDecoderFromStream_Proxy IWICImagingFactory_CreateFormatConverter_Proxy CreateBitmapFlipRotator And then to release these resource I am calling MILRelease(void *Unknown) In Windows 7 MilCore.dll has been removed from Windows 7 and the MILRelease is part of milcore.dll. What is is the alternate api which I can use?

    Read the article

  • Java Swing Threading with Updatable JProgressBar

    - by Anthony Sparks
    First off I've been working with Java's Concurency package quite a bit lately but I have found an issue that I am stuck on. I want to have and Application and the Application can have a SplashScreen with a status bar and the loading of other data. So I decided to use SwingUtilities.invokeAndWait( call the splash component here ). The SplashScreen then appears with a JProgressBar and runs a group of threads. But I can't seem to get a good handle on things. I've looked over SwingWorker and tried using it for this purpose but the thread just returns. Here is a bit of sudo-code. and the points I'm trying to achieve. Have an Application that has a SplashScreen that pauses while loading info Be able to run multiple threads under the SplashScreen Have the progress bar of the SplashScreen Update-able yet not exit until all threads are done. Launching splash screen try { SwingUtilities.invokeAndWait( SplashScreen ); } catch (InterruptedException e) { } catch (InvocationTargetException e) { } Splash screen construction SplashScreen extends JFrame implements Runnable{ public void run() { //run threads //while updating status bar } } I have tried many things including SwingWorkers, Threads using CountDownLatch's, and others. The CountDownLatch's actually worked in the manner I wanted to do the processing but I was unable to update the GUI. When using the SwingWorkers either the invokeAndWait was basically nullified (which is their purpose) or it wouldn't update the GUI still even when using a PropertyChangedListener. If someone else has a couple ideas it would be great to hear them. Thanks in advance.

    Read the article

  • [NET] Reflection

    - by pipiscrew
    using : Dim a As [Assembly] = [Assembly].LoadFile("C:\test.exe") Dim testTP As Type testTP = a.GetType("SplashScreen", True, True) obj1 = Activator.CreateInstance(withoutFOR) obj1.show() my prog made reflection to test.exe SplashScreen loaded , also obj1 filled when SplashScreen disposed - MainForm loaded the obj1 isnothing! when try to access obj1 VS say : AccessibilityObject = {"Cannot access a disposed object. Object name: 'SplashScreen'."} I want always obj1 filled from the active form!! how????

    Read the article

  • WindowsFormsApplicationBase SplashScreen makes login form ignore keypresses until I click on it - how to debug?

    - by Tom Bushell
    My WinForms app has a simple modal login form, invoked at startup via ShowDialog(). When I run from inside Visual Studio, everything works fine. I can just type in my User ID, hit the Enter key, and get logged in. But when I run a release build directly, everything looks normal (the login form is active, there's a blinking cursor in the User ID MaskedEditBox), but all keypresses are ignored until I click somewhere on the login form. Very annoying if you are used to doing everything from the keyboard. I've tried to trace through the event handlers, and to set the focus directly with code, to no avail. Any suggestions how to debug this (outside of Visual Studio), or failing that - a possible workaround? Edit Here's the calling code, in my Main Form: private void OfeMainForm_Shown(object sender, EventArgs e) { OperatorLogon(); } private void OperatorLogon() { // Modal dialogs should be in a "using" block for proper disposal using (var logonForm = new C21CfrLogOnForm()) { var dr = logonForm.ShowDialog(this); if (dr == DialogResult.OK) SaveOperatorId(logonForm.OperatorId); else Application.Exit(); } } Edit 2 Didn't think this was relevant, but I'm using Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase for it's splash screen and SingleInstanceController support. I just commented out the splash screen code, and the problem has disappeared. So that's opened up a whole new line of inquiry... Edit 3 Changed title to reflect better understanding of the problem

    Read the article

  • Ksoap2 Error after Updating Android SDK and ADT

    - by user1291644
    I have a problem. When I updated Android SDK tool to version 17 and the ADT to 17 I can't use ksoap2 any more. I start the app and get this error: 03-25 20:13:49.995: E/AndroidRuntime(555): FATAL EXCEPTION: main 03-25 20:13:49.995: E/AndroidRuntime(555): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject 03-25 20:13:49.995: E/AndroidRuntime(555): at com.alcad.pernat.praksa.SplashScreen.pridobiDanasnjo(SplashScreen.java:124) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.alcad.pernat.praksa.SplashScreen.onCreate(SplashScreen.java:73) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.os.Handler.dispatchMessage(Handler.java:99) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.os.Looper.loop(Looper.java:123) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.main(ActivityThread.java:4627) 03-25 20:13:49.995: E/AndroidRuntime(555): at java.lang.reflect.Method.invokeNative(Native Method) 03-25 20:13:49.995: E/AndroidRuntime(555): at java.lang.reflect.Method.invoke(Method.java:521) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 03-25 20:13:49.995: E/AndroidRuntime(555): at dalvik.system.NativeStart.main(Native Method) I should get String with some numbers but instead I get this error. I was using ksoap2-2.5.4.jar and tried the new ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar. I'm using Eclipse indigo, Ubuntu 11.04. The code looks like this: SoapObject Request =new SoapObject(NAMESPACE,METHOD_NAME); // Here I get the error SoapSerializationEnvelope soapEnvelope=new SoapSerializationEnvelope(SoapEnvelope.VER11); soapEnvelope.dotNet=false; String tmp=odstejDatum(datum); Request.addProperty("datumod",tmp); Request.addProperty("datumdo",datum); Request.addProperty("tip_lme",1); @SuppressWarnings("deprecation") HttpTransportSE aht=new HttpTransportSE(URL,5000); soapEnvelope.setOutputSoapObject(Request); // aht.call(SOAP_ACTION_DANASNJI,soapEnvelope); Object response= soapEnvelope.getResponse(); Thanks for the help.

    Read the article

  • HTML5 placing image where i want it on screen

    - by corrigan_sam
    I have a little start screen running and i want the image, which is acting as a button, to placed at a certain point, but when i try to it stays in the same place, and i don't know how i can get it to stay in the place i want it. Here is my code, its is HTML with some css: <style> #SplashScreen{ position:relative; overflow:hidden; } #StartButton { cursor:pointer; position:absoloute; left:100px; top:100px; } </style> <div id="SplashScreen" width="400" height="400"> <h1>Game Title</h1> <img id="StartButton" src="play.png"/> </div> The image just draws underneath the title and not where i want it. Any help?

    Read the article

  • How-to display a .gif as background image?

    - by Vito De Tullio
    Hi! I have a javascript "loading" function like this: function splashScreen() { var div = document.createElement('div'); div.appendChild(document.createTextNode("some text")); div.setAttribute("style", "position: fixed; " + "width: 100%; height: 100%; " + "left: 0; top: 0; " + "z-index: 1000; " + "background: #fff url('img/loading.gif') no-repeat center; " + "font-size: x-large; " + "text-align: center; " + "line-height: 3em; " + "opacity: 0.75; " + "filter: alpha(opacity=75); "); document.getElementsByTagName('body')[0].appendChild(div); return true; } I use this function in the form action (onsubmit="return splashScreen()") to show a "rotating logo" while the next page load... The problem is in that "img/loading.gif" and safari (on winXP): in ff and ie I have no problems, and I clearly see the animated gif. In safari I can't see it. If I change the image with a (obviously static) png the image appears... Am I doing something wrong? What's the problem with safari?

    Read the article

  • Ubuntu 10.04 Lucid on IBM Thinkpad T41

    - by naugtur
    I tried to boot my T41 from a Ubuntu Lucid liveCD and it worried me. The white text on violet background had green pixels around it. After the splashscreen went away Ubuntu popped an alert that the installer had some errors and will now run live. The live system worked fine I guess... Did anybody experience such behaviour?

    Read the article

  • XNA Screen Manager problem with transitions

    - by NexAddo
    I'm having issues using the game statemanagement example in the game I am developing. I have no issues with my first three screens transitioning between one another. I have a main menu screen, a splash screen and a high score screen that cycle: mainMenuScreen->splashScreen->highScoreScreen->mainMenuScreen The screens change every 15 seconds. Transition times public MainMenuScreen() { TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.0); currentCreditAmount = Global.CurrentCredits; } public SplashScreen() { TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); } public HighScoreScreen() { TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); } public GamePlayScreen() { TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); } When a user inserts credits they can play the game after pressing start mainMenuScreen->splashScreen->highScoreScreen->(loops forever) || || || ===========Credits In============= || Start || \/ LoadingScreen || Start || \/ GamePlayScreen During each of these transitions, between screens, the same code is used, which exits(removes) all current active screens and respects transitions, then adds the new screen to the screen manager: foreach (GameScreen screen in ScreenManager.GetScreens()) screen.ExitScreen(); //AddScreen takes a new screen to manage and the controlling player ScreenManager.AddScreen(new NameOfScreenHere(), null); Each screen is removed from the ScreenManager with ExitScreen() and using this function, each screen transition is respected. The problem I am having is with my gamePlayScreen. When the current game is finished and the transition is complete for the gamePlayScreen, it should be removed and the next screens should be added to the ScreenManager. GamePlayScreen Code Snippet private void FinishCurrentGame() { AudioManager.StopSounds(); this.UnloadContent(); if (Global.SaveDevice.IsReady) Stats.Save(); if (HighScoreScreen.IsInHighscores(timeLimit)) { foreach (GameScreen screen in ScreenManager.GetScreens()) screen.ExitScreen(); Global.TimeRemaining = timeLimit; ScreenManager.AddScreen(new BackgroundScreen(), null); ScreenManager.AddScreen(new MessageBoxScreen("Enter your Initials", true), null); } else { foreach (GameScreen screen in ScreenManager.GetScreens()) screen.ExitScreen(); ScreenManager.AddScreen(new BackgroundScreen(), null); ScreenManager.AddScreen(new MainMenuScreen(), null); } } The problem is that when isExiting is set to true by screen.ExitScreen() for the gamePlayScreen, the transition never completes the transition and removes the screen from the ScreenManager. Every other screen that I use the same technique to add and remove each screen fully transitions On/Off and is removed at the appropriate time from the ScreenManager, but noy my GamePlayScreen. Has anyone that has used the GameStateManagement example experienced this issue or can someone see the mistake I am making? EDIT This is what I tracked down. When the game is done, I call foreach (GameScreen screen in ScreenManager.GetScreens()) screen.ExitScreen(); to start the transition off process for the gameplay screen. At this point there is only 1 screen on the ScreenManager stack. The gamePlay screen gets isExiting set to true and starts to transition off. Right after the above call to ExitScreen() I add a background screen and menu screen to the screenManager: ScreenManager.AddScreen(new background(), null); ScreenManager.AddScreen(new Menu(), null); The count of the ScreenManager is now 3. What I noticed while stepping through the updates for GameScreen and ScreenManager, the gameplay screen never gets to the point where the transistion process finishes so the ScreenManager can remove it from the stack. This anomaly does not happen to any of my other screens when I switch between them. Screen Manager Code #region File Description //----------------------------------------------------------------------------- // ScreenManager.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #endregion #define DEMO #region Using Statements using System; using System.Diagnostics; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using PerformanceUtility.GameDebugTools; #endregion namespace GameStateManagement { /// <summary> /// The screen manager is a component which manages one or more GameScreen /// instances. It maintains a stack of screens, calls their Update and Draw /// methods at the appropriate times, and automatically routes input to the /// topmost active screen. /// </summary> public class ScreenManager : DrawableGameComponent { #region Fields List<GameScreen> screens = new List<GameScreen>(); List<GameScreen> screensToUpdate = new List<GameScreen>(); InputState input = new InputState(); SpriteBatch spriteBatch; SpriteFont font; Texture2D blankTexture; bool isInitialized; bool getOut; bool traceEnabled; #if DEBUG DebugSystem debugSystem; Stopwatch stopwatch = new Stopwatch(); bool debugTextEnabled; #endif #endregion #region Properties /// <summary> /// A default SpriteBatch shared by all the screens. This saves /// each screen having to bother creating their own local instance. /// </summary> public SpriteBatch SpriteBatch { get { return spriteBatch; } } /// <summary> /// A default font shared by all the screens. This saves /// each screen having to bother loading their own local copy. /// </summary> public SpriteFont Font { get { return font; } } public Rectangle ScreenRectangle { get { return new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height); } } /// <summary> /// If true, the manager prints out a list of all the screens /// each time it is updated. This can be useful for making sure /// everything is being added and removed at the right times. /// </summary> public bool TraceEnabled { get { return traceEnabled; } set { traceEnabled = value; } } #if DEBUG public bool DebugTextEnabled { get { return debugTextEnabled; } set { debugTextEnabled = value; } } public DebugSystem DebugSystem { get { return debugSystem; } } #endif #endregion #region Initialization /// <summary> /// Constructs a new screen manager component. /// </summary> public ScreenManager(Game game) : base(game) { // we must set EnabledGestures before we can query for them, but // we don't assume the game wants to read them. //TouchPanel.EnabledGestures = GestureType.None; } /// <summary> /// Initializes the screen manager component. /// </summary> public override void Initialize() { base.Initialize(); #if DEBUG debugSystem = DebugSystem.Initialize(Game, "Fonts/MenuFont"); #endif isInitialized = true; } /// <summary> /// Load your graphics content. /// </summary> protected override void LoadContent() { // Load content belonging to the screen manager. ContentManager content = Game.Content; spriteBatch = new SpriteBatch(GraphicsDevice); font = content.Load<SpriteFont>(@"Fonts\menufont"); blankTexture = content.Load<Texture2D>(@"Textures\Backgrounds\blank"); // Tell each of the screens to load their content. foreach (GameScreen screen in screens) { screen.LoadContent(); } } /// <summary> /// Unload your graphics content. /// </summary> protected override void UnloadContent() { // Tell each of the screens to unload their content. foreach (GameScreen screen in screens) { screen.UnloadContent(); } } #endregion #region Update and Draw /// <summary> /// Allows each screen to run logic. /// </summary> public override void Update(GameTime gameTime) { #if DEBUG debugSystem.TimeRuler.StartFrame(); debugSystem.TimeRuler.BeginMark("Update", Color.Blue); if (debugTextEnabled && getOut == false) { debugSystem.FpsCounter.Visible = true; debugSystem.TimeRuler.Visible = true; debugSystem.TimeRuler.ShowLog = true; getOut = true; } else if (debugTextEnabled == false) { getOut = false; debugSystem.FpsCounter.Visible = false; debugSystem.TimeRuler.Visible = false; debugSystem.TimeRuler.ShowLog = false; } #endif // Read the keyboard and gamepad. input.Update(); // Make a copy of the master screen list, to avoid confusion if // the process of updating one screen adds or removes others. screensToUpdate.Clear(); foreach (GameScreen screen in screens) screensToUpdate.Add(screen); bool otherScreenHasFocus = !Game.IsActive; bool coveredByOtherScreen = false; // Loop as long as there are screens waiting to be updated. while (screensToUpdate.Count > 0) { // Pop the topmost screen off the waiting list. GameScreen screen = screensToUpdate[screensToUpdate.Count - 1]; screensToUpdate.RemoveAt(screensToUpdate.Count - 1); // Update the screen. screen.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); if (screen.ScreenState == ScreenState.TransitionOn || screen.ScreenState == ScreenState.Active) { // If this is the first active screen we came across, // give it a chance to handle input. if (!otherScreenHasFocus) { screen.HandleInput(input); otherScreenHasFocus = true; } // If this is an active non-popup, inform any subsequent // screens that they are covered by it. if (!screen.IsPopup) coveredByOtherScreen = true; } } // Print debug trace? if (traceEnabled) TraceScreens(); #if DEBUG debugSystem.TimeRuler.EndMark("Update"); #endif } /// <summary> /// Prints a list of all the screens, for debugging. /// </summary> void TraceScreens() { List<string> screenNames = new List<string>(); foreach (GameScreen screen in screens) screenNames.Add(screen.GetType().Name); Debug.WriteLine(string.Join(", ", screenNames.ToArray())); } /// <summary> /// Tells each screen to draw itself. /// </summary> public override void Draw(GameTime gameTime) { #if DEBUG debugSystem.TimeRuler.StartFrame(); debugSystem.TimeRuler.BeginMark("Draw", Color.Yellow); #endif foreach (GameScreen screen in screens) { if (screen.ScreenState == ScreenState.Hidden) continue; screen.Draw(gameTime); } #if DEBUG debugSystem.TimeRuler.EndMark("Draw"); #endif #if DEMO SpriteBatch.Begin(); SpriteBatch.DrawString(font, "DEMO - NOT FOR RESALE", new Vector2(20, 80), Color.White); SpriteBatch.End(); #endif } #endregion #region Public Methods /// <summary> /// Adds a new screen to the screen manager. /// </summary> public void AddScreen(GameScreen screen, PlayerIndex? controllingPlayer) { screen.ControllingPlayer = controllingPlayer; screen.ScreenManager = this; screen.IsExiting = false; // If we have a graphics device, tell the screen to load content. if (isInitialized) { screen.LoadContent(); } screens.Add(screen); } /// <summary> /// Removes a screen from the screen manager. You should normally /// use GameScreen.ExitScreen instead of calling this directly, so /// the screen can gradually transition off rather than just being /// instantly removed. /// </summary> public void RemoveScreen(GameScreen screen) { // If we have a graphics device, tell the screen to unload content. if (isInitialized) { screen.UnloadContent(); } screens.Remove(screen); screensToUpdate.Remove(screen); } /// <summary> /// Expose an array holding all the screens. We return a copy rather /// than the real master list, because screens should only ever be added /// or removed using the AddScreen and RemoveScreen methods. /// </summary> public GameScreen[] GetScreens() { return screens.ToArray(); } /// <summary> /// Helper draws a translucent black fullscreen sprite, used for fading /// screens in and out, and for darkening the background behind popups. /// </summary> public void FadeBackBufferToBlack(float alpha) { Viewport viewport = GraphicsDevice.Viewport; spriteBatch.Begin(); spriteBatch.Draw(blankTexture, new Rectangle(0, 0, viewport.Width, viewport.Height), Color.Black * alpha); spriteBatch.End(); } #endregion } } Game Screen Parent of GamePlayScreen #region File Description //----------------------------------------------------------------------------- // GameScreen.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #endregion #region Using Statements using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Input; //using Microsoft.Xna.Framework.Input.Touch; using System.IO; #endregion namespace GameStateManagement { /// <summary> /// Enum describes the screen transition state. /// </summary> public enum ScreenState { TransitionOn, Active, TransitionOff, Hidden, } /// <summary> /// A screen is a single layer that has update and draw logic, and which /// can be combined with other layers to build up a complex menu system. /// For instance the main menu, the options menu, the "are you sure you /// want to quit" message box, and the main game itself are all implemented /// as screens. /// </summary> public abstract class GameScreen { #region Properties /// <summary> /// Normally when one screen is brought up over the top of another, /// the first screen will transition off to make room for the new /// one. This property indicates whether the screen is only a small /// popup, in which case screens underneath it do not need to bother /// transitioning off. /// </summary> public bool IsPopup { get { return isPopup; } protected set { isPopup = value; } } bool isPopup = false; /// <summary> /// Indicates how long the screen takes to /// transition on when it is activated. /// </summary> public TimeSpan TransitionOnTime { get { return transitionOnTime; } protected set { transitionOnTime = value; } } TimeSpan transitionOnTime = TimeSpan.Zero; /// <summary> /// Indicates how long the screen takes to /// transition off when it is deactivated. /// </summary> public TimeSpan TransitionOffTime { get { return transitionOffTime; } protected set { transitionOffTime = value; } } TimeSpan transitionOffTime = TimeSpan.Zero; /// <summary> /// Gets the current position of the screen transition, ranging /// from zero (fully active, no transition) to one (transitioned /// fully off to nothing). /// </summary> public float TransitionPosition { get { return transitionPosition; } protected set { transitionPosition = value; } } float transitionPosition = 1; /// <summary> /// Gets the current alpha of the screen transition, ranging /// from 1 (fully active, no transition) to 0 (transitioned /// fully off to nothing). /// </summary> public float TransitionAlpha { get { return 1f - TransitionPosition; } } /// <summary> /// Gets the current screen transition state. /// </summary> public ScreenState ScreenState { get { return screenState; } protected set { screenState = value; } } ScreenState screenState = ScreenState.TransitionOn; /// <summary> /// There are two possible reasons why a screen might be transitioning /// off. It could be temporarily going away to make room for another /// screen that is on top of it, or it could be going away for good. /// This property indicates whether the screen is exiting for real: /// if set, the screen will automatically remove itself as soon as the /// transition finishes. /// </summary> public bool IsExiting { get { return isExiting; } protected internal set { isExiting = value; } } bool isExiting = false; /// <summary> /// Checks whether this screen is active and can respond to user input. /// </summary> public bool IsActive { get { return !otherScreenHasFocus && (screenState == ScreenState.TransitionOn || screenState == ScreenState.Active); } } bool otherScreenHasFocus; /// <summary> /// Gets the manager that this screen belongs to. /// </summary> public ScreenManager ScreenManager { get { return screenManager; } internal set { screenManager = value; } } ScreenManager screenManager; public KeyboardState KeyboardState { get {return Keyboard.GetState();} } /// <summary> /// Gets the index of the player who is currently controlling this screen, /// or null if it is accepting input from any player. This is used to lock /// the game to a specific player profile. The main menu responds to input /// from any connected gamepad, but whichever player makes a selection from /// this menu is given control over all subsequent screens, so other gamepads /// are inactive until the controlling player returns to the main menu. /// </summary> public PlayerIndex? ControllingPlayer { get { return controllingPlayer; } internal set { controllingPlayer = value; } } PlayerIndex? controllingPlayer; /// <summary> /// Gets whether or not this screen is serializable. If this is true, /// the screen will be recorded into the screen manager's state and /// its Serialize and Deserialize methods will be called as appropriate. /// If this is false, the screen will be ignored during serialization. /// By default, all screens are assumed to be serializable. /// </summary> public bool IsSerializable { get { return isSerializable; } protected set { isSerializable = value; } } bool isSerializable = true; #endregion #region Initialization /// <summary> /// Load graphics content for the screen. /// </summary> public virtual void LoadContent() { } /// <summary> /// Unload content for the screen. /// </summary> public virtual void UnloadContent() { } #endregion #region Update and Draw /// <summary> /// Allows the screen to run logic, such as updating the transition position. /// Unlike HandleInput, this method is called regardless of whether the screen /// is active, hidden, or in the middle of a transition. /// </summary> public virtual void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { this.otherScreenHasFocus = otherScreenHasFocus; if (isExiting) { // If the screen is going away to die, it should transition off. screenState = ScreenState.TransitionOff; if (!UpdateTransition(gameTime, transitionOffTime, 1)) { // When the transition finishes, remove the screen. ScreenManager.RemoveScreen(this); } } else if (coveredByOtherScreen) { // If the screen is covered by another, it should transition off. if (UpdateTransition(gameTime, transitionOffTime, 1)) { // Still busy transitioning. screenState = ScreenState.TransitionOff; } else { // Transition finished! screenState = ScreenState.Hidden; } } else { // Otherwise the screen should transition on and become active. if (UpdateTransition(gameTime, transitionOnTime, -1)) { // Still busy transitioning. screenState = ScreenState.TransitionOn; } else { // Transition finished! screenState = ScreenState.Active; } } } /// <summary> /// Helper for updating the screen transition position. /// </summary> bool UpdateTransition(GameTime gameTime, TimeSpan time, int direction) { // How much should we move by? float transitionDelta; if (time == TimeSpan.Zero) transitionDelta = 1; else transitionDelta = (float)(gameTime.ElapsedGameTime.TotalMilliseconds / time.TotalMilliseconds); // Update the transition position. transitionPosition += transitionDelta * direction; // Did we reach the end of the transition? if (((direction < 0) && (transitionPosition <= 0)) || ((direction > 0) && (transitionPosition >= 1))) { transitionPosition = MathHelper.Clamp(transitionPosition, 0, 1); return false; } // Otherwise we are still busy transitioning. return true; } /// <summary> /// Allows the screen to handle user input. Unlike Update, this method /// is only called when the screen is active, and not when some other /// screen has taken the focus. /// </summary> public virtual void HandleInput(InputState input) { } public KeyboardState currentKeyState; public KeyboardState lastKeyState; public bool IsKeyHit(Keys key) { if (currentKeyState.IsKeyDown(key) && lastKeyState.IsKeyUp(key)) return true; return false; } /// <summary> /// This is called when the screen should draw itself. /// </summary> public virtual void Draw(GameTime gameTime) { } #endregion #region Public Methods /// <summary> /// Tells the screen to serialize its state into the given stream. /// </summary> public virtual void Serialize(Stream stream) { } /// <summary> /// Tells the screen to deserialize its state from the given stream. /// </summary> public virtual void Deserialize(Stream stream) { } /// <summary> /// Tells the screen to go away. Unlike ScreenManager.RemoveScreen, which /// instantly kills the screen, this method respects the transition timings /// and will give the screen a chance to gradually transition off. /// </summary> public void ExitScreen() { if (TransitionOffTime == TimeSpan.Zero) { // If the screen has a zero transition time, remove it immediately. ScreenManager.RemoveScreen(this); } else { // Otherwise flag that it should transition off and then exit. isExiting = true; } } #endregion #region Helper Methods /// <summary> /// A helper method which loads assets using the screen manager's /// associated game content loader. /// </summary> /// <typeparam name="T">Type of asset.</typeparam> /// <param name="assetName">Asset name, relative to the loader root /// directory, and not including the .xnb extension.</param> /// <returns></returns> public T Load<T>(string assetName) { return ScreenManager.Game.Content.Load<T>(assetName); } #endregion } }

    Read the article

1 2  | Next Page >