Problem with Hover Caption

[SIZE=1]Well… i hope your help…[/SIZE]

[SIZE=1] I have a kirupa’s gallery where …

[SIZE=2]

galleryDir="images";
phpArray   = new Array("j1.JPG","j2.JPG","j3.JPG","j4.JPG","j5.JPG","j6.JPG","j7.JPG","j8.JPG","j9.JPG","j10.JPG","j11.JPG","j12.JPG");
phpArrayTxt= new Array("one","two"......................);
for(i=0;i<phpArray.length; i++)
    phpArrayTxt*="";
    populateGallery(phpArray);

[/SIZE]phparray is the total number of images and phparraytxt is the text that show me its details…

But only show me the pics … the text nop… some solution about this???

Here’s the whole code…

[/SIZE]


_root.useHandCursor=false;
init_xgalleryDecor=galleryDecor._x;
init_xsideMenu=sideMenu._x;
galGap=gallery._x-galleryDecor._x;
galHanGap=galleryHandle._x-galleryDecor._x;
gallery.viewing=false;

_root.createEmptyMovieClip("bigCtrl",13001);

gallery.totalHeight=0;
galleryDir="images";
phpArray   = new Array("j1.JPG","j2.JPG","j3.JPG","j4.JPG","j5.JPG","j6.JPG","j7.JPG","j8.JPG","j9.JPG","j10.JPG","j11.JPG","j12.JPG");
phpArrayTxt= new Array("hola1","Hola2");
for(i=0;i<phpArray.length;i++)
    phpArrayTxt*=;
