
// main_init function

main_init = function(mc){
}

// main_effect function

main_effect = function(mc,frame){
 if (subs_done) end_effect = true;
}

// sub_init function

sub_init = function(mc){
 mc.duplicateMovieClip("c"+mc._i,mc._i*10+1); c = $mmc["c"+mc._i];
 if (!out_effect){
  if (fade) mc._alpha = c._alpha = 0;
  c._xscale = mc._yscale = min_scale;
  c._yscale = mc._xscale = max_scale;
 }
}

// sub_effect function

sub_effect = function(mc,frame){
 perc = frame / lastsubframe; c = $mmc["c"+mc._i];
 if (non_linear) perc = 1-Math.cos(deg90*perc);
 if (out_effect) perc = 1-perc;
 c._rotation = mc._rotation = rotation_angle*perc-rotation_angle;

 c._xscale = mc._yscale = min_scale * (1-perc) + 100*perc;
 c._yscale = mc._xscale = max_scale * (1-perc) + 100*perc;
 if (fade) c._alpha = mc._alpha = perc*100;
 
 if (frame == lastsubframe) {
  if (out_effect) mc.removeMovieClip();
  c.removeMovieClip();
  mc.done = true;
 }
}

