4 Replies Latest reply on Nov 21, 2008 5:22 PM by PaulGene

    Tabbing in flash created code

    PaulGene
      Hello everyone,

      I have an XML driven website template ive been coding for a few months in Flash, no timeline or library involved, its 100% pure Actionscript 3.0 classes.

      I wanted to add a shopping cart feature and realised this would be much better/easier coded within Flex, this plus Flex Builder is much better for coding Actionscript, i decided to convert it to a Flex project.

      Now, after 5 minutes i had everything working perfectly (so i thought..) by just creating a UIComponent, manualy creating a new instance of my document class, and adding it to the UIComponent in an addedToStage event handler.

      Like i said, everything works perfectly... appart from all my carefully coded keyboard navigation has gone!

      Pressing the TAB key just bypasses the entire swf and goes back to the browser, if however i add a flex control like a button, the TAB key gives me focus on that control and then when i press TAB it goes back out again as if the rest of the swf is not there.

      I've searched the forums and google for hours with no luck, any help is very much appreciated...
        • 1. Re: Tabbing in flash created code
          PaulGene Level 1
          I'm still completely lost with this, the template is made up of mainly Flash Sprite classes, and a few SimpleButton i tried changing these to FlexSprite and FlexSimpleButton classes but the same problem applies
          • 2. Re: Tabbing in flash created code
            Level 7

            "PaulGene" <webforumsuser@macromedia.com> wrote in message
            news:gg6bed$jfp$1@forums.macromedia.com...
            > I'm still completely lost with this, the template is made up of mainly
            > Flash
            > Sprite classes, and a few SimpleButton i tried changing these to
            > FlexSprite and
            > FlexSimpleButton classes but the same problem applies

            I don't think any of those classes support the Flex Framework's idea of
            tabbing. I suspect you'll need to do some hard research to figure out how
            to put in the hooks yourself.

            Good luck ;-)


            • 3. Re: Tabbing in flash created code
              PaulGene Level 1
              Arrggg thanks, this all seems very strange, i have found that if i hammer the tab key as the swf loads i get control of the first sprite in the tab order (like it should) and i can then move around all the tabenabled controls as normal with the cursor keys, but the tab key does nothing... so it looks like the problem is just with the tab key itself.
              • 4. Re: Tabbing in flash created code
                PaulGene Level 1
                Still haven't solved my problem but digging deep into flex has been interesting :D

                Its made me think about what flex actualy is... just a layer that sits on on top of the flash player's classes like sprite and adds all the functionality, and obviously my flash code is sitting underneath that layer, hence no keyboard navigation.

                It looks like flex handles keyboard navigation with the FocusManager, and this is overiding the flash players, so ...

                to any flex guru's out there, is there a way to stop this?