// 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.angle = Math.random() * deg360;
 mc.distance = min_distance + Math.random() * (max_distance - min_distance);
 mc.scale = mc._xscale = mc._yscale = Math.random() * 40 + 10; 
 mc.x = mc._x = (center_cloud ? 0 : mc.__x) + Math.cos(mc.angle) * mc.distance;
 mc.y = mc._y = (center_cloud ? 0 : mc.__y) - Math.sin(mc.angle) * mc.distance;
 mc.rotation = mc._rotation = (sloppy ? Math.random() * 30 - 15 : 0);
}

// sub_effect function

sub_effect = function(mc,frame){
 perc = frame / lastsubframe; p2 = 1 - perc; 
 mc._xscale = mc._yscale = perc * 100 + p2 * mc.scale;
 mc._x = perc * mc.__x + p2 * mc.x;
 mc._y = perc * mc.__y + p2 * mc.y;
 mc._rotation = p2 * mc.rotation;
 if (frame == lastsubframe) mc.done=true;
}

