}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
Programatic Animation
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
Programatic Animation
What is Animation?
What is Programatic Animation?
Interactive Animation
Enterframe vs Timer /// make this still
Conclusions
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
What is
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
an
∙
i
∙
mate
-1. To give spirit and support to
2. To give live to.
3. To move to action
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
What is
Programatic
Animation?
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
Programatic
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
mc.x = 10
mc.x = 20
mc.x = 30
mc.x = 40
mc.x = 50
Frame 1
Frame 2
Frame 3
Frame 4
Frame 5
moves on the x
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;myTween = new Tween(mc, "x",Bounce.easeOut, 0, 300, 3, true);
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;myTween = new Tween(mc, "x",Bounce.easeOut, 0, 300, 3, true);
Creating a Tween
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;myTween = new Tween(mc, "x",Bounce.easeOut, 0, 300, 3, true);
name of the
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;myTween = new Tween(mc, "x",Bounce.easeOut, 0, 300, 3, true);
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;myTween = new Tween(mc, "x",Bounce.easeOut, 0, 300, 3, true);
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;myTween = new Tween(mc, "x",Bounce.easeOut, 0, 300, 3, true);
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;myTween = new Tween(mc, "x",Bounce.easeOut, 0, 300, 3, true);
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Programatic Animation
Example
import fl.transitions.Tween; import fl.transitions.easing.*; var myTween:Tween;myTween = new Tween(mc, "x",Bounce.easeOut, 0, 300, 3, true);
actual seconds or
milliseconds
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
Interactive
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Interactive Animation
mc.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent){
mc.x+=20
}
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Interactive Animation
mc.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent){
mc.x+=20;
}
registering a click
event on the
MovieClip Object
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Interactive Animation
mc.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent){
mc.x+=20
}
function to handle
the click event
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0Interactive Animation
mc.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent){
mc.x+=20
}
The MovieClip object
will move across the
screen 10 pixels for
every mouse click
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
Conclusions
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0
Conclusions
Any property that can change is animate-able
Programatic Animation is the changing of
properties over time
Animation can be Event driven
}
F l a s h P i t t 0 9 - I n t e r m e d i a t e A c t i o n S c r i p t 3 . 0