Problema con la costumbre y el contenido scrollbar...

  • ClevelandSlim
  • Born
  • Born
  • No Avatar
  • Registrado: Mar 28, 2008
  • Mensajes: 1
  • Status: Offline

Nota Marzo 28th, 2008, 8:37 am

He utilizado este tutorial http://www.kirupa.com/developer/flash8/scrollbar.htm para crear barras de desplazamiento personalizado en un sitio de destello que estoy trabajando. En todos los casos he utilizado estas barras de desplazamiento, que funcionan perfectamente a excepción de uno. Las preguntas frecuentes...de su alrededor de 2400 píxeles de alto, y se desplaza bajo una máscara que es de 450 píxeles de alto. Parece que la longitud completa de las preguntas más frecuentes se desplaza, pero no se puede ver aproximadamente el tercio inferior de las preguntas frecuentes. viene en blanco.

¿Puede solucionarse esto?

Aquí está la acción de secuencias de comandos de la barra de desplazamiento (al igual que en el tutorial...

--------------------------


Código: [ Select ]
scrolling = function () {

var scrollHeight:Number = scrollTrack._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrack._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrack._x;
var top:Number = scrollTrack._y;
var right:Number = scrollTrack._x;
var bottom:Number = scrollTrack._height-scrollFaceHeight+scrollTrack._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);

scrollFace.onPress = function() {

var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {

dy = Math.abs(initPosition-this._y);
contentMain._y = Math.round(dy*-1*moveVal+initContentPos);

};

};
scrollFace.onMouseUp = function() {

stopDrag();
delete this.onMouseMove;

};
btnUp.onPress = function() {

this.onEnterFrame = function() {

if (contentMain._y+speed<maskedView._y) {

if (scrollFace._y<=top) {

scrollFace._y = top;

} else {

scrollFace._y -= speed/moveVal;

}
contentMain._y += speed;

} else {

scrollFace._y = top;
contentMain._y = maskedView._y;
delete this.onEnterFrame;

}

};

};
btnUp.onDragOut = function() {

delete this.onEnterFrame;

};
btnUp.onRollOut = function() {

delete this.onEnterFrame;

};
btnDown.onPress = function() {

this.onEnterFrame = function() {

if (contentMain._y-speed>finalContentPos) {

if (scrollFace._y>=bottom) {

scrollFace._y = bottom;

} else {

scrollFace._y += speed/moveVal;

}
contentMain._y -= speed;

} else {

scrollFace._y = bottom;
contentMain._y = finalContentPos;
delete this.onEnterFrame;

}

};

};
btnDown.onRelease = function() {

delete this.onEnterFrame;

};
btnDown.onDragOut = function() {

delete this.onEnterFrame;

};

if (contentHeight<maskHeight) {

scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;

} else {

scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;

}

};
scrolling();
  1. scrolling = function () {
  2. var scrollHeight:Number = scrollTrack._height;
  3. var contentHeight:Number = contentMain._height;
  4. var scrollFaceHeight:Number = scrollFace._height;
  5. var maskHeight:Number = maskedView._height;
  6. var initPosition:Number = scrollFace._y=scrollTrack._y;
  7. var initContentPos:Number = contentMain._y;
  8. var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
  9. var left:Number = scrollTrack._x;
  10. var top:Number = scrollTrack._y;
  11. var right:Number = scrollTrack._x;
  12. var bottom:Number = scrollTrack._height-scrollFaceHeight+scrollTrack._y;
  13. var dy:Number = 0;
  14. var speed:Number = 10;
  15. var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);
  16. scrollFace.onPress = function() {
  17. var currPos:Number = this._y;
  18. startDrag(this, false, left, top, right, bottom);
  19. this.onMouseMove = function() {
  20. dy = Math.abs(initPosition-this._y);
  21. contentMain._y = Math.round(dy*-1*moveVal+initContentPos);
  22. };
  23. };
  24. scrollFace.onMouseUp = function() {
  25. stopDrag();
  26. delete this.onMouseMove;
  27. };
  28. btnUp.onPress = function() {
  29. this.onEnterFrame = function() {
  30. if (contentMain._y+speed<maskedView._y) {
  31. if (scrollFace._y<=top) {
  32. scrollFace._y = top;
  33. } else {
  34. scrollFace._y -= speed/moveVal;
  35. }
  36. contentMain._y += speed;
  37. } else {
  38. scrollFace._y = top;
  39. contentMain._y = maskedView._y;
  40. delete this.onEnterFrame;
  41. }
  42. };
  43. };
  44. btnUp.onDragOut = function() {
  45. delete this.onEnterFrame;
  46. };
  47. btnUp.onRollOut = function() {
  48. delete this.onEnterFrame;
  49. };
  50. btnDown.onPress = function() {
  51. this.onEnterFrame = function() {
  52. if (contentMain._y-speed>finalContentPos) {
  53. if (scrollFace._y>=bottom) {
  54. scrollFace._y = bottom;
  55. } else {
  56. scrollFace._y += speed/moveVal;
  57. }
  58. contentMain._y -= speed;
  59. } else {
  60. scrollFace._y = bottom;
  61. contentMain._y = finalContentPos;
  62. delete this.onEnterFrame;
  63. }
  64. };
  65. };
  66. btnDown.onRelease = function() {
  67. delete this.onEnterFrame;
  68. };
  69. btnDown.onDragOut = function() {
  70. delete this.onEnterFrame;
  71. };
  72. if (contentHeight<maskHeight) {
  73. scrollFace._visible = false;
  74. btnUp.enabled = false;
  75. btnDown.enabled = false;
  76. } else {
  77. scrollFace._visible = true;
  78. btnUp.enabled = true;
  79. btnDown.enabled = true;
  80. }
  81. };
  82. scrolling();


--------------------------

Un enlace al archivo flash real es http://www.sweetvenus.net/flash/index-3.swf y para ver el problema de la barra de desplazamiento en vista de la acción del archivo flash y pulse el vínculo de preguntas frecuentes, el contenido de preguntas frecuentes muestra el problema.

Aquí hay una captura de pantalla del archivo flash trabajado en Flash 8 Pro
http://www.sweetvenus.net/flash/scroll-problem.jpg

Gracias de antemano por cualquier ayuda!
~ ~ Slim
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Marzo 28th, 2008, 8:37 am

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Nota Abril 8th, 2008, 9:33 am

Los enlaces a tus ejemplos no están funcionando. ¿Se ha resuelto el problema y eliminado?
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.

Publicar Información

  • Total de mensajes en este tema: 2 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 55 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC