La modificación de esta GalerÃa + Thumbs. Whos Buena??
- Playdo
- Born


- Registrado: Ene 18, 2010
- Mensajes: 2
- Status: Offline
Im no un Actionscripter sino un artista con un conocimiento limitado de ActionScript. Durante más de dos semanas Ive estado tratando de conseguir un trozo de código juntos, pero seguir corriendo en las paredes de ladrillo sin fin. Yo habrÃa pensado que esto iba a ser fácil pero no ha habido nadie ahà fuera capaz de mostrarme la solución final hasta el momento.
Im que busca un resultado similar a este http://www.republicofcode tutorial. (ponga aquà COM) / tutoriales / flash / xmlimagegallery / pero con algunos cambios especÃficos. No he subido mis intentos en el código, ya que probablemente complicará las cosas.
Los archivos fuente se encuentra en la parte inferior de este enlace: http://www.republicofcode. (ponga aquà COM) / tutorials/flash/xmlimagegallery/7.php
Lo que estoy tratando de conseguir es la galerÃa de arriba, pero que especÃficamente hace lo siguiente cuando se presiona una miniatura:
- Mostrar el preloader (aunque manteniendo la imagen actual en pantalla).
- Cuando el preloader ha terminado luego se van desvaneciendo la imagen actual a la alfa = 0
- Leve pausa
- Después de la pausa se desvanecen en la siguiente imagen para alfa = 100.
- Además Ive estado tratando de obtener el alfa de imágenes en miniatura para el 50%. Luego, el onRollOver y onRelease para configurar el alfa y el 100%. Similar a esta: http://www.republicofcode. (ponga aquà COM) / tutoriales / flash / ImageGallery /
Si alguien realmente puede hacer este post, por favor. Pero no puesto a menos que haya probado y confirmado, porque no puedo estar corriendo hacia atrás y hacia adelante nunca más.
PS Ive hade com poner entre paréntesis que me permita publicar una URL
Im que busca un resultado similar a este http://www.republicofcode tutorial. (ponga aquà COM) / tutoriales / flash / xmlimagegallery / pero con algunos cambios especÃficos. No he subido mis intentos en el código, ya que probablemente complicará las cosas.
Los archivos fuente se encuentra en la parte inferior de este enlace: http://www.republicofcode. (ponga aquà COM) / tutorials/flash/xmlimagegallery/7.php
Lo que estoy tratando de conseguir es la galerÃa de arriba, pero que especÃficamente hace lo siguiente cuando se presiona una miniatura:
- Mostrar el preloader (aunque manteniendo la imagen actual en pantalla).
- Cuando el preloader ha terminado luego se van desvaneciendo la imagen actual a la alfa = 0
- Leve pausa
- Después de la pausa se desvanecen en la siguiente imagen para alfa = 100.
- Además Ive estado tratando de obtener el alfa de imágenes en miniatura para el 50%. Luego, el onRollOver y onRelease para configurar el alfa y el 100%. Similar a esta: http://www.republicofcode. (ponga aquà COM) / tutoriales / flash / ImageGallery /
Si alguien realmente puede hacer este post, por favor. Pero no puesto a menos que haya probado y confirmado, porque no puedo estar corriendo hacia atrás y hacia adelante nunca más.
PS Ive hade com poner entre paréntesis que me permita publicar una URL
- Anonymous
- Bot


- Registrado: 25 Feb 2008
- Mensajes: ?
- Loc: Ozzuland
- Status: Online
Enero 18th, 2010, 4:59 pm
- Playdo
- Born


