mulão 0 Denunciar post Postado Setembro 16, 2009 Galera to com probleminha aki meu scroll ele fika na vertical e to tentando colocar na horizontal mais num to conseguindo, com galiria com xml, vo posta os codigos aki, por favor se alguem poder me ajudar... var meuXML = new XML(); meuXML.ignoreWhite = true; meuXML.onload = function () { altura = thumb._height * meuXML.childNodes[0].childNodes.length + meuXML.childNodes[0].childNodes.length * 2; for (i = 0; i < meuXML.childNodes[0].childNodes.length; i++) { duplicateMovieClip("thumb", "thumb" + i, i + 1); thumbs = _parent.tudo_mc["thumb" + i]; thumbs._y = thumbs._y + (thumb._height + 2) * i; var MCL1 = new MovieClipLoader(); MCL1.loadClip(meuXML.childNodes[0].childNodes[i].attributes.thumb, thumbs.mostra); thumbs.onEnterFrame = function () { progresso1 = MCL1.getProgress(this.mostra); this.pct_thumb.text = Math.ceil(progresso1.bytesLoaded / progresso1.bytesTotal * 100) + "%"; progresso1.bytesLoaded == progresso1.bytesTotal ? (this.pct_thumb._visible = false) : (this.pct_thumb._visible = true); }; thumbs.atual = i; thumbs.campo.text = i + 1; thumbs.btn.onRelease = function () { _root.gotoAndStop("fotos_stop"); var MCL2 = new MovieClipLoader(); MCL2.loadClip(meuXML.childNodes[0].childNodes[this._parent.atual].attributes.grande, _parent.mc); this.onEnterFrame = function () { progresso2 = MCL2.getProgress(_root.mc); _parent.pct.text = Math.round(progresso2.bytesLoaded / progresso2.bytesTotal * 100) + "%"; progresso2.bytesLoaded == progresso2.bytesTotal ? (_parent.pct._visible = false) : (_parent.pct._visible = true); }; _parent.descricao.text = meuXML.childNodes[0].childNodes[this._parent.atual].attributes.desc; }; thumbs.btn.onRollOver = function () { _parent.tudo_mc["thumb" + this._parent.atual].mostra.contrastTo(50, 1); }; thumbs.btn.onRollOut = function () { _parent.tudo_mc["thumb" + this._parent.atual].mostra.contrastTo(100, 1); }; } // end of for _parent.rolagem.drag.onPress = function () { var _loc4 = this._x; var _loc5 = this._x; var _loc3 = 0; var ymax = this._parent.fundo._height - this._height; this.startDrag(false, _loc4, _loc3, _loc5, ymax); this.onRelease = this.onReleaseOutside = function () { stopDrag (); delete this.onmousemove(); }; this.onEnterFrame = function () { _parent.tudo_mc._y = _parent.tudo_mc._y + (-Math.round(this._y / ymax * (altura - _parent.rolagem._height)) - _parent.tudo_mc._y + 35) / 3; }; }; }; meuXML.load("xmlfotos_alphaville.xml"); Compartilhar este post Link para o post Compartilhar em outros sites
Thiago de Oliveira Cruz 21 Denunciar post Postado Setembro 16, 2009 Para começar se você vai usar this._x então tem que usar o width e não o height para o calculo... Ai é só alterar o calculo ;) Abraços Compartilhar este post Link para o post Compartilhar em outros sites
mulão 0 Denunciar post Postado Setembro 17, 2009 humm.. mais to tentando num to conseguindo aki pode me dar uma ideia oq eu tenhuqui mudar realmente? Compartilhar este post Link para o post Compartilhar em outros sites
Thiago de Oliveira Cruz 21 Denunciar post Postado Setembro 17, 2009 Segue o tutorial http://imasters.com.br/artigo/3474/actionscript/scroll_vertical_e_horizontal/ Abraços Compartilhar este post Link para o post Compartilhar em outros sites