Prev | Current Page 639 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

_visible = false;
me.loaded(target);
};
target.loadMovie(path);
}
private function loaded(target : MovieClip)
{
container.onEnterFrame = null;
loadNext();
}
public function next()
{
// prevent actions before all the images have been loaded
if(!imagesLoaded)
return;
var mc = pictures[current];
// the image that fades in must always be on top
for(i in 0...total-1)
{
var ni = mc.getDepth()+1;
if(ni > = total)
ni -= total;
mc.swapDepths(ni);
}
// set the initial values for the transition
mc._alpha = 0;
mc._visible = true;
mc._xscale = 150;
mc._yscale = 150;
mc._x = (Stage.width - mc._width) / 2;
mc._y = (Stage.height - mc._height) / 2;
// set the transition with its duration in seconds
easeOut(mc, 4);
current = (current == total - 1) ? 0 : current + 1;
}
(continued)
Part II: Server Side, JavaScript, and Flash: Oh My!
334
private static function easeOut(mc : MovieClip, time : Float)
{
var properties = [???_alpha???, ???_xscale???, ???_yscale???, ???_x???, ???_y???];
var targetvalues = [100.


Pages:
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651