4 Replies Latest reply on Dec 10, 2008 7:55 AM by Newsgroup_User

    Losing AS function after a button skin is applied

    Podzol
      I am charged with skinning an existing Flex app that works... prior to my application of skins. I am a novice at this, so please forgive code that is sloppy.

      There are two types of buttons and they require different skins. I have put one skin in the button class, and one in the styleName "bSearch". When skinned with Embedded jpgs, the buttons (both Button class and bSearch) appear properly skinned, and they change appropriately up, over, down, etc. I know, therefore, that the app is accessing the image files and applying them correctly.

      However, the application stops and does not call the function for either the button class or the bSearch styled buttons when the button is clicked. It works fine with a css that does not use a style name, only button class.

      Does anyone have any idea why skinning will interfere with functionality?
      please help.

      Respectfully,
      Blake



        • 1. Re: Losing AS function after a button skin is applied
          Level 7

          "Podzol" <webforumsuser@macromedia.com> wrote in message
          news:ghni87$fmf$1@forums.macromedia.com...
          >I am charged with skinning an existing Flex app that works prior to the
          >skins
          > are applied to the buttons. I am a novice at this, so please forgive code
          > that
          > is sloppy.
          >
          > There are two types of buttons and they require different skins. I have
          > put
          > one skin in the button class, and one in the styleName bSearch. When
          > skinned
          > with Embedded jpgs, the buttons (both either Button class or bSearch)
          > appear
          > properly skinned, and they change appropriately up, over, down, etc. I
          > know,
          > therefore. that the app is accessing the image files and applying them
          > correctly. However the application stops and does not call the function
          > for
          > either the button class or the bSearch styled buttons when the button is
          > clicked. It works fine with a css that does not use a style name, only
          > button
          > class.
          >
          > Does anyone have any idea why skinning will interfere with functionality?
          > please help.

          It might be easier to help you if you were to post enough code that someone
          could easily reconstruct your project, preferably by just posting the
          project with View Source enabled.


          • 2. Losing AS function after a button skin is applied
            Podzol Level 1
            I deleted my double post. Blake
            • 3. Re: Losing AS function after a button skin is applied
              Podzol Level 1
              Hi Amy, Thanks.
              I wish I could do that, but the project is a discombobulated assembly of things that our programmer made and hasn't sorted yet. I am a graphics person, so I am limited in my abilities to work with the code. I did just install the Flex 3.2 update last night and now a more specific error comes up. Perhaps this will be more informative?

              ArgumentError: Error #2004: One of the parameters is invalid.
              at flash.display::Graphics/drawRect()
              at mx.skins.halo::HaloBorder/ http://www.adobe.com/2006/flex/mx/internal::drawBorder()
              at mx.skins.halo::HaloBorder/updateDisplayList()
              at mx.skins::ProgrammaticSkin/validateDisplayList()
              at mx.managers::LayoutManager/validateDisplayList()
              at mx.managers::LayoutManager/doPhasedInstantiation()
              at Function/ http://adobe.com/AS3/2006/builtin::apply()
              at mx.core::UIComponent/callLaterDispatcher2()
              at mx.core::UIComponent/callLaterDispatcher()
              • 4. Re: Losing AS function after a button skin is applied
                Level 7

                "Podzol" <webforumsuser@macromedia.com> wrote in message
                news:ghoodi$2ct$1@forums.macromedia.com...
                > Hi Amy, Thanks.
                > I wish I could do that, but the project is a discombobulated assembly of
                > things that our programmer made and hasn't sorted yet. I am a graphics
                > person,
                > so I am limited in my abilities to work with the code. I did just install
                > the
                > Flex 3.2 update last night and now a more specific error comes up. Perhaps
                > this
                > will be more informative?
                >
                > ArgumentError: Error #2004: One of the parameters is invalid.
                > at flash.display::Graphics/drawRect()
                > at
                > mx.skins.halo::HaloBorder/ http://www.adobe.com/2006/flex/mx/internal::drawBorder
                > ()
                > at mx.skins.halo::HaloBorder/updateDisplayList()
                > at mx.skins::ProgrammaticSkin/validateDisplayList()
                > at mx.managers::LayoutManager/validateDisplayList()
                > at mx.managers::LayoutManager/doPhasedInstantiation()
                > at Function/ http://adobe.com/AS3/2006/builtin::apply()
                > at mx.core::UIComponent/callLaterDispatcher2()
                > at mx.core::UIComponent/callLaterDispatcher()

                Try making a small basic example that exhibits the problem. A lot of times,
                in the process of doing so you'll also find the answer.