|
Home > Archive > Macromedia Flash Server > April 2005 > mx pro media controller: tabIndex bug?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
mx pro media controller: tabIndex bug?
|
|
| Jim Duber 2005-04-07, 5:55 pm |
| Greetings all,
I'm getting more and more frustrated by the lack of complete
documentation on the v2 components in general and the mxpro add-on
components in particular. Obviously, the answer to that is to build my
own. Until I find time to do that, however, I'd like to know how to use
the components that I paid for. The one causing me the most issues
right now is the media controller.
I posted this recently on Flashcoders, but got no response, so am
reposting here. Maybe someone can provide a hint for me to get this
working (or at least confirm it's a bug so I can stop trying). Here
goes:
I have another question on MM's media controller component that comes
with FMX2004 Pro. It has a tabIndex property. However, if you use it,
it breaks the tab-ability of the buttons that the component contains. I
believe this is a bug, but perhaps I've missed the proper way of
treating this in the documentation. If anyone can help, I'd very much
appreciate it.
Here's how to reproduce the problem:
1) Create a new flash doc (publish as player 6 and AS 2.0);
2) Drag a few standard v2 components on the stage--I'm using a
combobox, a list, and the Media Controller
3) Name the component instances onstage as: myCombo, myList, and
myController.
4) Test the movie--set to "Disable Keyboard Shortcuts" and test the tab
key. Everything works as expected and components and buttons within the
Media Controller (play/pause, etc.) have tab access. Cool.
5) Now, add a frame script with this code:
import mx.controls.MediaController;
import mx.controls.ComboBox;
import mx.controls.List;
var myController:MediaController;
var myCombo:ComboBox;
var myList:List;
myController.tabEnabled = true;
myController.tabIndex = 1;
myCombo.tabIndex = 2;
myList.tabIndex = 3;
And, now you will see the bug. The Media Controller buttons no longer
gain tab access. Instead, the component itself receives a focus
outline. Using the accessibility pane to provide tabIndex settings has
the same effect. I can inspect the component properties with a for-in
search and find that tabIndex is there. I can even find and set
hard-coded references on the buttons themselves:
myController._buttons.playPauseButtons._playPauseButton.tabIndex = 4;
myController._buttons.toStartButton.toStartSimpleButton.tabIndex = 5;
myController._buttons.toEndButton.toEndSimpleButton.tabIndex = 6;
myController._volumeControl._muteButton.muteSimpleButton.tabIndex = 7;
myController._volumeControl._loudButton.loudSimpleButton.tabIndex = 8;
But, the compiler complains that these are private members and cannot
be accessed. Although I can get around this by not typing the
component, it clearly causes other problems with code in the rest of my
applications. And, I guess this is probably not the best way to address
the issue anyway.
I'd really appreciate any tips from anyone on this. Is it a bug in the
component, or is it just me? ;^P
Thanks,
Jim
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Helen Triolo 2005-04-07, 5:55 pm |
| Quick thought based on long-ago work with Flash 6, possibly irrelevant
-- does it make a difference if you set tabChildren to true for the
Media Controller?
Helen
Jim Duber wrote:
> Greetings all,
>
> I'm getting more and more frustrated by the lack of complete
> documentation on the v2 components in general and the mxpro add-on
> components in particular. Obviously, the answer to that is to build my
> own. Until I find time to do that, however, I'd like to know how to
> use the components that I paid for. The one causing me the most issues
> right now is the media controller.
>
> I posted this recently on Flashcoders, but got no response, so am
> reposting here. Maybe someone can provide a hint for me to get this
> working (or at least confirm it's a bug so I can stop trying). Here goes:
>
> I have another question on MM's media controller component that comes
> with FMX2004 Pro. It has a tabIndex property. However, if you use it,
> it breaks the tab-ability of the buttons that the component contains.
> I believe this is a bug, but perhaps I've missed the proper way of
> treating this in the documentation. If anyone can help, I'd very much
> appreciate it.
>
> Here's how to reproduce the problem:
>
> 1) Create a new flash doc (publish as player 6 and AS 2.0);
>
> 2) Drag a few standard v2 components on the stage--I'm using a
> combobox, a list, and the Media Controller
>
> 3) Name the component instances onstage as: myCombo, myList, and
> myController.
>
> 4) Test the movie--set to "Disable Keyboard Shortcuts" and test the
> tab key. Everything works as expected and components and buttons
> within the Media Controller (play/pause, etc.) have tab access. Cool.
>
> 5) Now, add a frame script with this code:
>
> import mx.controls.MediaController;
> import mx.controls.ComboBox;
> import mx.controls.List;
>
> var myController:MediaController;
> var myCombo:ComboBox;
> var myList:List;
>
> myController.tabEnabled = true;
> myController.tabIndex = 1;
> myCombo.tabIndex = 2;
> myList.tabIndex = 3;
>
> And, now you will see the bug. The Media Controller buttons no longer
> gain tab access. Instead, the component itself receives a focus
> outline. Using the accessibility pane to provide tabIndex settings has
> the same effect. I can inspect the component properties with a for-in
> search and find that tabIndex is there. I can even find and set
> hard-coded references on the buttons themselves:
>
> myController._buttons.playPauseButtons._playPauseButton.tabIndex = 4;
> myController._buttons.toStartButton.toStartSimpleButton.tabIndex = 5;
> myController._buttons.toEndButton.toEndSimpleButton.tabIndex = 6;
> myController._volumeControl._muteButton.muteSimpleButton.tabIndex
> = 7;
> myController._volumeControl._loudButton.loudSimpleButton.tabIndex
> = 8;
>
> But, the compiler complains that these are private members and cannot
> be accessed. Although I can get around this by not typing the
> component, it clearly causes other problems with code in the rest of
> my applications. And, I guess this is probably not the best way to
> address the issue anyway.
>
> I'd really appreciate any tips from anyone on this. Is it a bug in the
> component, or is it just me? ;^P
>
> Thanks,
>
> Jim
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Jim Duber 2005-04-07, 5:55 pm |
| Hi Helen,
Thanks for the thought. I'd already tried setting the tabChildren to
true but it made no difference I'm afraid. According to the doc entry
on tabChildren:
"If tabChildren is undefined or true, the children of a movie clip are
included in automatic tab ordering..."
so, it shouldn't be necessary anyway. But, it was definitely worth a
try and a re-try just in case. ;^)
One additional note: the publish settings don't matter either. The
errant behavior I describe in my original post (appended below) happens
for both Player 6 and 7 version swfs.
Any other ideas? Anyone?
Thanks!
Jim
On Mar 24, 2005, at 9:50 AM, Helen Triolo wrote:
> Quick thought based on long-ago work with Flash 6, possibly irrelevant
> -- does it make a difference if you set tabChildren to true for the
> Media Controller?
>
> Helen
>
> Jim Duber wrote:
>
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Stefan Richter 2005-04-07, 5:55 pm |
| No ideas really but what happens if you export as Flash7/AS2?
If that fails then I'd assume that by adding myController.tabEnabled = true;
and myController.tabIndex = 1; you somehow tell it to tab the component as a
whole and not what's inside.
If this is normal behaviour or not I don't know. What happens if you add the
same script to a movieclip on stage which contains buttons?
Stefan
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of
> Jim Duber
> Sent: 24 March 2005 18:04
> To: FlashComm Mailing List
> Subject: Re: [FlashComm] mx pro media controller: tabIndex bug?
>
> Hi Helen,
>
> Thanks for the thought. I'd already tried setting the
> tabChildren to true but it made no difference I'm afraid.
> According to the doc entry on tabChildren:
>
> "If tabChildren is undefined or true, the children of a
> movie clip are included in automatic tab ordering..."
>
> so, it shouldn't be necessary anyway. But, it was definitely
> worth a try and a re-try just in case. ;^)
>
> One additional note: the publish settings don't matter
> either. The errant behavior I describe in my original post
> (appended below) happens for both Player 6 and 7 version swfs.
>
> Any other ideas? Anyone?
>
> Thanks!
>
> Jim
>
>
> On Mar 24, 2005, at 9:50 AM, Helen Triolo wrote:
>
> irrelevant
> to build
> know how
> get this
> that comes
> you use it,
> component contains.
> I'd very much
> test the
> access. Cool.
> buttons no longer
> myController._buttons.playPauseButtons._playPauseButton.tabIndex
> myController._buttons.toStartButton.toStartSimpleButton.tabIndex
> myController._buttons.toEndButton.toEndSimpleButton.tabIndex = 6;
> myController._volumeControl._muteButton.muteSimpleButton.tabIndex
> myController._volumeControl._loudButton.loudSimpleButton.tabIndex
> and cannot
> the rest of
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Jim Duber 2005-04-07, 5:55 pm |
| Hi Stefan,
Thanks for the reply. Exporting as Flash7/AS2 yields the same buggy
behavior.
Based on your and Helen's suggestion, I spent some time looking at the
tabChildren property. So, I created a movieClip ("mcButtons") and put
three v2 button components inside it (I named these instances "b1",
"b2" and "b3").
With no code on the timeline (or anywhere else), the buttons were not
accessible by tabbing. But, *all* other components on stage were
accessible by tabbing (i.e., MediaController buttons, text inside a
TextArea, ComboBox, and List).
If I add one line of code to a framescript:
mcButtons.tabChildren = true;
Then, as expected, the buttons inside the mcButtons movie clip are now
accessible via tabbing. So are the buttons inside the MediaController
(play/pause, rew, mute, etc). However, none of the other components are
tabbable. (Woah, that's kinda fun to say!)
The problem then becomes trying to set a custom tab order. This doesn't
seem possible. The buttons within the mcButtons movie clip behave
similarly to those within the MediaComponent, fwiw. So, it would seem
the problem/issue and/or potential bug lies in the tabIndex and
tabChildren properties.
Anyone have any tips in this regard? The question in a nutshell:
How can you set a custom tab order with, let's say, a List box and a
Combo box and a movie clip with tabChildren that need to be included in
the order? This code is tested and does not work for me:
myCombo.tabIndex = 1;
myList.tabIndex = 2;
mcButtons.tabEnabled = false;
mcButtons.tabChildren = true;
mcButtons.tabIndex = 3;
However, if I comment out the first two lines, the tabChildren of
mcButtons become tabbable, though the other components aren't.
Thanks for any insights.
Best,
Jim
On Mar 24, 2005, at 11:28 AM, Stefan Richter wrote:
> No ideas really but what happens if you export as Flash7/AS2?
>
> If that fails then I'd assume that by adding myController.tabEnabled =
> true;
> and myController.tabIndex = 1; you somehow tell it to tab the
> component as a
> whole and not what's inside.
> If this is normal behaviour or not I don't know. What happens if you
> add the
> same script to a movieclip on stage which contains buttons?
>
> Stefan
>
>
>
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Stefan Richter 2005-04-07, 5:56 pm |
| I think you should submit this as a bug :-\
Stefan
[vbcol=seagreen]
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of
> Jim Duber
> Sent: 24 March 2005 21:11
> To: FlashComm Mailing List
> Subject: Re: [FlashComm] mx pro media controller: tabIndex bug?
>
> Hi Stefan,
>
> Thanks for the reply. Exporting as Flash7/AS2 yields the same
> buggy behavior.
>
> Based on your and Helen's suggestion, I spent some time
> looking at the tabChildren property. So, I created a
> movieClip ("mcButtons") and put three v2 button components
> inside it (I named these instances "b1", "b2" and "b3").
>
> With no code on the timeline (or anywhere else), the buttons
> were not accessible by tabbing. But, *all* other components
> on stage were accessible by tabbing (i.e., MediaController
> buttons, text inside a TextArea, ComboBox, and List).
>
> If I add one line of code to a framescript:
>
> mcButtons.tabChildren = true;
>
> Then, as expected, the buttons inside the mcButtons movie
> clip are now accessible via tabbing. So are the buttons
> inside the MediaController (play/pause, rew, mute, etc).
> However, none of the other components are tabbable. (Woah,
> that's kinda fun to say!)
>
> The problem then becomes trying to set a custom tab order.
> This doesn't seem possible. The buttons within the mcButtons
> movie clip behave similarly to those within the
> MediaComponent, fwiw. So, it would seem the problem/issue
> and/or potential bug lies in the tabIndex and tabChildren properties.
>
> Anyone have any tips in this regard? The question in a nutshell:
>
> How can you set a custom tab order with, let's say, a List
> box and a Combo box and a movie clip with tabChildren that
> need to be included in the order? This code is tested and
> does not work for me:
>
> myCombo.tabIndex = 1;
> myList.tabIndex = 2;
>
> mcButtons.tabEnabled = false;
> mcButtons.tabChildren = true;
> mcButtons.tabIndex = 3;
>
> However, if I comment out the first two lines, the
> tabChildren of mcButtons become tabbable, though the other
> components aren't.
>
> Thanks for any insights.
>
> Best,
>
> Jim
>
>
> On Mar 24, 2005, at 11:28 AM, Stefan Richter wrote:
>
> myController.tabEnabled =
> happens if you
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|
|
|
|
|