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 1023221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:35:01+00:00 2026-05-16T11:35:01+00:00

Suppose (as an example) that I have a class which I want to log

  • 0

Suppose (as an example) that I have a class which I want to log all method calls to.

In PHP this can be accomplished quickly and easily with __call(), or in Python with decorators.

What would be the easiest way to accomplish the same thing in Actionscript 3?

  • 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. Editorial Team
    Editorial Team
    2026-05-16T11:35:01+00:00Added an answer on May 16, 2026 at 11:35 am

    Extend flash.utils.Proxy and use the flash.utils.flash_proxy namespace. There’s methods similar to __get, __set and methods for delete methods as well. For example, the __call method is:

    override flash_proxy function callProperty(name:*, ...rest):*;
    

    so if have a class that extends Proxy, you do:

    var test:MyObject = new MyObject();
    test.myMethodThatIsntDefined("param");
    

    then callProperty will be called and name will be set to “myMethodThatIsntDefined” and “param” will be in the …rest array.

    The link to the asdoc has a simple implementation that should get you going. I typically use the Proxy class for something like an API. For example, back in the day I had a Flickr API wrapper that translated the name of the function call to an API method name in the Flickr API. Something like:

    flickr.galleriesGetPhotos();
    

    and in the callProperty I’d split on the first word to get the API name “flickr.galleries.get_photos”. The names were different back then I think.

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

Sidebar

Related Questions

Suppose I have written a decorator that does something very generic. For example, it
For example, suppose I have a class: class Foo { public: std::string& Name() {
Suppose I have a string 'nvarchar(50)', which is for example the T-SQL string segment
Suppose I have a stringbuilder in C# that does this: StringBuilder sb = new
For example suppose I have a class Vehicle and I wish for a subclass
Suppose that I have a database query which looks like below - select name,
Suppose I've got the following program: namespace ReflectionTest { public class Example { private
For example, suppose I have a batch file called 'test.cmd' and it simply contains:
I have a class that contains a member object. I would like to call
In lib\RT\CustomFieldValues\ there is the groups.pm file which is supposed to be an example

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.