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

Problema extraño. Help!!!

Estas en el tema de Problema extraño. Help!!! en el foro de Flash y Actionscript en Foros del Web. Hola!!!! Tengo un proyecto de un sitio flash al que le falta un detalle muy finito pero que no favorece para nada, la navegación. y ...
  #1 (permalink)  
Antiguo 22/05/2009, 09:06
Avatar de highlord  
Fecha de Ingreso: noviembre-2007
Ubicación: Argentina
Mensajes: 353
Antigüedad: 16 años, 4 meses
Puntos: 16
Problema extraño. Help!!!

Hola!!!!

Tengo un proyecto de un sitio flash al que le falta un detalle muy finito pero que no favorece para nada, la navegación.
y es que al publicarlo al swf presenta un problema con el mouse, nunca me habia pasado, pero resulta que ahora me encuentro con que si quiero utilizar el scroll o ruedita del mouse para subir o bajar, no funciona dentro del swf.
Pro favor quien sepa algo del tema!!
Necesito resolverlo cuanto antes!!!

Muchas Gracias.
  #2 (permalink)  
Antiguo 22/05/2009, 09:09
Avatar de gVenom  
Fecha de Ingreso: julio-2008
Ubicación: Costa Rica
Mensajes: 1.458
Antigüedad: 15 años, 9 meses
Puntos: 53
Respuesta: Problema extraño. Help!!!

tu hiciste el flash? o es de una plantilla
__________________
"Al que venciere y guardare mis obras hasta el fin, yo le daré autoridad sobre las naciones."
Apocalipsis 2: 26
Servicios para Pymes http://dst.co.cr
  #3 (permalink)  
Antiguo 22/05/2009, 09:38
Avatar de highlord  
Fecha de Ingreso: noviembre-2007
Ubicación: Argentina
Mensajes: 353
Antigüedad: 16 años, 4 meses
Puntos: 16
Respuesta: Problema extraño. Help!!!

lo hice yo!!!
Y ahora estoy viendo que en Mozilla si anda bien la ruedita del mouse.
Pero lo mas extraño es que he hecho otras web como http://www.misticaeterna.com, http://www.miendulzarte.com, http://www.fmsientorock.com.ar o inclusive http://www.dsweb-lp.com.ar y en ninguna tengo este problema en el I. Explorer.
veré si lo puedo publicar ute paso el link para que me digas si a vos te funciona el sacroll.
  #4 (permalink)  
Antiguo 22/05/2009, 09:40
Avatar de gVenom  
Fecha de Ingreso: julio-2008
Ubicación: Costa Rica
Mensajes: 1.458
Antigüedad: 15 años, 9 meses
Puntos: 53
Respuesta: Problema extraño. Help!!!

busca informacion de la propiedad mouseWheelEnabled
__________________
"Al que venciere y guardare mis obras hasta el fin, yo le daré autoridad sobre las naciones."
Apocalipsis 2: 26
Servicios para Pymes http://dst.co.cr
  #5 (permalink)  
Antiguo 22/05/2009, 09:44
Avatar de highlord  
Fecha de Ingreso: noviembre-2007
Ubicación: Argentina
Mensajes: 353
Antigüedad: 16 años, 4 meses
Puntos: 16
Respuesta: Problema extraño. Help!!!

ok, lo que estoy viendo además es que funciona bien en Internet Explorer pero hasta cierto punto.
Cuando terminan de cargarse al final de la presentacion todos los swf externos, como ultimo elemento se carga un txt en un scroll y es ahi cuando deja de funcionar la ruedita. por mas que me posiciones fuera del scroll o en cualquier parte del swf Index.
  #6 (permalink)  
Antiguo 22/05/2009, 09:46
Avatar de gVenom  
Fecha de Ingreso: julio-2008
Ubicación: Costa Rica
Mensajes: 1.458
Antigüedad: 15 años, 9 meses
Puntos: 53
Respuesta: Problema extraño. Help!!!

Código AS:
Ver original
  1. TextField.mouseWheelEnabled = true;

Cambia "TextField" por el nombre de isntancia de tu caja de texto.
__________________
"Al que venciere y guardare mis obras hasta el fin, yo le daré autoridad sobre las naciones."
Apocalipsis 2: 26
Servicios para Pymes http://dst.co.cr
  #7 (permalink)  
Antiguo 22/05/2009, 09:50
Avatar de highlord  
Fecha de Ingreso: noviembre-2007
Ubicación: Argentina
Mensajes: 353
Antigüedad: 16 años, 4 meses
Puntos: 16
Respuesta: Problema extraño. Help!!!

