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

Only dispatchEvent if [Bindable] hasEventListener

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK Previous
    • None
    • Spark: Effects
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Safari
      Language Found: English

    Description

      Steps to reproduce:
      1. Animate x, y, width, height, or alpha
      2. Don't bind to any of those properties
      3.

      Actual Results:
      Every frame it dispatches a ton of events because in the setters you have "dispatchEvent(new Event("xChanged"))" or whatever. This should be more like: dispatchPropertyChangeEvent("xChanged");

      function dispatchPropertyChangeEvent(type:String):void {
      if (hasEventListener(type)) dispatchEvent(new Event(type));
      }

      Expected Results:
      Don't dispatch events if I'm not binding.

      Workaround (if any):
      None, unless we change the source.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: