..:: MX Studio Fóruns ::..: problemas com loading de imagem externa - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

problemas com loading de imagem externa

#1 User is offline   Energy 

  • Group: Membros
  • Posts: 57
  • Joined: 14-July 07

Posted 30 April 2008 - 06:43 PM

seguinte, carrego de um XML as imagens (localizacao delas) e faço um load externo destas imagens, porem nao consgio fazer o seguinte, no onload complet eu queria por o _visible = false, porem ele vai ter varios novos de instancias diferfnete (vide tira_nov1, tira_nov2, tira_novN)
alguem tem uma solucao para que eu consiga fazer o loading sumir?
o tenso é que não da para passar outra variavel para a funcao do onloadcomplete, se ano ja passava o ID do MC e dava só um mcID.loading._visible = false;


CÓDIGO
System.useCodepage = true;

var objMCL:MovieClipLoader = new MovieClipLoader();
var objL:Object = new Object();

objL.onLoadComplete = function(target_mc:MovieClip):Void{
    //nomedomc(1,2,3,n).loading._visible = false;
}
objMCL.addListener(objL);

var numOfItems:Number;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
    {
        var t = novidades.attachMovie("tira_nov","tira_nov"+i,i+1);
        t.img_large = nodes[i].attributes.img_large;

        objMCL.loadClip(nodes[i].attributes.img_thumb, t.img_thumb);

//        t.img_thumb.loadMovie(nodes[i].attributes.img_thumb);
        t.img_thumb._alpha = 50;
        t.titulo.text = nodes[i].attributes.titulo;
        t.descricao.text = nodes[i].attributes.descricao;
        t.onRelease = released;
        t.onRollOver = over;
        t.onRollOut = out;
        t._y += 100*i;
        
    }
}

function over()
{
    this.barrinha_bt._visible = true;
    this.img_thumb.alphaTo(100,0.8,"easeoutexpo");    
}

function out()
{
    this.barrinha_bt._visible = false;
    this.img_thumb.alphaTo(50,0.8,"easeoutexpo");    
}

function released()
{
    _parent.lytebox.imagem.loadMovie(this.img_large);
    _parent.lytebox.ficha._visible = false;
    _parent.lytebox.gotoAndPlay("vai");
}

xml.load("home.php");

0

#2 User is offline   Natan 

  • Group: Moderador Global
  • Posts: 7350
  • Joined: 28-February 04

Posted 30 April 2008 - 10:21 PM

Você quer que todos os MovieClips que carrega alguma imagem não sejam exibidos? Se for, veja se funciona:

CÓDIGO
System.useCodepage = true;

var objMCL:MovieClipLoader = new MovieClipLoader();
var objL:Object = new Object();

objL.onLoadComplete = function(target_mc):Void{
    target_mc._visible = false;
}
objMCL.addListener(objL);

var numOfItems:Number;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
    {
        var t = novidades.attachMovie("tira_nov","tira_nov"+i,i+1);
        t.img_large = nodes[i].attributes.img_large;

        objMCL.loadClip(nodes[i].attributes.img_thumb, t.img_thumb);

//        t.img_thumb.loadMovie(nodes[i].attributes.img_thumb);
        t.img_thumb._alpha = 50;
        t.titulo.text = nodes[i].attributes.titulo;
        t.descricao.text = nodes[i].attributes.descricao;
        t.onRelease = released;
        t.onRollOver = over;
        t.onRollOut = out;
        t._y += 100*i;
        
    }
}

function over()
{
    this.barrinha_bt._visible = true;
    this.img_thumb.alphaTo(100,0.8,"easeoutexpo");    
}

function out()
{
    this.barrinha_bt._visible = false;
    this.img_thumb.alphaTo(50,0.8,"easeoutexpo");    
}

function released()
{
    _parent.lytebox.imagem.loadMovie(this.img_large);
    _parent.lytebox.ficha._visible = false;
    _parent.lytebox.gotoAndPlay("vai");
}

xml.load("home.php");


[]s
0

#3 User is offline   Energy 

  • Group: Membros
  • Posts: 57
  • Joined: 14-July 07

Posted 05 May 2008 - 06:41 PM

QUOTE(Natan @ 30/4/2008 21:04:06) <{POST_SNAPBACK}>
Você quer que todos os MovieClips que carrega alguma imagem não sejam exibidos? Se for, veja se funciona:

CÓDIGO
System.useCodepage = true;

var objMCL:MovieClipLoader = new MovieClipLoader();
var objL:Object = new Object();

objL.onLoadComplete = function(target_mc):Void{
    target_mc._visible = false;
}
objMCL.addListener(objL);