Buenísimo, tengo este AS externo para las propiedades del scroll, podrias ver donde esta el problema???
No quiero meterme en problemas ya que no soy muy bueno para los codigos.


import mx.utils.Delegate;
class Pane
{
var mask : MovieClip, sc1 : MovieClip, sc2 : MovieClip, origin : MovieClip, sBar : MovieClip, Target : MovieClip;
var sTotal : Number, top : Number, h : Number, w : Number;
var ml : Object;
var delayer : Number;
function Pane (clip, width, height, pos)
{
delayer = 0;
ml = new Object ();
Mouse.addListener (ml);
this.origin = clip;
this.w = width;
this.h = height;
mask = clip._parent.createEmptyMovieClip ("masking_" + clip._name, clip._parent.getNextHighestDepth ());
mask._x = clip._x;
mask._y = clip._y;
mask.lineStyle (1, 0x000000, 100, true, "none", "round", "miter", 1);
mask.beginFill (0x000000);
mask.moveTo (0, 0);
mask.lineTo (width, 0);
mask.lineTo (width, height);
mask.lineTo (0, height);
mask.moveTo (0, 0);
clip.setMask (mask);
sc1 = clip._parent.attachMovie ("paneScrollButon", "sc1_" + clip._name, clip._parent.getNextHighestDepth ());
sc1._x = (pos == "left") ? Math.ceil (clip._x - sc1._width) : Math.ceil (clip._x + width);
sc1._y = Math.ceil (clip._y);
sc1.onPress = function ()
{
var nombre : MovieClip = this._parent ["sBar_" + this._name.substr (4, this._name.length)];
nombre.onEnterFrame = track;
this.onEnterFrame = function ()
{
if (nombre._y > nombre._top)
{
nombre._y -= 10;
} else
{
nombre._y = nombre._top;
}
};
};
sc1.onRelease = sc1.onReleaseOutside = function ()
{
delete this.onEnterFrame;
};
sc2 = clip._parent.attachMovie ("paneScrollButon2", "sc2_" + clip._name, clip._parent.getNextHighestDepth ());
sc2._x = (pos == "left") ? Math.ceil (clip._x - sc1._width) : Math.ceil (clip._x + width);
sc2._y = Math.ceil ((clip._y + height) - sc1._height);
sc2.onPress = function ()
{
var nombre : MovieClip = this._parent ["sBar_" + this._name.substr (4, this._name.length)];
nombre.onEnterFrame = track;
this.onEnterFrame = function ()
{
if (nombre._y < nombre._bottom)
{
nombre._y += 10;
} else
{
nombre._y = nombre._bottom;
}
};
};
sc2.onRelease = sc1.onReleaseOutside = function ()
{
delete this.onEnterFrame;
};
sTotal = clip.sTotal = Math.ceil (sc2._y - (sc1._y + sc1._height));
sBar = clip._parent.attachMovie ("paneScrollBar", "sBar_" + clip._name, clip._parent.getNextHighestDepth ());
sBar.Target = clip;
sBar._x = Math.ceil (sc1._x);
sBar._y = Math.ceil (sc1._y + sc1._height);
sBar._height = (((height * 100) / clip._height) / 100) * height;
//sBar._yscale = (height * 100) / clip._height;
sBar.onRelease = sBar.onReleaseOutside = function ()
{
this.isPressed = false;
this.stopDrag ();
};
var left : Number = Math.ceil (sc1._x);
var top : Number = Math.ceil (sc1._y + sc1._height + 1);
var bottom : Number = Math.ceil ((sc1._y + sTotal + sc1._height) - (sBar._height) - 1);
sBar._top = top;
sBar._left = left;
sBar._bottom = bottom;
sBar.delayer = 0;
sBar.isPressed = false;
sBar.onPress = function ()
{
this.startDrag (false, this._left, this._top, this._left, this._bottom);
this.onEnterFrame = track;
this.delayer = 0;
this.isPressed = true;
};
function track ()
{
var percent : Number = Math.round ((this._y - this._top) * 100) / (this._bottom - this._top);
var nombre : MovieClip = this._parent [this._name.substr (5, this._name.length)];
var mask : MovieClip = nombre._parent ["masking_" + nombre._name];
var diff : Number = nombre._height - mask._height;
var newVal = ( - ((diff * percent) / 100)) + mask._y;
nombre._y += (newVal - nombre._y) * 0.4;
this.delayer = this.isPressed == false ? this.delayer+1 : this.delayer;
if (this.delayer == 10)
{
delete this.onEnterFrame
}
}
ml.onMouseWheel = Delegate.create (this, wheel);
}
private function _track ()
{
var percent : Number = Math.round ((sBar._y - sBar._top) * 100) / (sBar._bottom - sBar._top);
var diff : Number = origin._height - mask._height;
var newVal = ( - ((diff * percent) / 100)) + mask._y;
origin._y += (newVal - origin._y) * 0.4;
delayer ++;
if (delayer == 10)
{
delete sBar.onEnterFrame
}
}
private function wheel (delta)
{
var ob : MovieClip = this.origin._parent;
var obj : MovieClip = this.mask;
if (ob._xmouse >= obj._x && ob._xmouse <= obj._x + this.w &&
ob._ymouse >= obj._y && ob._ymouse <= obj._y + this.h)
{
delayer = 0;
if (delta < 0)
{
sBar.onEnterFrame = Delegate.create (this, _track);
if (sBar._y + 25 < sBar._bottom)
{
sBar._y += 25;
} else
{
sBar._y = sBar._bottom;
}
} else
{
sBar.onEnterFrame = Delegate.create (this, _track);
if (sBar._y - 25 > sBar._top)
{
sBar._y -= 25;
} else
{
sBar._y = sBar._top;
}
}
}
}
public function is ()
{
return true;
}
public function die ()
{
this.mask.removeMovieClip ();
this.sBar.removeMovieClip ();
this.sc1.removeMovieClip ();
this.sc2.removeMovieClip ();
}
public function hide ()
{
this.mask._visible = false;
this.sBar._visible = false;
this.sc1._visible = false;
this.sc2._visible = false;
this.origin._visible = false;
}
public function show ()
{
this.mask._visible = true;
this.sBar._visible = true;
this.sc1._visible = true;
this.sc2._visible = true;
this.origin._visible = true;
}
public function reset ()
{
sBar._x = Math.ceil (sc1._x);
sBar._y = Math.ceil (sc1._y + sc1._height);
origin._y = sc1._y;
show ();
}
public function resize ()
{
sBar._height = (((h * 100) / origin._height) / 100) * h;
//sBar._yscale = (h * 100) / origin._height;
sBar._left = Math.ceil (sc1._x);
sBar._top = Math.ceil (sc1._y + sc1._height + 1);
sBar._bottom = Math.ceil ((sc1._y + sTotal + sc1._height) - (sBar._height) - 1);
}
}
  #8 (permalink)  
