home *** CD-ROM | disk | FTP | other *** search
- class Nedtelling
- {
- var mc;
- var tid = 300;
- var teljar = 0;
- var tidaGaar = false;
- function Nedtelling(mc, skjerm_x, skjerm_y)
- {
- this.mc = mc;
- this.mc._x = skjerm_x;
- this.mc._y = skjerm_y;
- }
- function settTid(tid)
- {
- this.tid = tid;
- _root.tid = this.tid;
- }
- function startNedtelling()
- {
- this.tidaGaar = true;
- }
- function stoppNedtelling()
- {
- this.tidaGaar = false;
- }
- function tellNed()
- {
- if(this.tidaGaar)
- {
- this.teljar += 1;
- if(this.teljar == 25)
- {
- this.tid -= 1;
- _root.tid = this.tid;
- if(this.tid < 31)
- {
- if(this.tid < 11)
- {
- this.mc.gotoAndStop(3);
- _root.blipp.setVolume(100);
- _root.blipp.start();
- }
- else
- {
- this.mc.gotoAndStop(2);
- _root.tikk.start();
- }
- }
- this.teljar = 0;
- }
- }
- }
- function tellNedPoeng(step)
- {
- this.tid -= step;
- _root.tid = this.tid;
- }
- }
-