|
Revision 14, 1.1 kB
(checked in by t-matsuda, 1 year ago)
|
theme-1 finished
|
| Line | |
|---|
| 1 |
/** |
|---|
| 2 |
* Transition Class for Entacl Develop |
|---|
| 3 |
* |
|---|
| 4 |
* DESCRIPTION : PixelDissolveIn |
|---|
| 5 |
* |
|---|
| 6 |
* TODO: |
|---|
| 7 |
* |
|---|
| 8 |
* @author t-matsuda <matsuda[at-mark]entacl.com> |
|---|
| 9 |
* @version 0.0.1 |
|---|
| 10 |
* |
|---|
| 11 |
* @see http://www.entacl.com/ |
|---|
| 12 |
* |
|---|
| 13 |
**/ |
|---|
| 14 |
|
|---|
| 15 |
package transition { |
|---|
| 16 |
import fl.transitions.*; |
|---|
| 17 |
import flash.display.MovieClip; |
|---|
| 18 |
import fl.transitions.easing.*; |
|---|
| 19 |
|
|---|
| 20 |
public class PixelDissolveIn { |
|---|
| 21 |
private var duration:Number = 4; |
|---|
| 22 |
private var xSections:Number = 10; |
|---|
| 23 |
private var ySections:Number = 10; |
|---|
| 24 |
|
|---|
| 25 |
public function PixelDissolveIn(mc:MovieClip, option:Object = null) { |
|---|
| 26 |
if (option != null) { |
|---|
| 27 |
if (option.duration != null) duration = option.duration; |
|---|
| 28 |
if (option.xSections != null) xSections = option.xSections; |
|---|
| 29 |
if (option.ySections != null) ySections = option.ySections; |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|
| 32 |
animation(mc); |
|---|
| 33 |
} |
|---|
| 34 |
|
|---|
| 35 |
private function animation(target:MovieClip):void { |
|---|
| 36 |
TransitionManager.start(target, { |
|---|
| 37 |
type: PixelDissolve, |
|---|
| 38 |
direction: Transition.IN, |
|---|
| 39 |
duration: duration, |
|---|
| 40 |
easing: Strong.easeOut, |
|---|
| 41 |
xSections: xSections, |
|---|
| 42 |
ySections: ySections |
|---|
| 43 |
}); |
|---|
| 44 |
} |
|---|
| 45 |
} |
|---|
| 46 |
|
|---|
| 47 |
} |
|---|