home *** CD-ROM | disk | FTP | other *** search
- JetStreamIcon = function(game_x, game_y)
- {
- GAME.mc.attachMovie("jet_stream_icon","jet_stream_icon" + GAME.drawIndex,GAME.drawIndex);
- this.mc = GAME.mc["jet_stream_icon" + GAME.drawIndex];
- this.id = "jet_stream_icon" + GAME.drawIndex;
- this.mc.obj = this;
- GAME.drawIndex = GAME.drawIndex + 1;
- this.lastTime = getTimer();
- this.game_x = Number(game_x);
- this.game_y = Number(game_y);
- GAME.drawOnScreen(this,true);
- this.mc.onEnterFrame = function()
- {
- this.obj.loop();
- };
- };
- t = JetStreamIcon.prototype;
- t.mc = false;
- t.id = "";
- t.age = 0;
- t.lastTime = 0;
- t.game_x = 0;
- t.game_y = 0;
- t.min_game_x = 0;
- t.max_game_x = 0;
- t.maxLifeTime = 5000;
- t.hitByWindGust = function(windGust)
- {
- GAME.turnOnJetStream();
- GAME.removeHitObject(this);
- delete this.mc.onEnterFrame;
- this.mc.gotoAndPlay("hit_hide");
- };
- t.onTimeUp = function()
- {
- GAME.removeHitObject(this);
- delete this.mc.onEnterFrame;
- this.mc.gotoAndPlay("no_hit_hide");
- };
- t.loop = function()
- {
- this.age += getTimer() - this.lastTime;
- this.lastTime = getTimer();
- this.mc.age_out = this.age;
- if(this.age > this.maxLifeTime)
- {
- this.onTimeUp();
- }
- };
- t.remove = function()
- {
- GAME.removeObject(this);
- };
- t.toString = function()
- {
- return "[JetStreamIcon]";
- };
-