Foros del Web » Creando para Internet » Flash y Actionscript »

Movimiento

Estas en el tema de Movimiento en el foro de Flash y Actionscript en Foros del Web. Hola como se hace este movimiento cuando se pincha en un botón, se sube y baja . s3.envato.com/files/104548/index.html...
  #1 (permalink)  
Antiguo 26/04/2009, 09:46
 
Fecha de Ingreso: abril-2009
Mensajes: 173
Antigüedad: 15 años
Puntos: 0
Movimiento

Hola como se hace este movimiento cuando se pincha en un botón, se sube y baja .
s3.envato.com/files/104548/index.html
  #2 (permalink)  
Antiguo 26/04/2009, 10:25
Avatar de Lynxcraft  
Fecha de Ingreso: noviembre-2007
Ubicación: yecla murcia
Mensajes: 1.346
Antigüedad: 16 años, 5 meses
Puntos: 51
Respuesta: Movimiento

yo utilizo funciones como esto
Código PHP:
import mx.transitions.easing.*;
import mx.transitions.Tween;
boton.onRollOver=function(){
    var 
ty:Tween = new Tween(boton"_y",nullboton._y,3501true);
}
boton.onRollOut=function(){
    var 
ty:Tween = new Tween(boton"_y",Elastic.easeOutboton._y,6001true);

para ver un ejemplo de como funciona simplemente crea un archivo nuevo y el primer fotograma pega este código asi veras mejor como funciona
///CCREA BOTON ___________________

Código PHP:
import flash.display.BitmapData;
import flash.filters.BevelFilter;
import flash.geom.Point;

var 
myBitmapData:BitmapData = new BitmapData(100300true0xCCCCCCCC);
var 
boton:MovieClip this.createEmptyMovieClip("boton"this.getNextHighestDepth());
var 
mc:MovieClip boton.createEmptyMovieClip("mc"boton.getNextHighestDepth());
mc.attachBitmap(myBitmapDatathis.getNextHighestDepth());
mc._x=-50
mc
._y=-300


boton
._x=200
boton
._y=600

import mx
.transitions.easing.*;
import mx.transitions.Tween;
boton.onRollOver=function(){
    var 
ty:Tween = new Tween(boton"_y",nullboton._y,3501true);
}
boton.onRollOut=function(){
    var 
ty:Tween = new Tween(boton"_y",Elastic.easeOutboton._y,6001true);

__________________
Sobran las ideas cuando faltan ganas de trabajar en ellas
Lynxcraft
  #3 (permalink)  
Antiguo 26/04/2009, 10:37
 
Fecha de Ingreso: abril-2009
Mensajes: 173
Antigüedad: 15 años
Puntos: 0
Respuesta: Movimiento

Muy bonito, pero estoy ploffffff. Te dejo mi correo [email protected] hablamos.. gracias wapo
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:18.