Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import fl.transitions.Tween;
- import fl.transitions.easing.*;
- import flash.events.MouseEvent;
- slide1_mc.addEventListener(MouseEvent.CLICK, irASlide2);
- slide2_mc.addEventListener(MouseEvent.CLICK, irASlide3);
- slide3_mc.addEventListener(MouseEvent.CLICK, irASlide1);
- function irASlide1(e:MouseEvent){
- new Tween(slide3_mc, "x", Regular.easeOut, 0, -550, 1, true);
- new Tween(slide1_mc, "x", Elastic.easeOut, 550, -0, 1, true);
- }
- function irASlide2(e:MouseEvent){
- new Tween(slide1_mc, "x", Regular.easeOut, 0, -550, 1, true);
- new Tween(slide2_mc, "x", Elastic.easeOut, 550, -0, 1, true);
- new Tween(slide2_mc.nube_mc, "scaleX", Elastic.easeOut, 0, 1, 3, true);
- new Tween(slide2_mc.nube_mc, "scaleY", Elastic.easeOut, 0, 1, 3, true);
- }
- function irASlide3(e:MouseEvent){
- new Tween(slide2_mc, "x", Regular.easeOut, 0, -550, 1, true);
- new Tween(slide3_mc, "x", Elastic.easeOut, 550, -0, 1, true);
- }
- //Animar objeto dentro de otro movieclip (slide)
- slide1_mc.animacion_mc.stop();
- slide1_mc.animacion_mc.addEventListener(MouseEvent.ROLL_OVER, correrAnimacion);
- slide1_mc.animacion_mc.addEventListener(MouseEvent.ROLL_OUT, detenerAnimacion);
- function correrAnimacion(e:MouseEvent){
- //e.currentTarget hace referencia al movieclip que este ejecutando la funcion
- e.currentTarget.play();
- }
- function detenerAnimacion(e:MouseEvent){
- e.currentTarget.stop();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement