Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 102495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:58:29+00:00 2026-05-11T00:58:29+00:00

As far as I understand, binding to a var in ActionScript is carried out

  • 0

As far as I understand, binding to a var in ActionScript is carried out via events which are automatically fired when a var is changed. I have a few questions about this:

  1. What happens if the class doesn’t explicitly extend EventDispatcher? Is there is some sort of magic that goes on in the compiler which essentially makes the class an EventDispatcher?
  2. How does binding to static vars work? Is some sort of implicit static addEventListener() function added to the class?
  3. I’ve noticed that you can put [Bindable] on static vars but not static functions, why is this?

Edit:

Thanks to Christophe Herreman for his illuminating answer. However, I have a few follow-ons from my questions above. I wonder if anyone could fill in the gaps for me (I tried to number these questions 4, 5, 6 but they show up 1, 2, 3 for some reason!)

  1. I’ve added the -keep option to the compiler and looked at the generated binding code. Could anyone explain how this code is applied? The compiler seems to generate a class called BindableProperty for each class, which contains the getter and setter. How does this get folded into the class I wrote? The feature looks kind of like partial classes in C# – is this exclusively behind-the-scenes compiler functionality, or is it something I could use myself?

  2. The BindableProperty class still does not explicitly implement EventDispatcher, how does the generated class implement event dispatching?

  3. In question 3, I asked about binding to static functions, but I actually meant static getter and setter functions. This doesn’t seem to be allowed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:58:29+00:00Added an answer on May 11, 2026 at 12:58 am

    bindings do indeed work via event dispatching. You can learn a lot from the generated Actionscript code by adding the -keep flag to the compiler settings.

    I’ll try to answer your questions.

    1. the compiler will pick up the [Bindable] metadata tag and will create a getter and setter for each property you marked as bindable. The getter will just return the value of the property. The setter will check if the new value differs from the original value and will dispatch a PropertyChange event if it does.

    2. the same as for instance properties basically, only now a static getter and setter are created. In addition, a mx.binding.StaticPropertyWatcher is created to watch changes in the static properties.

    3. when binding to a static method, you get the following warning: ‘[Bindable] requires an event name parameter when applied to a function that is not a getter or setter.’ The description pretty much says it all. Since you don’t have a ‘propertyChange’ event that is triggered specifically for this method, you have to dispatch a custom one yourself. That is [Bindable(event=’customEvent’)] and then dispatch that event from somewhere in your class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer WCF supports WS-Addressing. Check out the MSDN on how to… May 11, 2026 at 11:03 am
  • added an answer Comet, described by Brian is a nice technique, but requires… May 11, 2026 at 11:03 am
  • added an answer I think that the query has some typos, or was… May 11, 2026 at 11:03 am

Related Questions

As far as I understand, binding to a var in ActionScript is carried out
As far as I understand, if I want to get my database under source
How secure is it to use self-signed certificates? As far as I understand it,
As far as I can understand, when I new up a Linq to SQL
As far as I know, foreign keys (FK) are used to aid the programmer
As far as I know, Flash has to pass info off to another external
As far as I know, in gcc you can write something like: #define DBGPRINT(fmt...)
As far as i know it is not possible to do the following in
As far as I can tell, this is isn't possible, so I'm really just
As far as I know (not much I'll admit), the currently popular programming paradigms

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.