1 Reply Latest reply on Feb 15, 2007 4:55 AM by Newsgroup_User

    ... extends MovieClip

    sben23
      Here is a chunk of my code

      class Commandes extends MovieClip{

      private var X :MovieClip;
      private var Y :Number ;
      .
      .
      .

      // constructeur
      function Commandes()
      { Y=5 ;
      X= ...;
      }
      }

      then when I instansy (sorry I'm not sure of the word) the ActionScript Class "Commandes" in the main program as folowing

      var Application:Commandes= new Commandes();
      or
      var Application:MovieClip= new Commandes();

      and then write this line
      trace( Application);

      the result is "[object Object]" (which means that it doesn't belong to MovieClip's subclasses) instead of " _level0" (which means that it belongs to MovieClip's subclasses). Why do you think is that ? Thank you in advence for your future answer.
        • 1. Re: ... extends MovieClip
          Level 7
          sben23,

          > Here is a chunk of my code
          >
          > class Commandes extends MovieClip{

          Okay.

          > and then write this line
          > trace( Application);
          >
          > the result is "[object Object]"

          Well, it *is* an Object instance, certainly. :) MovieClip is a
          subclass of Object. Have you looked at the typeof and instanceof operators?


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."