*public class*, what is your role in the script action?

Asked

Viewed 24 times

0

Good people, I’m trying to learn actionscript 3.0 to understand how the source of a game works, because there is a part of the script that I can’t find a good explanation on the internet that is the public class, in the following code:

package
{
    import mx.core.BitmapAsset;

    public class §_-6Ze§ extends BitmapAsset
    {


        public function §_-6Ze§()
        {
            super();
        }
    }
}

Could you explain it to me ? All help is welcome!

1 answer

2


Imagine I have the following code,

var meuBitmap:BitmapAsset = new §_-6Ze§();

I can only do this without having syntax error because:

  • §_-6Ze§ is of the Bitmapasset type
  • §_-6Ze§ is a public class
  • §_-6Ze§ has a public standard builder

If a class is public, anyone can inherit from this class, no matter what the point in the code.

If a constructor is public and the class to which it belongs is public, anyone can instantiate that class with that constructor.

If a method is public and the class to which it belongs is public, any instance of that class can call this method public.

In his example, in the standard constructor of§_-6Ze§, there is a reserved word, which is super. It refers to the mother class of the current class. The () the following demonstrate a call to the standard parent constructor.

  • Got it. Thank you very much!

  • 1

    Although I base my remark on supposition, I believe this kind of nomenclature §_-6Ze§ is directly related to some code obfuscator. Usually they replace the name of the project classes with "strange" characters, making reading more difficult.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.