populateGallery(phpArray);
function populateGallery(phpArray)
{
    gallery.ready = new Array();
    gallery.stack = new Array();
    
    gallery.readyLast = 0;
    
    gallery.picSpace  = 100;
    gallery.picSpace2 =  8;
    gallery.yStart    =  10;
    
    for(i=0; i<phpArray.length; i++)
    {
        gallery.ready*=0;
        if(i!=0)
            gallery.yPos=gallery.picSpace*i;
        else
            gallery.yPos=gallery.yStart;
            
        
        mc   = gallery.createEmptyMovieClip("jpgHolder"+i,1+i);
        ctrl = gallery.createEmptyMovieClip("controller"+i,1000+i);
        
        gallery.stack*=mc;
        
        mc._y=gallery.yPos;
        mc.loadMovie(galleryDir+"/thumb/"+phpArray*);
        ctrl.i=i;
        ctrl.pct = _root.createEmptyMovieClip("pct"+i,i+12000);
        ctrl.pct.lineStyle(1,0x999999,10);
        ctrl.pct.moveTo(-61,0);
        ctrl.pct.beginFill(0xcccccc,80);
        ctrl.pct.lineTo(61,0);
        ctrl.pct.lineTo(61,10)
        ctrl.pct.lineTo(-61,10);
        ctrl.pct.lineTo(-61,0)
        ctrl.pct.endFill();
        
        
                
        
        ctrl.onEnterFrame=function()
        {    
            
            j=gallery["jpgHolder"+this.i];
            
            loadRatio=(j.getBytesLoaded()/j.getBytesTotal())*100;
            
            
            this.pct._x=gallery._x+62.5;
            this.pct._y=j._y;
            this.pct._xscale=loadRatio;
            if(loadRatio==100)
                removeMovieClip(this.pct);
            

            if(j.getBytesLoaded()==j.getBytesTotal() && j._width>0)
            {
                ratio=j._width/125;
                j._xscale=100/ratio;
                j._yscale=100/ratio;
                gallery.ready[this.i]=j._height;
                ha = this.attachMovie("handle","handle",this.getNextHighestDepth());
                ha.myMc=j;
                ha._alpha=50;
                ha._x=-1;
                this.myMc=j;
                ha.onEnterFrame=function()
                {
                    this._y=this.myMc._y+this.myMc._height/2;
                }
                
                ha.up.onPress=function(){     swapUp(this._parent.myMc);}
                ha.down.onPress=function(){ swapDown(this._parent.myMc);}
            
                readyFunction();
                
                this.onEnterFrame=function()
                {
                    //trace(this.myMc);
                    if(this.myMc.mOver==true && this.myMc._alpha > 60)
                        this.myMc._alpha-=3;
                    else if(this.myMc._alpha  <100)
                        this.myMc._alpha+=3;
                    
                }
                j.onRollOver=function(){ this.mOver=true;};
                j.onRollOut=function(){  this.mOver=false; };
                j.onReleaseOutside=j.onRollOut;
                
            }
        }
    }
}
MovieClip.prototype.fetchPic=function(i)
{
        
    _root.createEmptyMovieClip("bigJpgHolder",13000);
    _root.bigJpgHolder.loadMovie(galleryDir+"/"+phpArray*);
    l = _root.attachMovie("loader","loader",15000);
    l._x = 200;
    l._y = 200;
    vx=vy=0;
    l.onEnterFrame=function()
    {
        rx=_xmouse-this._x;
        ry=_ymouse-this._y;

        //Elastic Function
        k=.2;
        damp=.8;
        rx*=k;
        ry*=k;
        vx+=rx;
        vy+=ry;
        vx*=damp;
        vy*=damp;    
        l._x+=vx; 
        l._y+=vy;        
    }
    
    
    _root.bigCtrl.onEnterFrame=function()
    {
        j=_root.bigJpgHolder;
        l=_root.loader;
        

        loadRatio=(j.getBytesLoaded()/j.getBytesTotal())*100;
        l.loaderPct._xscale=loadRatio;
        
        //Go back on Click <>
        var mouseListener:Object = new Object();
        mouseListener.onMouseDown = function() 
        {
            easeTo(l,-200,10);
            gallery.viewing=true;
            easeSide(_root.galleryDecor,init_xgalleryDecor,5,0,false,true);
            easeSide(_root.sideMenu,init_xsideMenu,5,0,false,false);
            easeTo(_root.bigJpgHolder,Stage.height+50,5);
            easeTo(_root.maskJpg,Stage.height+56,5);
            for(j=0;j<gallery.ready.length;j++)
                _root["txtFrame"+j]._visible=1;
            
            Mouse.removeListener(mouseListener);
        }
        Mouse.addListener(mouseListener);
        //Go back on Click </>
         

        if(j.getBytesLoaded()==j.getBytesTotal() && j._width>0)
        {
            m=_root.attachMovie("maskJpg","maskJpg",20001);
            
            //Loader Hide
            easeTo(l,-100,10);
            
            mh=Stage.height-50;
            mw=Stage.width-50;
            
            if(j._height > j._width)
                ratio=j._height/mh;
            else
                ratio=j._width/mw;
            j._xscale=100/ratio;
            j._yscale=100/ratio;
            j._y=(Stage.height/2)-(j._height/2);
            j._x=(Stage.width/2)-(j._width/2);

            m._x=j._x-6;
            m._y=j._y-6;
            m._width=j._width+12;
            m._height=j._height+12;
            
            delete this.onEnterFrame;
        }
    }
}
function readyFunction()
{
    
    //pics/total pics
    totalLoaded=0;
    for(i=0; i < gallery.ready.length;i++)
        if(gallery.ready*>0)
            totalLoaded++;    
    if(gallery.ready.length == totalLoaded)
        _root.sideMenu.numPicsLoad.text="";
    else
        _root.sideMenu.numPicsLoad.text="Cargando... "+totalLoaded+"de"+gallery.ready.length;
    //pics/total pics </>
        
    
    for(i=gallery.readyLast;gallery.ready*>0 && i < gallery.ready.length;i++)
    {    
        mc = gallery["jpgHolder"+i];
        mc.i=i;
        
        
        mc.onPress=function()
        {
            easeSide(_root.galleryDecor,-200,5,this.i,true,true);
            easeSide(_root.sideMenu,Stage.width,5,this.i,true,false);
            
            for(j=0;j<gallery.ready.length;j++)
                _root["txtFrame"+j]._visible=0;
        }
        
        
        //text Frame
        txtWidth=245;
        txtHeight=mc._height-2;
        drawer = _root.createEmptyMovieClip("txtFrame"+i,this.getNextHighestDepth());
        drawer.lineStyle(1,0x999999,40);
        drawer.lineTo(0,0);
        drawer.lineTo(txtWidth,0);
        drawer.lineTo(txtWidth,txtHeight);
        drawer.lineTo(0,txtHeight);
        drawer.lineTo(0,0);
        drawer.createEmptyTextField
        
        leStyle = new TextFormat();
        leStyle.font = "Agency FB";
        leStyle.bold = false;
        leStyle.size = "12";
        leStyle.color = "black";

        
        drawer.createTextField("my_txt", 10, 0, 0, 100, 21);
        drawer.my_txt.type="input";
        drawer.my_txt.multiline = true;
        drawer.my_txt.font = "my font";
        drawer.my_txt.text = phpArrayTxt*;
        drawer.my_txt.wordWrap = true;
        drawer.my_txt._width = txtWidth-10;
        drawer.my_txt._height = txtHeight-10;
        drawer.my_txt._x = drawer._x+5;
        drawer.my_txt._y = drawer._y+5;
        drawer.my_txt.embedFonts=true;
        drawer.my_txt.antiAliasType = "advanced";

        drawer.my_txt.setTextFormat(leStyle);

        drawer._alpha=0;
        drawer.focused=0;
        
        
        drawer.myMc=mc;
        drawer.onEnterFrame=function()
        {
            this._x=this.myMc._x+this.myMc._width+gallery._x+5;
            this._y=this.myMc._y-1+gallery._y+2;
            if(this.focused && this._alpha<100)
                this._alpha+=5;
            if(this.focused==false && this._alpha>0)
                this._alpha-=5;

        }
        drawer.onRollOver=function(){this.focused=true;}
        drawer.onRollOut=function(){this.focused=false;}
        //text Frame </End>
        
        
        
        
        if(i!=0)
        {
            old = gallery["jpgHolder"+(i-1)];
            mc.myTarget = old.myTarget+old._height+gallery.picSpace2;

            easeTo(mc,mc.myTarget,5);

        }
        else
            gallery.jpgHolder0.myTarget=gallery.yStart;
            
        gallery.readyLast=i;
        
        t=mc.myTarget+mc._height;
        if(t > gallery.totalHeight)
            gallery.totalHeight=t;
    }
}