- Registrado: Ene 18, 2010
- Mensajes: 2
- Status: Offline
A continuación se muestra el código de tutoriales:
Código: [ Select ]
import mx.transitions.Tween;
import mx.transitions.easing.*;
var myGalleryXML = new XML();
myGalleryXML.ignoreWhite = true;
myGalleryXML.load("gallery.xml");
myGalleryXML.onLoad = function() {
_root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
_root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
_root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
_root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = myImages.length;
_root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
_root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
_root.full_x = myGalleryXML.firstChild.attributes.full_x;
_root.full_y = myGalleryXML.firstChild.attributes.full_y;
callThumbs();
createMask();
scrolling();
};
function callThumbs() {
_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
container_mc._x = _root.gallery_x;
container_mc._y = _root.gallery_y;
var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);
for (i=0; i<myImagesTotal; i++) {
thumbURL = myImages[i].attributes.thumb_url;
myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth());
myThumb_mc._y = _root.thumb_height*i;
clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
preloader.onLoadStart = function(target) {
target.createTextField("my_txt",target.getNextHighestDepth(),0,0,100,20);
target.my_txt.selectable = false;
};
preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};
preloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField();
target.onRelease = function() {
callFullImage(this._name);
};
target.onRollOver = function() {
this._alpha = 50;
};
target.onRollOut = function() {
this._alpha = 100;
};
};
}
}
function callFullImage(myNumber) {
myURL = myImages[myNumber].attributes.full_url;
myTitle = myImages[myNumber].attributes.title;
_root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
fullImage_mc._x = _root.full_x;
fullImage_mc._y = _root.full_y;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
target.createTextField("my_txt",fullImage_mc.getNextHighestDepth(),0,0,200,20);
target.my_txt.selectable = false;
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.text = myTitle;
};
fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);
}
function createMask() {
_root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
mask_mc._x = _root.gallery_x;
mask_mc._y = _root.gallery_y;
mask_mc.beginFill(0x000000,100);
mask_mc.lineTo(_root.gallery_width,0);
mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
mask_mc.lineTo(0,_root.gallery_height);
mask_mc.lineTo(0,0);
container_mc.setMask(mask_mc);
}
function scrolling() {
_root.onEnterFrame = function() {
container_mc._y += Math.cos(((mask_mc._ymouse)/mask_mc._height)*Math.PI)*15;
if (container_mc._y>mask_mc._y) {
container_mc._y = mask_mc._y;
}
if (container_mc._y<(mask_mc._y-(container_mc._height-mask_mc._height))) {
container_mc._y = mask_mc._y-(container_mc._height-mask_mc._height);
}
};
}
import mx.transitions.easing.*;
var myGalleryXML = new XML();
myGalleryXML.ignoreWhite = true;
myGalleryXML.load("gallery.xml");
myGalleryXML.onLoad = function() {
_root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
_root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
_root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
_root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = myImages.length;
_root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
_root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
_root.full_x = myGalleryXML.firstChild.attributes.full_x;
_root.full_y = myGalleryXML.firstChild.attributes.full_y;
callThumbs();
createMask();
scrolling();
};
function callThumbs() {
_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
container_mc._x = _root.gallery_x;
container_mc._y = _root.gallery_y;
var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);
for (i=0; i<myImagesTotal; i++) {
thumbURL = myImages[i].attributes.thumb_url;
myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth());
myThumb_mc._y = _root.thumb_height*i;
clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
preloader.onLoadStart = function(target) {
target.createTextField("my_txt",target.getNextHighestDepth(),0,0,100,20);
target.my_txt.selectable = false;
};
preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};
preloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField();
target.onRelease = function() {
callFullImage(this._name);
};
target.onRollOver = function() {
this._alpha = 50;
};
target.onRollOut = function() {
this._alpha = 100;
};
};
}
}
function callFullImage(myNumber) {
myURL = myImages[myNumber].attributes.full_url;
myTitle = myImages[myNumber].attributes.title;
_root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
fullImage_mc._x = _root.full_x;
fullImage_mc._y = _root.full_y;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
target.createTextField("my_txt",fullImage_mc.getNextHighestDepth(),0,0,200,20);
target.my_txt.selectable = false;
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.text = myTitle;
};
fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);
}
function createMask() {
_root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
mask_mc._x = _root.gallery_x;
mask_mc._y = _root.gallery_y;
mask_mc.beginFill(0x000000,100);
mask_mc.lineTo(_root.gallery_width,0);
mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
mask_mc.lineTo(0,_root.gallery_height);
mask_mc.lineTo(0,0);
container_mc.setMask(mask_mc);
}
function scrolling() {
_root.onEnterFrame = function() {
container_mc._y += Math.cos(((mask_mc._ymouse)/mask_mc._height)*Math.PI)*15;
if (container_mc._y>mask_mc._y) {
container_mc._y = mask_mc._y;
}
if (container_mc._y<(mask_mc._y-(container_mc._height-mask_mc._height))) {
container_mc._y = mask_mc._y-(container_mc._height-mask_mc._height);
}
};
}
- import mx.transitions.Tween;
- import mx.transitions.easing.*;
- var myGalleryXML = new XML();
- myGalleryXML.ignoreWhite = true;
- myGalleryXML.load("gallery.xml");
- myGalleryXML.onLoad = function() {
- _root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
- _root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
- _root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
- _root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
- _root.myImages = myGalleryXML.firstChild.childNodes;
- _root.myImagesTotal = myImages.length;
- _root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
- _root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
- _root.full_x = myGalleryXML.firstChild.attributes.full_x;
- _root.full_y = myGalleryXML.firstChild.attributes.full_y;
- callThumbs();
- createMask();
- scrolling();
- };
- function callThumbs() {
- _root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
- container_mc._x = _root.gallery_x;
- container_mc._y = _root.gallery_y;
- var clipLoader = new MovieClipLoader();
- var preloader = new Object();
- clipLoader.addListener(preloader);
- for (i=0; i<myImagesTotal; i++) {
- thumbURL = myImages[i].attributes.thumb_url;
- myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth());
- myThumb_mc._y = _root.thumb_height*i;
- clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
- preloader.onLoadStart = function(target) {
- target.createTextField("my_txt",target.getNextHighestDepth(),0,0,100,20);
- target.my_txt.selectable = false;
- };
- preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
- target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
- };
- preloader.onLoadComplete = function(target) {
- new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
- target.my_txt.removeTextField();
- target.onRelease = function() {
- callFullImage(this._name);
- };
- target.onRollOver = function() {
- this._alpha = 50;
- };
- target.onRollOut = function() {
- this._alpha = 100;
- };
- };
- }
- }
- function callFullImage(myNumber) {
- myURL = myImages[myNumber].attributes.full_url;
- myTitle = myImages[myNumber].attributes.title;
- _root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
- fullImage_mc._x = _root.full_x;
- fullImage_mc._y = _root.full_y;
- var fullClipLoader = new MovieClipLoader();
- var fullPreloader = new Object();
- fullClipLoader.addListener(fullPreloader);
- fullPreloader.onLoadStart = function(target) {
- target.createTextField("my_txt",fullImage_mc.getNextHighestDepth(),0,0,200,20);
- target.my_txt.selectable = false;
- };
- fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
- target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
- };
- fullPreloader.onLoadComplete = function(target) {
- new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
- target.my_txt.text = myTitle;
- };
- fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);
- }
- function createMask() {
- _root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
- mask_mc._x = _root.gallery_x;
- mask_mc._y = _root.gallery_y;
- mask_mc.beginFill(0x000000,100);
- mask_mc.lineTo(_root.gallery_width,0);
- mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
- mask_mc.lineTo(0,_root.gallery_height);
- mask_mc.lineTo(0,0);
- container_mc.setMask(mask_mc);
- }
- function scrolling() {
- _root.onEnterFrame = function() {
- container_mc._y += Math.cos(((mask_mc._ymouse)/mask_mc._height)*Math.PI)*15;
- if (container_mc._y>mask_mc._y) {
- container_mc._y = mask_mc._y;
- }
- if (container_mc._y<(mask_mc._y-(container_mc._height-mask_mc._height))) {
- container_mc._y = mask_mc._y-(container_mc._height-mask_mc._height);
- }
- };
- }
Página 1 de 1
Para responder a este tema que necesita para ingresar o registrarse. Es gratis.
Publicar Información
- Total de mensajes en este tema: 2 mensajes
- Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 53 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
