Skip to main content
Known Participant
June 28, 2009
Question

What is the use of "DisplayObject" in as3 ?

  • June 28, 2009
  • 3 replies
  • 1186 views

I think this displayObject convert into object but I am not sure. Please any know what is the use of DisplayObject ?

This topic has been closed for replies.

3 replies

Muzak
Inspiring
June 28, 2009
Participating Frequently
June 28, 2009

DisplayObject is the base class of all of the obects that you see.  A MovieClip is a DisplayObject. As well as Graphics, Stage, Bitmap, etc...  You won't call a DisplayObject in the code. You would call the paticular item, however. Such as the MovieClip, Stage, etc...

nepaliktoAuthor
Known Participant
June 28, 2009

Is there any simple example. So, that I could understand clearly.

Participating Frequently
June 28, 2009

DisplayObject is like a room. MovieObject, Bitmap, Stage, Graphics and so on are the people in that room.

All the people behave different and are good at doing different things. The room (DisplayObject) doesn't do anything. The people (MovieObject, Graphics, Stage...) do everything.

kglad
Community Expert
Community Expert
June 28, 2009

the displayobject class is the class of objects that can be displayed.  for example, sprites, movieclips, textfields, bitmaps, buttons etc are subclasses.

nepaliktoAuthor
Known Participant
June 28, 2009

You mean it helps to displayObject moviClip, textField, bitmap etc. Width out displayObject, movieClip, bitmap .. could not display any more ? Am I right ? Please let me know if I am wrong. I am in learning phase.

kglad
Community Expert
Community Expert
June 28, 2009

i'm not sure what you just said.  but, if you're having trouble understanding the displayobject just move past it and understand when a displayobject is mentioned it's one of those classes that you (hopefully) understand better and is displayed on-stage.

you won't often use it in your code and i can't think of any situation where you would have to use it in code.