function easeTo(mc,target,speed)
{
    mc.onEnterFrame=function()
    {
        this._y+=(target-this._y)/speed;
        if(this._y == target)
            delete this.onEnterFrame;
    }
}

function easeSide(mc,target,speed,i,picLoad,viewTrigger)
{
    _root.gallery.viewing=true;
    mc.onEnterFrame=function()
    {
        this._x+=(target-this._x)/speed;
        if( (g=target-this._x) > -1 && g<1)
        {
            if(viewTrigger)
            {
                _root.gallery.viewing=false;
            }
            if(picLoad)
                fetchPic(i);
            delete this.onEnterFrame;
        }
    }
}

function swapPos(mc1,mc2)
{
    if(mc1._y<mc2._y)
        {j1=mc1; j2=mc2;}
    else
        {j2=mc1;  j1=mc2;}
        
    j2.myTarget=j1.myTarget;
    j1.myTarget+=j2._height+gallery.picSpace2;
    
    easeTo(mc1,mc1.myTarget,5);
    easeTo(mc2,mc2.myTarget,5);
}
function swapUp(mc)
{
    search=999;
    for(i=0;i<gallery.stack.length;i++)
    {
        if(gallery.stack*==mc)
            search=i;
    }
    
    if(search == 999 || search == 0)return;
    
    
    swapPos(gallery.stack[search],gallery.stack[search-1]);
    tmp=gallery.stack[search];
    gallery.stack[search]=gallery.stack[search-1];
    gallery.stack[search-1]=tmp;
    
}
function swapDown(mc)
{
    
    search=999;
    for(i=0;i<gallery.stack.length;i++)
    {

        if(gallery.stack*==mc)
            search=i;
    }
    
    if(search == 999 || search == gallery.stack.length-1)return;
    
    
    swapPos(gallery.stack[search],gallery.stack[search+1]);
    tmp=gallery.stack[search];
    gallery.stack[search]=gallery.stack[search+1];
    gallery.stack[search+1]=tmp;
    
}
    
    

onEnterFrame=function()
{    
    min=0
    max=gallery.totalHeight*(-1);
    max+=Stage.height;
    
    targetH=galleryHandle._y-50;
    targetH/=Stage.height-100;
    if(gallery.viewing!=true)
    {
        easeTo(gallery,targetH*max,10);
    }
    else
    {
        gallery._x=galGap+galleryDecor._x;
        galleryHandle._x=galHanGap+galleryDecor._x;
    }
    
    
    /*if(_ymouse<200 && gallery._y<min)
    {
        gallery._y+=5;
    }
    else if(_ymouse>=200 && gallery._y>max)
    {
        gallery._y-=5;
    }*/
}

galleryHandle.onPress=function()
{
    gap=this._y-_ymouse;
    this.onEnterFrame=function()
    {
        if(_ymouse+gap>50 && _ymouse+gap<Stage.height-30)
            this._y=_ymouse+gap;
    }
}
galleryHandle.onRelease=function()
{    
    delete this.onEnterFrame;
}
galleryHandle.onReleaseOutside=galleryHandle.onRelease;