Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

kadumx

Problema

Recommended Posts

Ajuda,

 

Criei um site todo em flash, nele fiz uma galeria de fotos "flash + xml " ..

 

Só que estou com um problema, qdo acesso a pagina da galeria o swf não puxa as fotos no xml.

 

meu código e esse .

 

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

 

on (press) {

mc_janelas.loadMovie("galley.swf");

}

 

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

 

alguém pode me ajudar!?

Compartilhar este post


Link para o post
Compartilhar em outros sites

coloca o codigo todo, não tem com te ajudar assim...

 

coloka a parte do load do XML, pode ser q ele não esta encontrando o arquivo.

 

Abraços!

Compartilhar este post


Link para o post
Compartilhar em outros sites

------------------> código do swf que chama o xml

 

larghezzamovie = Stage.height;

 

posSin = 1;

vel = -3;

dimImm = 179;

selezione._x = 100;

letto = false;

 

pos_iniziale = Stage.width-dimImm;

_root.mc_desc.sf_desc._width = pos_iniziale;

 

leggi = function () {

nuovo = new XML();

nuovo.ignoreWhite = true;

nuovo.load("file.xml");

nuovo.onLoad = function(success) {

if (success) {

nfoto = this.childNodes.length;

posDes = nfoto;

for (i=0; i<nfoto; i++) {

_root.attachMovie("mc","mc"+(i+1),i+1);

_root["mc"+(i+1)]._y = dimImm*i;

_root["mc"+(i+1)]._x = pos_iniziale;

_root["mc"+(i+1)].big = this.childNodes.attributes.photo_big;

_root["mc"+(i+1)].desc = this.childNodes.attributes.descrizione;

_root["mc"+(i+1)].contenitore.loadMovie(this.childNodes.attributes.photo);

_root["mc"+(i+1)]._alpha = 50;

_root.box.clip_mc.loadMovie(this.childNodes[0].attributes.photo_big);

_root.pre.loadMovie(this.childNodes.attributes.photo_big);

_root.image = this.childNodes[0].attributes.photo_big;

_root.mc_desc.descrizione.text = this.childNodes[0].attributes.descrizione;

_root["mc"+(i+1)].onRelease = released;

_root["mc"+(i+1)].onRollOver = rollover;

_root["mc"+(i+1)].onRollOut = rollout;

_root["mc"+(i+1)].onReleaseOutside = rollout;

}

letto = true;

} else {

_root.didascalia.text = "errore di lettura";

}

};

};

leggi();

 

_root.onMouseMove = function() {

x = _root._xmouse;

y = _root._ymouse;

if (x>pos_iniziale) {

if (y>0 && y<60) {

vel = -(Math.round((y-(larghezzamovie/2))/10));

 

}

if (y>260 && y<larghezzamovie) {

vel = -(Math.round((y-(larghezzamovie/2))/10));

 

}

} else {

if (vel>0) {

vel = 0;

} else {

vel = 0;

}

}

 

};

function released() {

 

_root.image = this.big;

_root.box.play();

_root.box.clip_mc.loadMovie(_root.image);

_root.mc_desc.descrizione.text = this.desc;

 

}

 

function rollover() {

this._alpha = 100;

 

 

}

 

 

function rollout() {

this._alpha = 50;

 

}

 

_root.onEnterFrame = function() {

if (letto) {

for (i=1; i<=nfoto; i++) {

_root["mc"+i]._y += vel;

}

if (vel>0 && _root["mc"+posSin]._y>0) {

_root["mc"+posDes]._y = _root["mc"+posSin]._y-dimImm;

posSin = posDes;

posDes--;

if (posDes == 0) {

posDes = nfoto;

}

}

if (vel<0 && _root["mc"+posSin]._y<=-dimImm) {

_root["mc"+posSin]._y = _root["mc"+posDes]._y+dimImm;

posDes = posSin;

posSin++;

if (posSin>nfoto) {

posSin = 1;

}

}

}

};

Compartilhar este post


Link para o post
Compartilhar em outros sites

adicione esse linha logo no 1º frame da time-line principal do swf que é carregado

 

 

this._lockroot = true

 

 

o problema é que ele muda a referencia do "_root" quando é carregado, com isso ele mantem a referencia mesmo se for carregado

 

 

[]´s

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.