English 中文(简体)
能否在行动文本第3条中倾听某种方法吗?
原标题:Is it possible to listen to a method call in action script 3?

鉴于我的地图集,我想在有人说某种特定方法时通知我。

例如:

package bar;
{
  public class MyClass {

      private var foo:int;

      public function MyClass() { foo = 2; }
      public function getFoo():int { return foo; }
  }
}

因此,举出了MyClass(var instance = New MyClass()的例子。 i 每次都接到通知。 F。 我曾尝试使用反省加动力学课,以发现在“S3”中,你可以改变密封方法(该类确定的方法)。 我很想知道,在采用这种方法时,我是否可以对事件进行说明。

最佳回答

每一种方法都没有任何活动,我的地图集甚至并非偶然。 我恳请大家不要改变我的地图集定义,否则那将过于简单。

问题回答

您可以创建自己的习俗活动类别,并在返回时从这些方法中发布习俗。

<>strong>edit: oh, i Justnow You retries to receive event notes from a final category. 在此情况下,你可以发出自己的习俗。





相关问题
Mysql trigger/events vs Cronjob

I have an auction website which let my users place an unlimited amount of autobiddings. To monitor these autobiddings something has to check the database every second. My question is if it is ...

Can an event be used as an event listener?

I m trying to expose some events from a private object which is contained inside the object I am creating and it looks like the compiler is happy with this: private WindowUpdateServer ...

鸡奸

由于将javascript DOM方法放在第html页底部(在<有人>之后)远比利用“j Query”准备活动要快得多,因此我们不得不这样做:

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

jQuery bind on ajax load() event

I have a page which displays multiple blocks with results details. Inside each block I have some <a> tags with thickbox jQuery plugin attached: class="thickbox" Here is an example of one kind ...

HTML text input event

I have a form, and want to disable/enable its submit button depending on whether the form s input text fields are empty or have had text entered into them. I think this means having an event handler ...

IE doesn t run Javascript when you click back button

I ve built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking ...

热门标签