
// main_init function

main_init = function(mc){
 r = 1.5 * Math.sqrt(mc._width*mc._width/4+mc._height*mc._height/4);
 createEmptyMovieClip('m',6);
 if (!out_effect) mc.setMask(m);
 subs_done = true;
}

// main_effect function

main_effect = function(mc,frame){
 if (frame == 1 && out_effect) mc.setMask(m);
 m.clear();
 perc = frame / lastsubframe;
 if (perc == 1){
  mc.setMask(null);
  m.removeMovieClip();
  if (out_effect) mc._alpha = 0;
  end_effect = true;
 } else {
  m.lineStyle();
  m.beginFill(0);
  m.moveTo(0,0);
  for (var a = 0; a <= 360; a += 45) {
   var a0 = Math.min(a,(out_effect ? 1 - perc : perc)*360) / 57.296;
   m.lineTo((counter_clock ? -r : r) * Math.sin(a0),-r * Math.cos(a0));
  }
  m.endFill();
 }
}

// sub_init function

sub_init = function(mc){
}

// sub_effect function

sub_effect = function(mc,frame){
}
