Re: [flexcoders] Re: Custom Cursors causing slowdown

2008-04-25 Thread Troy Gilbert
> Just getting back to this, would you recommend upping the framerate on
>  the application then or just put up with the slow cursors. I'm just
>  conscious that upping the framerate will up the CPU usage slightly
>  with Flex but I haven't seen much research into how much difference it
>  will make.

I'd up the framerate. If you're building a standard Flex app (built
largely with standard Flex UI components), then you shouldn't see much
of a bump in CPU usage as most the UI doesn't do any per-frame work
unless its animating.

Plus, if you're putting the results in a web browser, most of them
will already be throttling the Flash player, so it shouldn't make your
machine unresponsive (Flash's CPU usage is pretty low priority).

If I have any animated effects/transitions or a lot of drag-n-drop, I
up my Flex's framerate to 100. It won't run that fast under any
current platform/browser configuration (50 is about as high as I've
seen), but 100 is a nice round number. Others may have a better
educated reasoning for using a different number.

Troy.


[flexcoders] Re: Custom Cursors causing slowdown

2008-04-25 Thread dave_defusion
Just getting back to this, would you recommend upping the framerate on
the application then or just put up with the slow cursors. I'm just
conscious that upping the framerate will up the CPU usage slightly
with Flex but I haven't seen much research into how much difference it
will make.

--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
wrote:
>
> >  I wondered if anyone else had experienced similar issues?
> 
> What you're seeing is your app's actual framerate. Nothing is going
> slower. Here's why...
> 
> If you don't specify any custom cursors, Flash just uses the OS's
> cursor and let's the OS do its standard thing of drawing it (which all
> modern OS's do as a very high priority process, usually part of the
> video driver, so that the mouse is always responsive).
> 
> When you specify a custom cursor, the Flash Player actually does
> something tricky (some may say hacky!). It hides the OS cursor (when
> the mouse is over the Flash Player) and instead moves a DisplayObject
> around the stage tracking the mouse's position.
> 
> So, with the default cursor you're using the OS to draw the cursor;
> with any custom cursors, you're using the Flash Player API to draw it.
> The most obvious effect (if you're app is not performance intensive)
> is that the mouse will only update at your app's framerate, which for
> Flex defaults to 24fps (much lower than any modern OS's mouse
> refresh).
> 
> Personally, I think Adobe should provide a cursor API that's
> implemented as a native OS cursor (provide a bitmap of a fixed
> resolution, for example). At a minimum, I think the Flash Player
> should expose a collection of native cursors that map to the browser's
> native cursors. It's rather irritating that I have to track down and
> embed a hand-grab image, a resize image, etc., in order to have what
> are virtually universal cursors under any OS (and mine won't match the
> OS!). This is one area where AJAX apps are superior.
> 
> Troy.
>




Re: [flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread Troy Gilbert
> Here's a gallery of the default cursors for Windows (IE & Firefox) for
>  the various CSS properties:

Yeah, I've seen that one and various others. But they're screen
captures from actual apps, and I don't know what the legal issues may
be (however minor).

For now, I just grabbed the ones Adobe provided (I just needed an
open/closed hand) in their Flex Interface Guidelines example, Pan and
Zoom.

BTW, does anyone at Adobe know where you guys got those from? Just
re-created them from a screen capture or similar?

Troy.


[flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread dave_defusion
Here's a gallery of the default cursors for Windows (IE & Firefox) for
the various CSS properties:

http://webdesign.about.com/od/styleproperties/ig/CSS-Cursors-Gallery/


--- In flexcoders@yahoogroups.com, "dave_defusion" <[EMAIL PROTECTED]>
wrote:
>
> Yeah it'd be nice if we could get hold of them and then maybe we could 
> put together a cross browser/cross OS facade for using the default
> custom cursors that are defined in CSS 2 - at least that way they
> wouldn't stand out too much.
> 
> --- In flexcoders@yahoogroups.com, "Troy Gilbert" 
> wrote:
> >
> > >  On that thought I was just wondering if it was possible to use the
> > >  ExternalInterface to do this? By maybe setting a classname on the
> > >  Flash object via JavaScript... hm
> > 
> > Already tried that (there's another thread where I raise this issue).
> > The Flash Player dictates it's own cursor and CSS doesn't seem to
> > apply. I thought it was a brilliant idea for a hack, though!
> > 
> > I was wondering if anyone knew of an "official" source of browser
> > cursors, say what Firefox uses across platforms (though they just may
> > be the native equivalents). CSS references always contain example
> > images, but I'm unsure about just snagging those for legal reasons.
> > Googling didn't really provide anything useful.
> > 
> > Troy.
> >
>




[flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread dave_defusion
Yeah it'd be nice if we could get hold of them and then maybe we could 
put together a cross browser/cross OS facade for using the default
custom cursors that are defined in CSS 2 - at least that way they
wouldn't stand out too much.

--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
wrote:
>
> >  On that thought I was just wondering if it was possible to use the
> >  ExternalInterface to do this? By maybe setting a classname on the
> >  Flash object via JavaScript... hm
> 
> Already tried that (there's another thread where I raise this issue).
> The Flash Player dictates it's own cursor and CSS doesn't seem to
> apply. I thought it was a brilliant idea for a hack, though!
> 
> I was wondering if anyone knew of an "official" source of browser
> cursors, say what Firefox uses across platforms (though they just may
> be the native equivalents). CSS references always contain example
> images, but I'm unsure about just snagging those for legal reasons.
> Googling didn't really provide anything useful.
> 
> Troy.
>




Re: [flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread Troy Gilbert
>  On that thought I was just wondering if it was possible to use the
>  ExternalInterface to do this? By maybe setting a classname on the
>  Flash object via JavaScript... hm

Already tried that (there's another thread where I raise this issue).
The Flash Player dictates it's own cursor and CSS doesn't seem to
apply. I thought it was a brilliant idea for a hack, though!

I was wondering if anyone knew of an "official" source of browser
cursors, say what Firefox uses across platforms (though they just may
be the native equivalents). CSS references always contain example
images, but I'm unsure about just snagging those for legal reasons.
Googling didn't really provide anything useful.

Troy.


[flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread dave_defusion
Thanks for that great explanation. 

Your issues about not supporting the native OS cursors and thus having
to track down your own (which then don't match the native OS) also
bothered me I'd like to see support of at least the minimum set of
cursors defined in CSS2 via the flash player.

On that thought I was just wondering if it was possible to use the
ExternalInterface to do this? By maybe setting a classname on the
Flash object via JavaScript... hm

-D

--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
wrote:
>
> >  I wondered if anyone else had experienced similar issues?
> 
> What you're seeing is your app's actual framerate. Nothing is going
> slower. Here's why...
> 
> If you don't specify any custom cursors, Flash just uses the OS's
> cursor and let's the OS do its standard thing of drawing it (which all
> modern OS's do as a very high priority process, usually part of the
> video driver, so that the mouse is always responsive).
> 
> When you specify a custom cursor, the Flash Player actually does
> something tricky (some may say hacky!). It hides the OS cursor (when
> the mouse is over the Flash Player) and instead moves a DisplayObject
> around the stage tracking the mouse's position.
> 
> So, with the default cursor you're using the OS to draw the cursor;
> with any custom cursors, you're using the Flash Player API to draw it.
> The most obvious effect (if you're app is not performance intensive)
> is that the mouse will only update at your app's framerate, which for
> Flex defaults to 24fps (much lower than any modern OS's mouse
> refresh).
> 
> Personally, I think Adobe should provide a cursor API that's
> implemented as a native OS cursor (provide a bitmap of a fixed
> resolution, for example). At a minimum, I think the Flash Player
> should expose a collection of native cursors that map to the browser's
> native cursors. It's rather irritating that I have to track down and
> embed a hand-grab image, a resize image, etc., in order to have what
> are virtually universal cursors under any OS (and mine won't match the
> OS!). This is one area where AJAX apps are superior.
> 
> Troy.
>