Antiguo 22/05/2009, 09:53
Avatar de highlord  
Fecha de Ingreso: noviembre-2007
Ubicación: Argentina
Mensajes: 353
Antigüedad: 16 años, 4 meses
Puntos: 16
Respuesta: Problema extraño. Help!!!

luego en el home cargo el scroll asi:



// Clase Pane: Parámetros
// Pane(instancia_moviclip, ancho, alto, ScrollPosition)
// contenidos:MovieClip
// ancho:Number
// alto: Number
// ScrollPosition: String

var newPane:Pane = new Pane(my_mc, 430, 367, "right");


esta ultima linea es la que hace el trabajo.

y para llamar al txt dentro del area de texto simplemente asi.

this.loadVariables("texto.txt");
  #9 (permalink)  
Antiguo 22/05/2009, 10:08
Avatar de gVenom  
Fecha de Ingreso: julio-2008
Ubicación: Costa Rica
Mensajes: 1.458
Antigüedad: 15 años, 9 meses
Puntos: 53
Respuesta: Problema extraño. Help!!!

Ese código esta fuera de mi rango bro, pero si el scroll no te funciona ahi el problema de be ser de tu

Código:
Mouse.addListener (ml);
this.origin = clip;
this.w = width;
this.h = height;
no se donde declaras el alto o ancho
__________________
"Al que venciere y guardare mis obras hasta el fin, yo le daré autoridad sobre las naciones."
Apocalipsis 2: 26
Servicios para Pymes http://dst.co.cr
  #10 (permalink)  
Antiguo 22/05/2009, 10:16
Avatar de highlord  
Fecha de Ingreso: noviembre-2007
Ubicación: Argentina
Mensajes: 353
Antigüedad: 16 años, 4 meses
Puntos: 16
Respuesta: Problema extraño. Help!!!

Ahhh sisi debo tener que fijarme que rango esta tomando el scroll dentro del home para achicar el area seguramente se me esta desbordando la propiedad del scroll AS fuera del contenedror delimitado por m.c., Probaré asi despues te cuento!!!
Muchas Gracias.
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 18:35.