home *** CD-ROM | disk | FTP | other *** search
- class com.KidFighting.BackgroundGUI extends MovieClip
- {
- static var _sprite;
- static var _playingSound;
- static var _items = [_root.bg_item1,_root.bg_item2,_root.bg_item3,_root.bg_item4];
- function BackgroundGUI()
- {
- super();
- com.KidFighting.BackgroundGUI._sprite = this;
- }
- static function onRoundInit(evtObj)
- {
- var _loc2_ = evtObj.enemyId;
- if(_loc2_ != undefined)
- {
- ds.controls.SoundPlayer.stopSound(com.KidFighting.BackgroundGUI._playingSound);
- if(_loc2_ >= 6)
- {
- com.KidFighting.BackgroundGUI._sprite.gotoAndStop(2);
- com.KidFighting.BackgroundGUI._playingSound = "Music_loop_axegang";
- _root.bg_item1.hide();
- _root.bg_item2.hide();
- _root.bg_item3.show();
- _root.bg_item4.show();
- }
- else
- {
- com.KidFighting.BackgroundGUI._sprite.gotoAndStop(1);
- com.KidFighting.BackgroundGUI._playingSound = "Music_loop_pigsty";
- _root.bg_item1.show();
- _root.bg_item2.show();
- _root.bg_item3.hide();
- _root.bg_item4.hide();
- }
- }
- ds.controls.SoundPlayer.playSound(com.KidFighting.BackgroundGUI._playingSound,"loop");
- }
- static function onRoundEnd()
- {
- ds.controls.SoundPlayer.stopSound(com.KidFighting.BackgroundGUI._playingSound);
- }
- static function onFightActivated(evtObj)
- {
- for(var _loc2_ in com.KidFighting.BackgroundGUI._items)
- {
- com.KidFighting.BackgroundGUI._items[_loc2_].fightActivated(evtObj);
- }
- }
- }
-