var numOfItems:Number;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
    {
        var t = novidades.attachMovie("tira_nov","tira_nov"+i,i+1);
        t.img_large = nodes[i].attributes.img_large;

        objMCL.loadClip(nodes[i].attributes.img_thumb, t.img_thumb);

//        t.img_thumb.loadMovie(nodes[i].attributes.img_thumb);
        t.img_thumb._alpha = 50;
        t.titulo.text = nodes[i].attributes.titulo;
        t.descricao.text = nodes[i].attributes.descricao;
        t.onRelease = released;
        t.onRollOver = over;
        t.onRollOut = out;
        t._y += 100*i;
        
    }
}

function over()
{
    this.barrinha_bt._visible = true;
    this.img_thumb.alphaTo(100,0.8,"easeoutexpo");    
}

function out()
{
    this.barrinha_bt._visible = false;
    this.img_thumb.alphaTo(50,0.8,"easeoutexpo");    
}

function released()
{
    _parent.lytebox.imagem.loadMovie(this.img_large);
    _parent.lytebox.ficha._visible = false;
    _parent.lytebox.gotoAndPlay("vai");
}

xml.load("home.php");


[]s



não é bem isso..

o target_mc é o "img_thumb"
no caso eu quero que suma (dando visible) apenas no loading =/
tem tipo:

tira_nov1.img_thumb
e
tira_nov1.loading
eu quero q permaneca o img_thumb e q suma apenas o mc LOADING, eu tentei por (para ficar mais facil) o loading dentro do img_thumb, mas ai no caso quando ele começa a carregar o img_thumb ja some o loading =/
0

#4 User is offline   Natan 

  • Group: Moderador Global
  • Posts: 7350
  • Joined: 28-February 04

Posted 05 May 2008 - 11:42 PM

Veja se com isso vai:

CÓDIGO
System.useCodepage = true;

var objMCL:MovieClipLoader = new MovieClipLoader();
var objL:Object = new Object();

objL.onLoadComplete = function(target_mc):Void{
    target_mc._parent.loading._visible = false;
}
objMCL.addListener(objL);

var numOfItems:Number;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
    {
        var t = novidades.attachMovie("tira_nov","tira_nov"+i,i+1);
        t.img_large = nodes[i].attributes.img_large;

        objMCL.loadClip(nodes[i].attributes.img_thumb, t.img_thumb);

//        t.img_thumb.loadMovie(nodes[i].attributes.img_thumb);
        t.img_thumb._alpha = 50;
        t.titulo.text = nodes[i].attributes.titulo;
        t.descricao.text = nodes[i].attributes.descricao;
        t.onRelease = released;
        t.onRollOver = over;
        t.onRollOut = out;
        t._y += 100*i;
        
    }
}

function over()
{
    this.barrinha_bt._visible = true;
    this.img_thumb.alphaTo(100,0.8,"easeoutexpo");    
}

function out()
{
    this.barrinha_bt._visible = false;
    this.img_thumb.alphaTo(50,0.8,"easeoutexpo");    
}

function released()
{
    _parent.lytebox.imagem.loadMovie(this.img_large);
    _parent.lytebox.ficha._visible = false;
    _parent.lytebox.gotoAndPlay("vai");
}

xml.load("home.php");


[]s
0

#5 User is offline   Energy 

  • Group: Membros
  • Posts: 57
  • Joined: 14-July 07

Posted 06 May 2008 - 02:33 PM

QUOTE(Natan @ 5/5/2008 22:05:13) <{POST_SNAPBACK}>
Veja se com isso vai:

CÓDIGO
System.useCodepage = true;

var objMCL:MovieClipLoader = new MovieClipLoader();
var objL:Object = new Object();

objL.onLoadComplete = function(target_mc):Void{
    target_mc._parent.loading._visible = false;
}
objMCL.addListener(objL);

var numOfItems:Number;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
    {
        var t = novidades.attachMovie("tira_nov","tira_nov"+i,i+1);
        t.img_large = nodes[i].attributes.img_large;

        objMCL.loadClip(nodes[i].attributes.img_thumb, t.img_thumb);

//        t.img_thumb.loadMovie(nodes[i].attributes.img_thumb);
        t.img_thumb._alpha = 50;
        t.titulo.text = nodes[i].attributes.titulo;
        t.descricao.text = nodes[i].attributes.descricao;
        t.onRelease = released;
        t.onRollOver = over;
        t.onRollOut = out;
        t._y += 100*i;
        
    }
}

function over()
{
    this.barrinha_bt._visible = true;
    this.img_thumb.alphaTo(100,0.8,"easeoutexpo");    
}

function out()
{
    this.barrinha_bt._visible = false;
    this.img_thumb.alphaTo(50,0.8,"easeoutexpo");    
}

function released()
{
    _parent.lytebox.imagem.loadMovie(this.img_large);
    _parent.lytebox.ficha._visible = false;
    _parent.lytebox.gotoAndPlay("vai");
}

xml.load("home.php");


[]s


deu certo era o target_mc._parent.loading._visible = false;
noobei legal

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)