// main_init function

main_init = function(mc){
 sub_delay = lastsubframe;
}

// main_effect function

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

// sub_init function

sub_init = function(mc){
 mc.step = 0;
 if (!out_effect){
  mc._alpha = 0;
  mc._xscale = initial_xscale;
  mc._yscale = initial_yscale;
 }
}

// sub_effect function

sub_effect = function(mc,frame){
 prev_done = ($i>0 ? $smc[$i-1].done : true );
 if (prev_done){
  mc.step++;
  perc = mc.step / lastsubframe;
  if (out_effect) perc = 1-perc;
  mc._xscale = perc * 100 + (1-perc) * initial_xscale;
  mc._yscale = perc * 100 + (1-perc) * initial_yscale;
  if (fade) mc._alpha = perc * 100 else mc._alpha = 100;
  if (mc.step == lastsubframe){
   if (out_effect) mc._alpha = 0;
   mc.done = true;
  }
 }
}
