3 Replies Latest reply on Aug 29, 2008 10:18 PM by solidated

    Changing the cursor to the hourglass. Any ideas?

    solidated
      I posted this in the Actionscript 3 Forum so I'm sorry about the double post.

      I've got a frame in my Flash AIR app that loads some data and I'd like to change the cursor to the hourglass in Windows (watch on the Mac) while the data loads. Anyone have any ideas? It seems like it should be simple, but I just can't seem to find a solution for it.
        • 1. Re: Changing the cursor to the hourglass. Any ideas?
          Marco Sgna Level 1
          I've seen a lot of AIR apps that when loading show a clock as the cursor. This clock is always the same so I think there is some built-in function to achieve that, but I can't help you.
          • 2. Re: Changing the cursor to the hourglass. Any ideas?
            abeall Level 3
            Yeah, you can't do that. This is a top request of mine, glad to see I'm not alone. File an Enhancement Request -- see me signature.

            The workaround is to attach a custom graphic within Flash (or your HTML app) to the mouse location. The limitation of course is that this isn't system level, so you need to rely on custom graphics, and the graphic obviously won't be able to go outside the Flash/app frame. You can hide the mouse, thus effectively replacing the mouse cursor with your custom graphic, but I'd do that with caution: poor app performance or hangs will make the user think their mouse is hanging, which is a really bad feeling, and there are some other situations that can get hairy (mouse stays hidden outside of the app frame, sometimes, so cursor has completely disappeared!) For an hourglass or similar it makes sense to just attach right beside the cursor.

            Marco, the stopwatch you've seen is probably the one used in the Flex framework. It uses the custom attached graphic workaround.
            • 3. Re: Changing the cursor to the hourglass. Any ideas?
              solidated Level 1
              Abeall thanks for the info. Not what I'd hoped, but at least I know the boundaries now. I tried the workaround you mentioned but couldn't get it to work. While my app is starting up I hide the nativeWindow and put up a quick splash screen. This is when I'd like to have the busy/wait cursor but without the window open it just didn't seem to work -- there doesn't seem to be a place to add a listener.