what is the other way of using Inheritance in flash?

Answer Posted / p.suman

Well, "prototype" in AS1 or in general used to defined
member function of a class outside its definition.

Interface classes provide pure virtual functions for the
concrete classes to implement on them resulting a greater
flexibility in reusable code.

In Flash the otherway of using inheritance is to use the
key word "Extends" , which will give the properties and
methods of a base class to its subclasses.

Ex:

class myMovie extends MovieClip{
public function myMovie(){
}
}

Here myMovie class derives all the available properties of
a MovieClip class.

Regards,
Suman.P
Module Lead

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what are the different primitive data types used in actionscript?

456


Hi All, I am new in flash so please help me, When I make a website on Flash & when we wright code on buttons in AS2[CODE: on(release) gotoAndStop ()], we found when we click twice on a button the page automatically switch. (means, code do not work properly). Thanks,

1947


what is the key purpose of using layers in a timeline? : Adobe flash

467


you are creating a form that will fade out when the user submits it. What must you do to with the text fields to ensure that text entered by the user will fade out? : Adobe flash

465


Describe changewatcher.watch.

512






which keyword is used to attach methods and properties to a class? : Adobe flash

585


what is the key difference between while loops and do while loops? : Adobe flash

465


Write a program to create custom list in actionscript?

450


Tell me what are the different ways in which the variables can be assigned?

514


which is an advantage of selecting a flash player version in publish settings before beginning a project? : Adobe flash

476


can any one tell good training center for adobe flex in chennnai?

2164


How does removal of actual objects and data work in actionscript?

489


what are the properties can be used to control the order in which the user can tab through the elements in a flash movie? : Adobe flash

500


how does an xmlsocket server know when a received message is complete? : Adobe flash

490


How to create scrolling gallery in portfolio?

512