home *** CD-ROM | disk | FTP | other *** search
- function do_start_bomb_drag(passed_x, passed_y, passed_name)
- {
- this[passed_name].startDrag(true);
- }
- function do_stop_bomb_drag(passed_name)
- {
- bomb_allowed = true;
- if(_root.track_segments_MC.hitTest(_root._xmouse,_root._ymouse,true))
- {
- j = 1;
- while(j < _root.number_segments + 1)
- {
- segment_ID = "segment_" + j;
- if(_root.track_segments_MC[segment_ID].hitTest(_root._xmouse,_root._ymouse,true))
- {
- var my_limit = _root.active_segments_array.length;
- a = 0;
- while(a < my_limit)
- {
- if(_root.active_segments_array[a] == segment_ID)
- {
- do_bounce_bomb_back(passed_name);
- bomb_allowed = false;
- }
- a++;
- }
- if(_root.track_segments_MC[segment_ID].no_bomb == true)
- {
- do_bounce_bomb_back(passed_name);
- bomb_allowed = false;
- }
- if(bomb_allowed == true)
- {
- _root.bomb_sound.start();
- duplicateMovieClip(explosion,"explode",116307);
- explode._x = this[passed_name]._x;
- explode._y = this[passed_name]._y;
- explode.gotoAndPlay("go");
- this[passed_name].removeMovieClip();
- _root.track_segments_MC[segment_ID].removeMovieClip();
- bombs_remaining_count--;
- _root.bombs_remaining_text = "x" + bombs_remaining_count;
- if(bombs_remaining_count > 0)
- {
- do_add_next_bomb_tile();
- }
- }
- }
- j++;
- }
- }
- else
- {
- do_bounce_bomb_back(passed_name);
- }
- }
- function do_add_next_bomb_tile()
- {
- bomb_generation_count++;
- bomb_ID = "bomb_" + bomb_generation_count;
- this.attachMovie("bomb_button_MC",bomb_ID,bomb_generation_count);
- }
- function do_bounce_bomb_back(passed_name)
- {
- _root.no_drop_sound.start();
- this[passed_name]._x = 0;
- this[passed_name]._y = 0;
- stopDrag();
- }
-