You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Harbs <ha...@gmail.com> on 2016/07/06 09:41:36 UTC
[FlexJS]Cursor management
HTML has the ability to set cursors using CSS.[1]
This includes built-in cursors as well as custom cursors which can be specified as image or animated files. It appears that .cur files have the best browser support.[2]
I’d like to create a CursorManager class or Mouse (cursor) class similar to the existing ones in Flash/Flex. Is there an accepted practice for dealing with these types of settings in FlexJS? It seems to me that the way to do it would be to add a class to the top-level application DOM element. Here’s one reference.[3]
(I’m obviously discussing the JS side. The SWF side could handle it the way it’s currently being handled using either Mouse.cursor or CursorManager.)
[1]https://developer.mozilla.org/en/docs/Web/CSS/cursor
[2]https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property#Compatibility_with_other_browsers
[3]http://stackoverflow.com/questions/9681080/changing-cursor-to-waiting-in-javascript-jquery
Re: [FlexJS]Cursor management
Posted by Alex Harui <ah...@adobe.com>.
Actually CSSFontFaceBead might be a better example.
On 7/6/16, 7:24 AM, "Alex Harui" <ah...@adobe.com> wrote:
>
>
>On 7/6/16, 7:18 AM, "Harbs" <ha...@gmail.com> wrote:
>
>>Right. Are there existing examples of applying this kind of styling
>>(thinly wrapped) in FlexJS? Or do I need to make it up as I go along?
>
>In theory, we try to use CSS unmodified in SWF code. There are beads like
>SingleLineBorderBead that are SWF only.
>
>>
>>Along the same lines, and suggestions as to the best way to going about
>>this in FlexJS?
>>comp.styleManager.getStyleDeclaration(s).setStyle("fontFamily",font);
>
>Changing styles in Declarations should be done in ValuesManager if it
>isn't already.
>
>-Alex
>
Re: [FlexJS]Cursor management
Posted by Alex Harui <ah...@adobe.com>.
On 7/6/16, 7:18 AM, "Harbs" <ha...@gmail.com> wrote:
>Right. Are there existing examples of applying this kind of styling
>(thinly wrapped) in FlexJS? Or do I need to make it up as I go along?
In theory, we try to use CSS unmodified in SWF code. There are beads like
SingleLineBorderBead that are SWF only.
>
>Along the same lines, and suggestions as to the best way to going about
>this in FlexJS?
>comp.styleManager.getStyleDeclaration(s).setStyle("fontFamily",font);
Changing styles in Declarations should be done in ValuesManager if it
isn't already.
-Alex
Re: [FlexJS]Cursor management
Posted by Harbs <ha...@gmail.com>.
Right. Are there existing examples of applying this kind of styling (thinly wrapped) in FlexJS? Or do I need to make it up as I go along?
Along the same lines, and suggestions as to the best way to going about this in FlexJS?
comp.styleManager.getStyleDeclaration(s).setStyle("fontFamily",font);
On Jul 6, 2016, at 5:12 PM, Alex Harui <ah...@adobe.com> wrote:
> IMO, the goal with anything FlexJS is to find the smallest wrapping of the
> JS functionality and present that API and emulate it in SWF code.
> Hopefully the Falcon CSS handling will do the right thing with the CSS.
>
> -Alex
>
> On 7/6/16, 2:41 AM, "Harbs" <ha...@gmail.com> wrote:
>
>> HTML has the ability to set cursors using CSS.[1]
>>
>> This includes built-in cursors as well as custom cursors which can be
>> specified as image or animated files. It appears that .cur files have the
>> best browser support.[2]
>>
>> I’d like to create a CursorManager class or Mouse (cursor) class similar
>> to the existing ones in Flash/Flex. Is there an accepted practice for
>> dealing with these types of settings in FlexJS? It seems to me that the
>> way to do it would be to add a class to the top-level application DOM
>> element. Here’s one reference.[3]
>>
>> (I’m obviously discussing the JS side. The SWF side could handle it the
>> way it’s currently being handled using either Mouse.cursor or
>> CursorManager.)
>>
>> [1]https://developer.mozilla.org/en/docs/Web/CSS/cursor
>> [2]https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Usi
>> ng_URL_values_for_the_cursor_property#Compatibility_with_other_browsers
>> [3]http://stackoverflow.com/questions/9681080/changing-cursor-to-waiting-i
>> n-javascript-jquery
>
Re: [FlexJS]Cursor management
Posted by Alex Harui <ah...@adobe.com>.
IMO, the goal with anything FlexJS is to find the smallest wrapping of the
JS functionality and present that API and emulate it in SWF code.
Hopefully the Falcon CSS handling will do the right thing with the CSS.
-Alex
On 7/6/16, 2:41 AM, "Harbs" <ha...@gmail.com> wrote:
>HTML has the ability to set cursors using CSS.[1]
>
>This includes built-in cursors as well as custom cursors which can be
>specified as image or animated files. It appears that .cur files have the
>best browser support.[2]
>
>I’d like to create a CursorManager class or Mouse (cursor) class similar
>to the existing ones in Flash/Flex. Is there an accepted practice for
>dealing with these types of settings in FlexJS? It seems to me that the
>way to do it would be to add a class to the top-level application DOM
>element. Here’s one reference.[3]
>
>(I’m obviously discussing the JS side. The SWF side could handle it the
>way it’s currently being handled using either Mouse.cursor or
>CursorManager.)
>
>[1]https://developer.mozilla.org/en/docs/Web/CSS/cursor
>[2]https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Usi
>ng_URL_values_for_the_cursor_property#Compatibility_with_other_browsers
>[3]http://stackoverflow.com/questions/9681080/changing-cursor-to-waiting-i
>n-javascript-jquery