home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / david.swf / scripts / __Packages / Bakgrunn.as < prev    next >
Encoding:
Text File  |  2007-03-28  |  813 b   |  25 lines

  1. class Bakgrunn extends Speleobjekt
  2. {
  3.    var mc;
  4.    var dybde;
  5.    var skjerm_x;
  6.    var brett_x;
  7.    var skjerm_y;
  8.    var brett_y;
  9.    static var bakgrunnsliste;
  10.    function Bakgrunn(mc, brett_x, brett_y, scrollfaktor_x, scrollfaktor_y)
  11.    {
  12.       super(mc,brett_x / scrollfaktor_x,brett_y / scrollfaktor_y,mc._width,mc._heigth);
  13.       this.scrollfaktor_x = scrollfaktor_x;
  14.       this.scrollfaktor_y = scrollfaktor_y;
  15.       Bakgrunn.bakgrunnsliste.push(this);
  16.       this.mc.swapDepths(100 + Bakgrunn.bakgrunnsliste.length);
  17.       this.dybde = this.mc.getDepth();
  18.    }
  19.    function oppdaterSkjermposisjon()
  20.    {
  21.       this.skjerm_x = this.scrollfaktor_x * (this.brett_x - Speleobjekt.brett.origo_x);
  22.       this.skjerm_y = this.scrollfaktor_y * (this.brett_y - Speleobjekt.brett.origo_y);
  23.    }
  24. }
  25.