home *** CD-ROM | disk | FTP | other *** search
/ Aspects of Cyprus 2 / Aspects of Cyprus.iso / pc / aoc.swf / scripts / DefineSprite_252 / frame_320 / DoAction.as
Encoding:
Text File  |  2005-12-03  |  2.9 KB  |  104 lines

  1. function setCurrentSection(m_1, m_2, m_3, m_4, id, name, there_is_photo_gallery)
  2. {
  3.    _root.curr_section_m_1 = m_1;
  4.    _root.curr_section_m_2 = m_2;
  5.    _root.curr_section_m_3 = m_3;
  6.    _root.curr_section_m_4 = m_4;
  7.    _root.curr_section_id = id;
  8.    _root.curr_section_name = name;
  9.    _root.photo_gallery_exists = there_is_photo_gallery;
  10. }
  11. function initCurrentSection(m_1, m_2, m_3, m_4, id, name, there_is_photo_gallery)
  12. {
  13.    if(m_2 == -1 and _root.main_section_clicked != m_1)
  14.    {
  15.       _root.load_main_interface = true;
  16.       _root.main_section_previous_clicked = _root.main_section_clicked;
  17.       _root.main_section_clicked = m_1;
  18.       _root.main_section_clicked_id = id;
  19.       _root.main_section_clicked_name = name;
  20.       _root.photo_gallery_exists = there_is_photo_gallery;
  21.    }
  22.    else
  23.    {
  24.       _root.main_section_previous_clicked = _root.main_section_clicked;
  25.       if(_root.curr_section_m_2 != -1)
  26.       {
  27.          _root.load_main_interface = false;
  28.       }
  29.    }
  30.    _root.curr_section_m_1 = m_1;
  31.    _root.curr_section_m_2 = m_2;
  32.    _root.curr_section_m_3 = m_3;
  33.    _root.curr_section_m_4 = m_4;
  34.    _root.curr_section_id = id;
  35.    _root.curr_section_name = name;
  36.    if(_root.video_gallery_is_loaded == true)
  37.    {
  38.       _root.video_gallery_is_loaded = false;
  39.       unloadMovie(_root.main.video_stage);
  40.       if(_root.BgMusicIsOn == true)
  41.       {
  42.          tellTarget(_root.main.audiobg_stage)
  43.          {
  44.             gotoAndStop("sound_play");
  45.          }
  46.       }
  47.       else
  48.       {
  49.          tellTarget(_root.main.audiobg_stage)
  50.          {
  51.             gotoAndStop("sound_stop");
  52.          }
  53.       }
  54.    }
  55.    if(_root._root.music_gallery_is_loaded == true)
  56.    {
  57.       _root._root.music_gallery_is_loaded = false;
  58.       unloadMovie(_root.main.music_stage);
  59.       if(_root.BgMusicIsOn == true)
  60.       {
  61.          tellTarget(_root.main.audiobg_stage)
  62.          {
  63.             gotoAndStop("sound_play");
  64.          }
  65.       }
  66.       else
  67.       {
  68.          tellTarget(_root.main.audiobg_stage)
  69.          {
  70.             gotoAndStop("sound_stop");
  71.          }
  72.       }
  73.    }
  74.    if(_root.curr_section_m_2 == -1)
  75.    {
  76.       if(_root.main_section_clicked != _root.main_section_previous_clicked)
  77.       {
  78.          _root.main.gotoAndPlay(321);
  79.       }
  80.    }
  81.    else if(_root.load_main_interface)
  82.    {
  83.       _root.main.gotoAndPlay(323);
  84.    }
  85.    else
  86.    {
  87.       tellTarget(_root.main.main_stage.section_main)
  88.       {
  89.          gotoAndStop("Load_Text");
  90.          play();
  91.       }
  92.       if(_root.photo_gallery_is_loaded)
  93.       {
  94.          _root.photo_gallery_is_loaded = false;
  95.          tellTarget(_root.main.photo_stage.photo_gallery)
  96.          {
  97.             gotoAndStop("Close_Photo_Gallery");
  98.          }
  99.       }
  100.    }
  101. }
  102. setCurrentSection(_root.main_section_clicked,-1,-1,-1,_root.main_section_clicked_id,_root.main_section_clicked_name,_root.photo_gallery_exists);
  103. _root.main_section_previous_clicked = -1;
  104.