Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-23954

Background Alpha not preserved in spark ApplicationSkin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Later
    • Adobe Flex SDK 4.0 (Release)
    • None
    • Spark: Application
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Two project exports are attached for reference. The first is in Flex 3 and illustrates the correct functionality. The second is in Flex 4 with the incorrect functionality and workaround. In both cases, the index html template has been modified to set a background color of red to the html body and add some text to that body. The flash element has been modified by removing the background color attribute and setting wmode to transparent.

      Steps to reproduce:
      1. Open attached FXP exports
      2. Run the flex 3 application and note correct functionality, red background is shown thru flash
      3. Run the flex 4 application (workaround is already in place) and note correct functionality still
      4. Remove the line 'skinClass="ApplicationSkin"' from the spark application to let it default to "spark.skins.spark.ApplicationSkin"
      5. Run the flex 4 application again and note the white background an alpha not preserved

      Actual Results:
      By default in Flex 4, setting backgroundAlpha style on an ApplicationSkin does nothing and is ignored.

      Expected Results:
      The backgroundAlpha style should be used accordingly in order to support transparency in wmode.

      Workaround (if any):
      Need to create a custom ApplicationSkin subclass and override updateDisplaylist. In that method, you need to set the alpha property for "bgRectFill" to the value of the style "backgroundColor".

      public class ApplicationSkin extends spark.skins.spark.ApplicationSkin
      {
      override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

      { bgRectFill.alpha = getStyle("backgroundAlpha"); super.updateDisplayList(unscaledWidth, unscaledHeight); }

      }

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: