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

scroll

Estas en el tema de scroll en el foro de Flash y Actionscript en Foros del Web. Hola, Estoy intentando duplicar en otros frames una movie de un scroll bajado de flash kit pero no logro que funcione el segundo. Por mucho ...
  #1 (permalink)  
Antiguo 13/08/2006, 13:13
 
Fecha de Ingreso: agosto-2006
Mensajes: 8
Antigüedad: 17 años, 8 meses
Puntos: 0
scroll

Hola, Estoy intentando duplicar en otros frames una movie de un scroll bajado de flash kit pero no logro que funcione el segundo. Por mucho que cambie el nobre tanto en la instancia como en el script NO FUNCIONA.Por favor ya no se que hacer.

Muchisimas gracias
  #2 (permalink)  
Antiguo 13/08/2006, 13:40
Avatar de Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Hola mon45:
Bienvenido al Foro.
Que códigos tienes ese scroll, porque podría ser problema de ruta.

Espero poderte ser de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/
  #3 (permalink)  
Antiguo 13/08/2006, 23:52
 
Fecha de Ingreso: agosto-2006
Mensajes: 8
Antigüedad: 17 años, 8 meses
Puntos: 0
Muchas gracias por tu respuesta. Si quieres pasame tu mail y te adjunto el archivo. Porque se trata de un Mc con dos mas en su nterior. Por cierto, tienes unos efectos muy buenos en esa web.
Monica
  #4 (permalink)  
Antiguo 14/08/2006, 09:12
Avatar de Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Hola mon45:
Te envié un MP.

Espero poderte ser de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/
  #5 (permalink)  
Antiguo 14/08/2006, 10:56
 
Fecha de Ingreso: agosto-2006
Mensajes: 8
Antigüedad: 17 años, 8 meses
Puntos: 0
perdona pero no soy muy experta, que es un MP?
  #6 (permalink)  
Antiguo 14/08/2006, 10:58
 
Fecha de Ingreso: agosto-2006
Mensajes: 8
Antigüedad: 17 años, 8 meses
Puntos: 0
Esto es lo que tengo en el primer frame:
function getStartingDims(){
if (myVar == undefined){
boxWidth = box_cont.box1._width; // Get the width of box1 inside our containerMC
box2X = box_cont.box2._x; // Getting our box2's x value;
gap = box2x - boxWidth; // the Gap between 2 boxes is the 2nd box's x value - the width of a box
totalDistance = gap + boxWidth; // distance of the gap + a width
startX = box_cont._x; // Get the Starting X position of box_cont
farthestX = box_cont.box6._x ; // Find out what the farthest point is we want to go, I actually messed up and in the script I had to go farthestX - totalDistance to make it work right.
myVar = 1; // Make it so It only sets this function on the Very First Frame
}
}

arrow_right.onRelease = function() {
if (Math.floor(box_cont._x) > Math.floor(((-1) * farthestX) + totalDistance) ){ // By using Math.floor it rounds it down for us, making decimals a lot easier to work with
_root.direction = "right"; // For frame 2, tells us which function to use
_root.xDest = box_cont._x - totalDistance; // Tells us what the destination is that we are going to next
gotoAndPlay(2); // We play our functions in a loop between frames 2 and 3
}
}
arrow_left.onRelease = function() {
if (box_cont._x < startX ){ // Check to make sure its not less than our starting x value
_root.direction = "left"; // For frame 2, tells us which function to us
_root.xDest = box_cont._x + totalDistance; // Tells us what the destination is that we are going to next
gotoAndPlay(2); // We play our functions in a loop between frames 2 and 3
}
}
function moveLeft(){
if (Math.floor(box_cont._x) != Math.floor(_root.xDest)){ // Again check using Math.floor to make sure we can still loop the movement
myDistance = (_root.xDest - box_cont._x); // This is our distance for our destination to our current x value
myJump = Math.sqrt(myDistance); // For a smooth transition, we use Math.sqrt function so that it goes really fast then slows down
box_cont._x += myJump; // Tells box_cont to move in the increment of myJump
}else{
gotoAndStop("anchored"); // stop at Frame 1
}
}
function moveRight(){
if (Math.floor(box_cont._x) != Math.floor(_root.xDest)){
myDistance = (box_cont._x - _root.xDest);
myJump = Math.sqrt(myDistance);
box_cont._x -= myJump;
}else{
gotoAndStop("anchored");
}
}

Y esto en otro pero de la segunada capa:
getStartingDims(); // Call our function to get us starting variables, such as x position
stop();

esto en el segundo frame:
if (_root.direction == "right"){
moveRight(); // When our right arrow is pushed, call our moveRight function in frame 1
}else if (_root.direction == "left"){
moveLeft(); // When our left arrow is pushed, call our moveLeft function in frame 1
}
Y esto en el tercero:
gotoAndPlay(2); // Loop to continue movement
  #7 (permalink)  
Antiguo 14/08/2006, 11:02
 
Fecha de Ingreso: agosto-2006
Mensajes: 8
Antigüedad: 17 años, 8 meses
Puntos: 0
espero que te sirva de algo, ya que para mi suena a chino
  #8 (permalink)  
Antiguo 14/08/2006, 11:07
Avatar de Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Un MP es un Mensaje Privado.
Cuando ingresas al Foro en la parte superior derecha está tu Nick y allí dice cuantos mensajes tienes, haz clic allí.

Espero poderte ser de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/
  #9 (permalink)  
Antiguo 14/08/2006, 13:18
Avatar de Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Hola Mónica:
Ya te envié tu archivo corregido.
Compara con el que tienes allí.

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/
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 13:21.