1 Reply Latest reply on Dec 7, 2007 4:24 AM by chrisatflash

    Math question.

    chrisatflash Level 1
      Hello, I have something very strange.

      I made a movieclip "basis" and a movieclip "hoek". The instance names are the same.
      In the movieclip "hoek" is an movieclip "bullet" the instance name is "bul"

      What this script does, that it travels to the "basis". And that worked fine.
      As you can see i used the localToGlobal to convert the Xpos and Ypos of the bullet to the main Stage.

      Everything workes fine:
      (See Attached Code -part 1).

      Now i created a class for this bullet. I traced every value ..and all values are the same as the previous sample.
      Even the moveX and MoveY have the same values. But why does the bullet when i use a class,
      not travel the same direction as my previous sample? It does not make any sense?
      Especially if the values are the same?

      Am i missing someting?

        • 1. Re: Math question.
          chrisatflash Level 1
          What i really don't understand is , that whe i add these line of codes in the
          class function updatePosition:

          this._parent._parent.extra._x += moveX;
          this._parent._parent.extra._y += moveY;

          and i draw a movieclip in the main timeline with an instance name of "extra" ..it will move this movieclip in the right angle.

          Why does'nt it move this._x and this._y in the right angle?