Domanda

i was just writing some code and wrote :

public Class start extends SimpleButton

I thought this would be 100% right but it gave errors

1071: Syntax error: expected a definition keyword (such as function) after attribute public, not Class.

1084: Syntax error: expecting rightbrace before leftbrace.

I open some previous actionscript and wrote in this one

1084: Syntax error: expecting rightbrace before leftbrace.

So MY QUESTION is that what is the difference between Class and class

Atleast i am sure that for both (class and Class) there is some type of definition

It will be kind of you if you will answer my question

È stato utile?

Soluzione

The Class is a type name similar to your classes or SimpleButton. This is special class that is created for each class definition in a program.

See documentation for details http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Class.html

The class is an keyword. You use it for declare your own classes.

Altri suggerimenti

Check out this article. Class is a type in AS3 and every object has an instance of Class, similar to Type in some other languages. The lowercase variant is a keyword whereas the camel-case version is an object type. It holds information about functions and fields as well as constructor information.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top