Comunidad de diseño web y desarrollo en internet online

Como personalizar el PhotoFlow Component

Citar            
MensajeEscrito el 01 Dic 2010 02:44 pm
Hola a todos me interesa hacer que el PhotoFlow sea infinito, es decir si tengo 5 fotos al llegar a la 5ta. me muestre la primera y cuando este en la #1 me muestre la 5ta.

link photoflow
http://www.flashloaded.com/flashcomponents/photoflow/

lo que quiero lograr es que se paresca un poco a esta pagina:
http://www.rolex.com/es

Gracias...

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

chrome
Citar            
MensajeEscrito el 01 Dic 2010 02:47 pm

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 01 Dic 2010 02:49 pm
Gracias Jorge, estoy leyendo si alguien ha hecho lo que quiero postie el mensaje por si alguien tenia la solución porque es un trabajo que debo terminar y estoy un poco atrasado...

Richard Mendoza

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

chrome
Citar            
MensajeEscrito el 01 Dic 2010 07:58 pm
Hola a todos encontré una solución a mi problema, pero cuando la aplico en mi fla no me funciona y creo que e seguido los pasos al pie de la letra, este es el ActionScript de la solución el componente esta instanciado como stak

/*
In order for this to work right, I created 3 blank MCs for a hitTest() detection.
instance names are: hitLeft, hitRight, mouseTest
hitLeft should be placed on the stage to the left and covering the photoFlow Stack
hitRight the same but to the right
mouseTest is a draggable mc that is used for the detection.
*/

mouseTest.startDrag(true);
var dir:String; // this will be used to set the direction.. see below.
//create array for each value
var urlAry:Array = new Array();
var linkAry:Array = new Array();
/*
I couldn't figure how to use the description in between the tags, so I created a separate descrip tag inside my XML for the description
*/
var descAry:Array = new Array();
var nameAry:Array = new Array();

// grab XML data for array
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.load("photos.xml"); //enter the name of your external XML here
xml.onLoad = parse;
function parse(success){
if(success){
root = xml.firstChild;
_global.numberOfItems = root.attributes.items;
itemNode = root.firstChild;
var i = 0;
while (itemNode != null){

nameAry.push(itemNode.attributes.name);
urlAry.push(itemNode.attributes.url);
linkAry.push(itemNode.attributes.link);
descAry.push(itemNode.attributes.descrip);
// descrip is the name of my description tag as mentioned above


itemNode = itemNode.nextSibling;
i++;
}

}
else{
trace("XML Failed.");
}

}


var inst={};
inst.onInitPhotoFlow=function(evt){
_root.og = stak.getTotal(); // variable holds the original number of items
_root.dun = _root.og; //variable sets the starting point
}
stak.addEventListener ("onInitPhotoFlow", inst);

function onselect(){
var eventListener:Object = new Object();
eventListener.onSelectPhoto = function(eventObject:Object){

if(hitRight.hitTest(mouseTest)){
clickforward();
_root.dir = "right";
}
else if(hitLeft.hitTest(mouseTest)){
clickback();
_root.dir = "left";
}
else if(_root.dir == "left"){
clickback();
}
else if(_root.dir == "right"){
clickback();
}

}
stak.addEventListener("onSelectPhoto", eventListener);
}


m = 0;

function clickforward(){
tot = stak.getTotal();
if (stak.getSelectedIndex() >= (tot - 2)){
stak.addPhoto({name:nameAry[m], url:urlAry[m], link:linkAry[m], descrip:descAry[m]}, tot+1);
m++;
if(m >(og-1)){m = 0;}
}
}

function clickback(){
curri = stak.getSelectedIndex();
if(curri <= 1){
dang = dun - 1;
tot = stak.getTotal();
stak.addPhoto({name:nameAry[dang], url:urlAry[dang], link:linkAry[dang], descrip:descAry[dang]}, 0);
dun--; //decrement the dun variable
if(dang == 0 ){dun = og;}
}
}


// button on the stage that control the movement. I did not use the scrollbar for this example.

clkrt.onPress = function(){
stak.flipNext();
_root.dir = "right";
clickforward();
}

clklt.onPress = function(){
stak.flipBack();
_root.dir = "right";
clickback();
}

Este es el mio.

/*
In order for this to work right, I created 3 blank MCs for a hitTest() detection.
instance names are: hitLeft, hitRight, mouseTest
hitLeft should be placed on the stage to the left and covering the photoFlow Stack
hitRight the same but to the right
mouseTest is a draggable mc that is used for the detection.
*/

mouseTest.startDrag(true);
var dir:String; // this will be used to set the direction.. see below.
//create array for each value
var urlAry:Array = new Array();
var linkAry:Array = new Array();
/*
I couldn't figure how to use the description in between the tags, so I created a separate descrip tag inside my XML for the description
*/
var descAry:Array = new Array();
var nameAry:Array = new Array();

// grab XML data for array
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.load("migallery.xml"); //enter the name of your external XML here
xml.onLoad = parse;
function parse(success){
if(success){
root = xml.firstChild;
_global.numberOfItems = root.attributes.items;
itemNode = root.firstChild;
var i = 0;
while (itemNode != null){

nameAry.push(itemNode.attributes.name);
urlAry.push(itemNode.attributes.url);
linkAry.push(itemNode.attributes.link);
// descrip is the name of my description tag as mentioned above


itemNode = itemNode.nextSibling;
i++;
}

}
else{
trace("XML Failed.");
}

}


var inst={};
inst.onInitPhotoFlow=function(evt){
_root.og = PRESSHOW.getTotal(); // variable holds the original number of items
_root.dun = _root.og; //variable sets the starting point
}
PRESSHOW.addEventListener ("onInitPhotoFlow", inst);

function onselect(){
var eventListener:Object = new Object();
eventListener.onSelectPhoto = function(eventObject:Object){

if(hitRight.hitTest(mouseTest)){
clickforward();
_root.dir = "right";
}
else if(hitLeft.hitTest(mouseTest)){
clickback();
_root.dir = "left";
}
else if(_root.dir == "left"){
clickback();
}
else if(_root.dir == "right"){
clickback();
}

}
PRESSHOW.addEventListener("onSelectPhoto", eventListener);
}


m = 0;

function clickforward(){
tot = PRESSHOW.getTotal();
if (PRESSHOW.getSelectedIndex() >= (tot - 2)){
PRESSHOW.addPhoto({name:nameAry[m], url:urlAry[m], link:linkAry[m], descrip:descAry[m]}, tot+1);
m++;
if(m >(og-1)){m = 0;}
}
}

function clickback(){
curri = PRESSHOW.getSelectedIndex();
if(curri <= 1){
dang = dun - 1;
tot = PRESSHOW.getTotal();
PRESSHOW.addPhoto({name:nameAry[dang], url:urlAry[dang], link:linkAry[dang], descrip:descAry[dang]}, 0);
dun--; //decrement the dun variable
if(dang == 0 ){dun = og;}
}
}


// button on the stage that control the movement. I did not use the scrollbar for this example.

clkrt.onPress = function(){
PRESSHOW.flipNext();
_root.dir = "right";
clickforward();
}

clklt.onPress = function(){
PRESSHOW.flipBack();
_root.dir = "right";
clickback();
}


Quisiera saber porque no me funciona...

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.