Not going to code up your whole app but here are some utility methods I use for quick dev. They make use of the fuse kit

http://www.mosessupposes.com/Fuse/

You should send moses an email for the code and he will get it back to ya quickly. Once you have the code you can do something with the utils below to slide clips on & off the screen

have fun!

//--------------------------------------------------------------------------------------------
// Fuse Utility Methods

var anim// = application.anim;

// Slides a clip on screen from 4 possible directions
function slideOnScreen(target:MovieClip, direction:String, alpha:Number, time:Number, ease:String, callback:String, scope:Object, delay:Number){ if(delay==undefined){
       delay = 0;
   }
   if(scope==undefined){
       scope = this;
   }
   if(alpha==0){
       target._alpha = 0;
   }
var dirObj:Object = getOutOfBounds(target, direction);

   anim = new Fuse(
       [
            { target:target, start_alpha:alpha, seconds:time },
{ target:target, seconds:time, ease:ease, start_y:dirObj.y, start_x:dirObj.x, y:target._y, x:target._x, delay:delay }
       ],
       { func:callback }
   )
anim.scope = scope; anim.start(); }

// Slides a clip off screen from 4 possible directions
function slideOffScreen(target:MovieClip, direction:String, alpha:Number, time:Number, ease:String, callback:String, scope:Object, delay:Number ){ if(delay==undefined){
       delay = 0;
   }
   if(scope==undefined){
       scope = this;
   }
   if(alpha==0){
       target._alpha = 0;
   }

   var dirObj:Object = getOutOfBounds(target, direction);
anim = new Fuse(
       [
            { target:target, alpha:alpha, seconds:time },
{ target:target, seconds:time, ease:ease, y:dirObj.y, x:dirObj.x , delay:delay }
       ],
       { func:callback }
   )
anim.scope = scope; anim.start(); }

// Determines position that will place the target clip
// off the screen in one of four directions.
function getOutOfBounds(target:MovieClip, direction:String){
var oX:Number = target._x;
   var oY:Number = target._y;
   var pad:Number = 100;
switch(direction){
       case "top":
           oY = (0-target._height)-pad;
           break;
       case "bottom":
           oY = (Stage.height+target._height)+pad;
           break;
       case "right":
           oX = (Stage.width+target._width)+pad;
           break;
       case "left":
           oX = (0-target._width)-pad;
           break;
   }
var dirObj:Object = { x:oX, y:oY }; return(dirObj);
}

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to