Tab index not work on image, panel and Group tags in flash
I am writing code to order the tab on multiple tags like "img","Panel","LinkButton",... and pie charts. when I run my flash program, the tab indexing does not work at all. it just works on pie chart and "link button" tags, not on "img","Panel","Group" tags. I also have tried to "enable tab" on those fields , but no help.on the other hand when I disable tab on the pie cha开发者_C百科rt, and link button, still the tab is enabled.
I have searched a lot and could not find a solution yet. appreciate a lot if someone could help me I am working on Flash 10.0.0.0 , sdk 4.1
My guess is that you are looking for tabEnabled and tabIndex, both properties of flash.display.InteractiveObject http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/InteractiveObject.html?filter_flash=cs5&filter_flashplayer=10.2&filter_air=2.6
You might also want to take a look at Stage.focus http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html#focus
If you can give more details about your issue I'll try to help you with a more direct answer.
I was finally able to implement the IFocusMangerComponent in order to get the focus for image. although the "tab index" is available in the class, if you want to get the tab to work on image, you have to simply implement IFocusMangerComponent as following in .as file. (no need to implement the functions in the new class)
import mx.controls.Image; import mx.managers.IFocusManagerComponent;
public class FocusableImage extends Image implements IFocusManagerComponent
{
public function FocusableImage()
{
super();
}
}
then in the code instead of using var image = new Image() , you have to use
var image = new FocusableImage()
image.tabEnabled = true;
image.tabFocusEnabled = true;
image.tabIndex = 1;
精彩评论