home *** CD-ROM | disk | FTP | other *** search
- class Bakgrunn extends Speleobjekt
- {
- var mc;
- var dybde;
- var skjerm_x;
- var brett_x;
- var skjerm_y;
- var brett_y;
- static var bakgrunnsliste;
- function Bakgrunn(mc, brett_x, brett_y, scrollfaktor_x, scrollfaktor_y)
- {
- super(mc,brett_x / scrollfaktor_x,brett_y / scrollfaktor_y,mc._width,mc._heigth);
- this.scrollfaktor_x = scrollfaktor_x;
- this.scrollfaktor_y = scrollfaktor_y;
- Bakgrunn.bakgrunnsliste.push(this);
- this.mc.swapDepths(100 + Bakgrunn.bakgrunnsliste.length);
- this.dybde = this.mc.getDepth();
- }
- function oppdaterSkjermposisjon()
- {
- this.skjerm_x = this.scrollfaktor_x * (this.brett_x - Speleobjekt.brett.origo_x);
- this.skjerm_y = this.scrollfaktor_y * (this.brett_y - Speleobjekt.brett.origo_y);
- }
- }
-