dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [Flashmx2004] xml photo album v3.1

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    25

    [Flashmx2004] xml photo album v3.1

    I found this free photo album but i need to change a few things

    here is how it looks
    http://members.lycos.nl/thejojo15/Al...ldsofrock.html

    It works with 1 flash file and 2 Xml files

    First xml file:
    here it defines al sorts of marges and positions of the photo's

    Code:
    //////////////////////////////////
    /*
    Code generated by Selcuk ARTUT
    xml photo album v3.1
    Free of use
    
    Instructions:
    Update your XML file, 
    and upload your corresponding images in the photos folder
    
    please send comments : selcukhip@hotmail.com
    
    */
    
    
    
    //////////////////////////////////////////////////////////////
    // SETTING VARIABLES
    currentpage = 1;
    _global.whichalbum = 1;
    bigframew = 600;
    bigframeh = 450;
    
    //////////////////////////////////
    function scalerf(w,h)
    {
    	diffw = (w-bigframew);
    	diffh = (h-bigframeh);
    	
    	if(diffw<=0&&diffh<=0)
    	{
    		scaler = 1 * 100;
    	}
    	else if (diffw==Math.max(diffw,diffh)) //scale to height
    	{
    		scaler = (bigframew/w) * 100;	
    	}
    	else if (diffh==Math.max(diffw,diffh)) //scale to width
    	{
    		scaler = (bigframeh/h) * 100;
    	}
    	return scaler;
    }
    
    //LOADCLIP ACTIVITIES
    _root.createEmptyMovieClip("looploop",-1000);
    var my_mcl = new MovieClipLoader();
    myListener = new Object();
    myListener.onLoadStart = function (target_mc) 
    {
    var loadProgress = my_mcl.getProgress(target_mc);
    }
    myListener.onLoadProgress = function (target_mc, loadedBytes, totalBytes) 
    {
    ////////////////////////////////////////////////////////
    // FOR PRELOADER PURPOSES
    loaded = loadedBytes;
    total = totalBytes;
    percentage = Math.round(100*(loaded/total));
    progressbar_mc.progresser_mc._xscale = percentage;
    ////////////////////////////////////////////////////////
    }
    myListener.onLoadComplete = function (target_mc) 
    {
    var loadProgress = my_mcl.getProgress(target_mc);
    imageframe_mc.hold._alpha=0;
    velo = 0;	
    imageframe_mc.hold.onEnterFrame = function()
    	{
    		w = imageframe_mc.hold._width;
    		h = imageframe_mc.hold._height;
    		if(w!=0&&h!=0)
    		{
    			scaler = scalerf(w,h);
    			if(scaler!=100)
    			{
    			imageframe_mc.hold._xscale = scaler;
    			imageframe_mc.hold._yscale = scaler;
    			}
    			imageframe_mc.hold._x = (bigframew - (w*(scaler/100)))/2;
    			imageframe_mc.hold._y = (bigframeh - (h*(scaler/100)))/2;
    						
    		
    		if(imageframe_mc.hold._alpha<100)
    			{
    			accel = 1.5;
    			velo = velo + accel;
    			imageframe_mc.hold._alpha +=velo;
    			
    			}
    				
    		}
    	}
    }
    
    
    myListener.onLoadInit = function (target_mc) 
    {
    //target_mc._width = 100;
    //target_mc._width = 100;
    } 
    myListener.onLoadError = function (target_mc, errorCode) 
    {
     } 
    my_mcl.addListener(myListener);
    
    
    ///////////////////////////////////////////////////////////////
    // XML PARSING
    function imageListLoaded(whichalbum) {
    	//clear stage
    	for (var rr = 0; rr < noofrow * noofcolumn; rr++)
    	{
    			rr = rr + pageindex;
    			this["thumbframe"+rr].removeMovieClip();
    			this["thumbframein_mc"+rr].removeMovieClip();
    			rr = rr - pageindex;
    	}
    
    	//parameters
    	param = this.imageList_xml.firstChild.firstChild;
    	pc = int(param.attributes.noofcolumn);
    	pr = int(param.attributes.noofrow);
    	ptx = int(param.attributes.thumbxs);
    	pty = int(param.attributes.thumbys);	
    	_global.ptw = int(param.attributes.thumbwidth);
    	_global.ptl = int(param.attributes.thumbheight);
    	//////////////////////////////////////////////////////////////	
    	var albumCountXML = this.imageList_xml.firstChild.childNodes;
    	albumCount = albumCountXML.length - 1;
    
    	var mainNode = this.imageList_xml.firstChild.childNodes[whichalbum].firstChild;
    	var listBoxData = createResourceList (mainNode.childNodes,pc,pr,ptx,pty,ptw,ptl);
    	
    	albumtextbox.text = "album"+whichalbum+">>>";
    	albumtextbox.background = true;
    	albumtextbox.backgroundColor = 000000;
    	for (t=1;t<=albumCount;t++)
    	{
    		this.attachMovie("albumnames_mc","albumnames_mc"+t,1000+t);
    		this["albumnames_mc"+t].albumnametxt.text = this.imageList_xml.firstChild.childNodes[t].attributes.albumname;
    		this["albumnames_mc"+t]._x = 900;
    		this["albumnames_mc"+t]._y = t * 450;
    		this["albumnames_mc"+t].sett = t;
    		this["albumnames_mc"+t].onRelease = function()
    		{
    		currentpage = 1;		
    		filename.text = "";
    		for (var rr = 0; rr < noofrow * noofcolumn; rr++)
    		{
    			rr = rr + pageindex;
    			this["thumbframe"+rr].removeMovieClip();
    			this["thumbframein_mc"+rr].removeMovieClip();
    			rr = rr - pageindex;
    		}
    		imageListLoaded(this.sett)
    		_global.whichalbum = this.sett;
    		}
    	}
    	
    
    }
    
    
    function createResourceList(resource_array,noofcolumn,noofrow,thumbxs,thumbys,thumbwidth,thumblength,bigimagewidth) {
    	_global.noofcolumn = noofcolumn;
    	_global.noofrow = noofrow;
    	var listData = new DataProviderClass ();
    	resourceCount = resource_array.length;
    	noofpage = Math.ceil(resourceCount/(noofcolumn*noofrow));
    	ofof.text = "page: "+currentpage+"/"+noofpage;
    	var resource, image, tmb;
    	images = new Array();
    	infotexts = new Array();
    	
    	pageindex =((currentpage-1) * noofrow *  noofcolumn);
    	
    	for (var r = 0; r < noofrow; r++)
    	{
    		
    		for (var c = 0; c < noofcolumn; c++) {
    			i = (r * noofcolumn) + c + pageindex;
    			
    			if(i<resourceCount)
    				{
    					nodigits = new String(resourceCount);
    					resource = resource_array[i];
    					images[i] = resource.attributes.imagename;
    					infotexts[i] = resource.attributes.infotext;
    					loadme = "thumbs/"+images[i];
    					findme = images[i];
    					whichframe = "frame"+i;
    					this.attachMovie("thumbframe","thumbframe"+i,i+1);
    					this["thumbframe"+i]._x = (c * thumbwidth)+thumbxs;
    					this["thumbframe"+i]._y = (r * thumblength)+thumbys;
    					createEmptyMovieClip("thumbframein_mc"+i,(i+1)*1000);					
    					onEnterFrame = function()
    					{
    						for (var tr = 0; tr < noofrow; tr++)
    						{
    							
    							for (var tc = 0; tc < noofcolumn; tc++) {
    								ti = (tr * noofcolumn) + tc + pageindex;
    								
    								if(ti<resourceCount)
    									{
    											tw = this["thumbframein_mc"+ti]._width;
    											th = this["thumbframein_mc"+ti]._height;
    											this["thumbframein_mc"+ti]._x = this["thumbframe"+ti]._x+(thumbwidth - tw)/2;
    											this["thumbframein_mc"+ti]._y = this["thumbframe"+ti]._y+(thumblength - th)/2;
    											
    									}
    							}
    						}
    					}
    					this["thumbframein_mc"+i].loadMovie(loadme);
    					noofthumbs = (currentpage-1) * noofcolumn * noofrow;
    					nom = noofthumbs;
    					callbig(nom);
    					this.filename.text = " "+images[nom];
    					this["thumbframe"+i].onPress = function()
    						{
    							startsubstring = 10;
    							endsubstring = startsubstring + nodigits.length;
    							largeindex=this._name.substring(startsubstring,endsubstring);
    							callbig(largeindex);
    						}
    				}
    			}
    	}
    }
    
    function callbig(index)
    {
    	filename.text = " "+images[index];
    	info.text = infotexts[index];
    	imageframe_mc.createEmptyMovieClip("hold",0);
    
    	my_mcl.loadClip("largeimages/"+images[index],this.imageframe_mc.hold);
    	imageframe_mc.onPress = function()
    	{getURL("pics/"+images[index],"_blank");}	
    
    }
    
    
    
    imageList_xml = new XML ();
    imageList_xml.ignoreWhite = true;
    imageList_xml.onLoad = function (success) {
    	if (success) {
    		imageListLoaded(whichalbum);
    		}
    };
    
    //////////////////////////////////////////
    //HERE IS WHERE YOU DECLARE YOUR XML FILE
    imageList_xml.load ("albums.xml");
    //////////////////////////////////////////
    
    rightbt.onRelease=function()
    {
    	if(currentpage != noofpage)
    	{
    		currentpage ++;
    		imageListLoaded(_global.whichalbum);
    	}
    }
    
    leftbt.onRelease=function()
    {
    	if(currentpage > 1)
    	{
    		currentpage --;
    		imageListLoaded(_global.whichalbum);
    	}
    }
    stop();

  2. #2
    Junior Member
    Join Date
    Jul 2002
    Posts
    25
    Then in the second xml file i define the photo's
    PHP Code:
    <?xml version="1.0"?>
    <!-- www.selcukartut.com -->
    <!--
    noofcolumn: number of columns for the thumbnails
    noofrow: number of row for the thumbnails
    thumbxs: x coordinate of thumbnails matrix(topleft)
    thumbys: y coordinate of thumbnails matrix(topleft)
    thumbwidth: a single thumbnail holder's width
    thumbwidth: a single thumbnail holder's height
    -->

    <photoalbum>
        <parameters noofcolumn="3" noofrow="10" thumbxs="640" thumbys="89" thumbwidth="55" thumbheight="45"/>
        <album albumname="Fields Of Rock">
            <images>
                <image imagename="FOR-001.jpg"/>
                <image imagename="FOR-002.jpg"/>
                <image imagename="FOR-003.jpg"/>
                <image imagename="FOR-005.jpg"/>
                <image imagename="FOR-007.jpg"/>
                <image imagename="FOR-008.jpg"/>
                <image imagename="FOR-009.jpg"/>
                <image imagename="FOR-011.jpg"/>
                <image imagename="FOR-012.jpg"/>
                <image imagename="FOR-013.jpg"/>
                <image imagename="FOR-015.jpg"/>
                <image imagename="FOR-016.jpg"/>
                <image imagename="FOR-018.jpg"/>
                <image imagename="FOR-019.jpg"/>
                <image imagename="FOR-020.jpg"/>
                <image imagename="FOR-021.jpg"/>
                <image imagename="FOR-022.jpg"/>
                <image imagename="FOR-023.jpg"/>
                <image imagename="FOR-024.jpg"/>
                <image imagename="FOR-025.jpg"/>
                <image imagename="FOR-026.jpg"/>
                <image imagename="FOR-027.jpg"/>
                <image imagename="FOR-028.jpg"/>
                <image imagename="FOR-029.jpg"/>
                <image imagename="FOR-030.jpg"/>
                <image imagename="FOR-031.jpg"/>
                <image imagename="FOR-032.jpg"/>
                <image imagename="FOR-033.jpg"/>
                <image imagename="FOR-034.jpg"/>
                <image imagename="FOR-035.jpg"/>
                <image imagename="FOR-036.jpg"/>
                <image imagename="FOR-037.jpg"/>
                <image imagename="FOR-038.jpg"/>
                <image imagename="FOR-039.jpg"/>
                <image imagename="FOR-043.jpg"/>
                <image imagename="FOR-044.jpg"/>
                <image imagename="FOR-045.jpg"/>
                <image imagename="FOR-046.jpg"/>
                <image imagename="FOR-047.jpg"/>
                <image imagename="FOR-049.jpg"/>
                <image imagename="FOR-050.jpg"/>
                <image imagename="FOR-051.jpg"/>
                <image imagename="FOR-052.jpg"/>
                <image imagename="FOR-053.jpg"/>
                <image imagename="FOR-054.jpg"/>
                <image imagename="FOR-055.jpg"/>
                <image imagename="FOR-056.jpg"/>
                <image imagename="FOR-057.jpg"/>
                <image imagename="FOR-058.jpg"/>
                <image imagename="FOR-059.jpg"/>
                <image imagename="FOR-060.jpg"/>
                <image imagename="FOR-061.jpg"/>
                <image imagename="FOR-062.jpg"/>
                <image imagename="FOR-063.jpg"/>
                <image imagename="FOR-064.jpg"/>
                <image imagename="FOR-065.jpg"/>
                <image imagename="FOR-066.jpg"/>
                <image imagename="FOR-067.jpg"/>
                <image imagename="FOR-069.jpg"/>
                <image imagename="FOR-071.jpg"/>
                <image imagename="FOR-072.jpg"/>
                <image imagename="FOR-073.jpg"/>
                <image imagename="FOR-074.jpg"/>
                <image imagename="FOR-075.jpg"/>
                <image imagename="FOR-076.jpg"/>
                <image imagename="FOR-077.jpg"/>
                <image imagename="FOR-078.jpg"/>
                <image imagename="FOR-079.jpg"/>
                <image imagename="FOR-080.jpg"/>
                <image imagename="FOR-082.jpg"/>
                <image imagename="FOR-083.jpg"/>
                <image imagename="FOR-084.jpg"/>
                <image imagename="FOR-086.jpg"/>
                <image imagename="FOR-087.jpg"/>
                <image imagename="FOR-088.jpg"/>
                <image imagename="FOR-089.jpg"/>
                <image imagename="FOR-090.jpg"/>
                <image imagename="FOR-091.jpg"/>
                <image imagename="FOR-092.jpg"/>
                <image imagename="FOR-094.jpg"/>
                <image imagename="FOR-095.jpg"/>
                <image imagename="FOR-096.jpg"/>
                <image imagename="FOR-097.jpg"/>
                <image imagename="FOR-098.jpg"/>
                <image imagename="FOR-099.jpg"/>
                <image imagename="FOR-103.jpg"/>
                <image imagename="FOR-104.jpg"/>
                <image imagename="FOR-105.jpg"/>
                <image imagename="FOR-106.jpg"/>
                <image imagename="FOR-107.jpg"/>
                <image imagename="FOR-108.jpg"/>
                <image imagename="FOR-109.jpg"/>
                <image imagename="FOR-110.jpg"/>
                <image imagename="FOR-111.jpg"/>
                <image imagename="FOR-112.jpg"/>
                <image imagename="FOR-113.jpg"/>
                <image imagename="FOR-114.jpg"/>
                <image imagename="FOR-115.jpg"/>
                <image imagename="FOR-116.jpg"/>
                <image imagename="FOR-117.jpg"/>
                <image imagename="FOR-118.jpg"/>
                <image imagename="FOR-119.jpg"/>
                <image imagename="FOR-120.jpg"/>
                <image imagename="FOR-121.jpg"/>
                <image imagename="FOR-122.jpg"/>
                <image imagename="FOR-123.jpg"/>
                <image imagename="FOR-124.jpg"/>
                <image imagename="FOR-125.jpg"/>
                <image imagename="FOR-126.jpg"/>
                <image imagename="FOR-127.jpg"/>
                <image imagename="FOR-128.jpg"/>
                <image imagename="FOR-129.jpg"/>
                <image imagename="FOR-134.jpg"/>
                <image imagename="FOR-135.jpg"/>
                <image imagename="FOR-136.jpg"/>
                <image imagename="FOR-137.jpg"/>
                <image imagename="FOR-138.jpg"/>
                <image imagename="FOR-139.jpg"/>
                <image imagename="FOR-140.jpg"/>
                <image imagename="FOR-141.jpg"/>
                <image imagename="FOR-142.jpg"/>
                <image imagename="FOR-143.jpg"/>
                <image imagename="FOR-144.jpg"/>
                <image imagename="FOR-146.jpg"/>
                <image imagename="FOR-147.jpg"/>
                <image imagename="FOR-148.jpg"/>
                <image imagename="FOR-149.jpg"/>
                <image imagename="FOR-150.jpg"/>
                <image imagename="FOR-151.jpg"/>
                <image imagename="FOR-152.jpg"/>
                <image imagename="FOR-154.jpg"/>
                <image imagename="FOR-155.jpg"/>
                <image imagename="FOR-156.jpg"/>
                <image imagename="FOR-157.jpg"/>
                <image imagename="FOR-158.jpg"/>
                <image imagename="FOR-159.jpg"/>
                <image imagename="FOR-160.jpg"/>
            </images>
        </album>
    </photoalbum>

    Now i want that if the user uses the arrows that the next picture is coming in the big viewer, does anybody have any idea how to do this?

    Also i want to View the Photo's that are vertical made at a vertical way but i Dont want to change de code for every photo so is there a script that looks what size the photo is and then adepts to that.

    Any thoughts?
    Last edited by thejojo15; 07-31-2005 at 08:51 AM.

  3. #3
    Senior Member sirhoff's Avatar
    Join Date
    May 2003
    Location
    OH
    Posts
    245
    Quote Originally Posted by thejojo15
    I found this free photo album but i need to change a few things

    here is how it looks
    http://members.lycos.nl/thejojo15/Al...ldsofrock.html

    It works with 1 flash file and 2 Xml files

    First xml file:
    here it defines al sorts of marges and positions of the photo's

    Code:
    //////////////////////////////////
    /*
    Code generated by Selcuk ARTUT
    xml photo album v3.1
    Free of use
    
    Instructions:
    Update your XML file, 
    and upload your corresponding images in the photos folder
    
    please send comments : selcukhip@hotmail.com
    
    */
    
    
    
    //////////////////////////////////////////////////////////////
    // SETTING VARIABLES
    currentpage = 1;
    _global.whichalbum = 1;
    bigframew = 600;
    bigframeh = 450;
    
    //////////////////////////////////
    function scalerf(w,h)
    {
    	diffw = (w-bigframew);
    	diffh = (h-bigframeh);
    	
    	if(diffw<=0&&diffh<=0)
    	{
    		scaler = 1 * 100;
    	}
    	else if (diffw==Math.max(diffw,diffh)) //scale to height
    	{
    		scaler = (bigframew/w) * 100;	
    	}
    	else if (diffh==Math.max(diffw,diffh)) //scale to width
    	{
    		scaler = (bigframeh/h) * 100;
    	}
    	return scaler;
    }
    
    //LOADCLIP ACTIVITIES
    _root.createEmptyMovieClip("looploop",-1000);
    var my_mcl = new MovieClipLoader();
    myListener = new Object();
    myListener.onLoadStart = function (target_mc) 
    {
    var loadProgress = my_mcl.getProgress(target_mc);
    }
    myListener.onLoadProgress = function (target_mc, loadedBytes, totalBytes) 
    {
    ////////////////////////////////////////////////////////
    // FOR PRELOADER PURPOSES
    loaded = loadedBytes;
    total = totalBytes;
    percentage = Math.round(100*(loaded/total));
    progressbar_mc.progresser_mc._xscale = percentage;
    ////////////////////////////////////////////////////////
    }
    myListener.onLoadComplete = function (target_mc) 
    {
    var loadProgress = my_mcl.getProgress(target_mc);
    imageframe_mc.hold._alpha=0;
    velo = 0;	
    imageframe_mc.hold.onEnterFrame = function()
    	{
    		w = imageframe_mc.hold._width;
    		h = imageframe_mc.hold._height;
    		if(w!=0&&h!=0)
    		{
    			scaler = scalerf(w,h);
    			if(scaler!=100)
    			{
    			imageframe_mc.hold._xscale = scaler;
    			imageframe_mc.hold._yscale = scaler;
    			}
    			imageframe_mc.hold._x = (bigframew - (w*(scaler/100)))/2;
    			imageframe_mc.hold._y = (bigframeh - (h*(scaler/100)))/2;
    						
    		
    		if(imageframe_mc.hold._alpha<100)
    			{
    			accel = 1.5;
    			velo = velo + accel;
    			imageframe_mc.hold._alpha +=velo;
    			
    			}
    				
    		}
    	}
    }
    
    
    myListener.onLoadInit = function (target_mc) 
    {
    //target_mc._width = 100;
    //target_mc._width = 100;
    } 
    myListener.onLoadError = function (target_mc, errorCode) 
    {
     } 
    my_mcl.addListener(myListener);
    
    
    ///////////////////////////////////////////////////////////////
    // XML PARSING
    function imageListLoaded(whichalbum) {
    	//clear stage
    	for (var rr = 0; rr < noofrow * noofcolumn; rr++)
    	{
    			rr = rr + pageindex;
    			this["thumbframe"+rr].removeMovieClip();
    			this["thumbframein_mc"+rr].removeMovieClip();
    			rr = rr - pageindex;
    	}
    
    	//parameters
    	param = this.imageList_xml.firstChild.firstChild;
    	pc = int(param.attributes.noofcolumn);
    	pr = int(param.attributes.noofrow);
    	ptx = int(param.attributes.thumbxs);
    	pty = int(param.attributes.thumbys);	
    	_global.ptw = int(param.attributes.thumbwidth);
    	_global.ptl = int(param.attributes.thumbheight);
    	//////////////////////////////////////////////////////////////	
    	var albumCountXML = this.imageList_xml.firstChild.childNodes;
    	albumCount = albumCountXML.length - 1;
    
    	var mainNode = this.imageList_xml.firstChild.childNodes[whichalbum].firstChild;
    	var listBoxData = createResourceList (mainNode.childNodes,pc,pr,ptx,pty,ptw,ptl);
    	
    	albumtextbox.text = "album"+whichalbum+">>>";
    	albumtextbox.background = true;
    	albumtextbox.backgroundColor = 000000;
    	for (t=1;t<=albumCount;t++)
    	{
    		this.attachMovie("albumnames_mc","albumnames_mc"+t,1000+t);
    		this["albumnames_mc"+t].albumnametxt.text = this.imageList_xml.firstChild.childNodes[t].attributes.albumname;
    		this["albumnames_mc"+t]._x = 900;
    		this["albumnames_mc"+t]._y = t * 450;
    		this["albumnames_mc"+t].sett = t;
    		this["albumnames_mc"+t].onRelease = function()
    		{
    		currentpage = 1;		
    		filename.text = "";
    		for (var rr = 0; rr < noofrow * noofcolumn; rr++)
    		{
    			rr = rr + pageindex;
    			this["thumbframe"+rr].removeMovieClip();
    			this["thumbframein_mc"+rr].removeMovieClip();
    			rr = rr - pageindex;
    		}
    		imageListLoaded(this.sett)
    		_global.whichalbum = this.sett;
    		}
    	}
    	
    
    }
    
    
    function createResourceList(resource_array,noofcolumn,noofrow,thumbxs,thumbys,thumbwidth,thumblength,bigimagewidth) {
    	_global.noofcolumn = noofcolumn;
    	_global.noofrow = noofrow;
    	var listData = new DataProviderClass ();
    	resourceCount = resource_array.length;
    	noofpage = Math.ceil(resourceCount/(noofcolumn*noofrow));
    	ofof.text = "page: "+currentpage+"/"+noofpage;
    	var resource, image, tmb;
    	images = new Array();
    	infotexts = new Array();
    	
    	pageindex =((currentpage-1) * noofrow *  noofcolumn);
    	
    	for (var r = 0; r < noofrow; r++)
    	{
    		
    		for (var c = 0; c < noofcolumn; c++) {
    			i = (r * noofcolumn) + c + pageindex;
    			
    			if(i<resourceCount)
    				{
    					nodigits = new String(resourceCount);
    					resource = resource_array[i];
    					images[i] = resource.attributes.imagename;
    					infotexts[i] = resource.attributes.infotext;
    					loadme = "thumbs/"+images[i];
    					findme = images[i];
    					whichframe = "frame"+i;
    					this.attachMovie("thumbframe","thumbframe"+i,i+1);
    					this["thumbframe"+i]._x = (c * thumbwidth)+thumbxs;
    					this["thumbframe"+i]._y = (r * thumblength)+thumbys;
    					createEmptyMovieClip("thumbframein_mc"+i,(i+1)*1000);					
    					onEnterFrame = function()
    					{
    						for (var tr = 0; tr < noofrow; tr++)
    						{
    							
    							for (var tc = 0; tc < noofcolumn; tc++) {
    								ti = (tr * noofcolumn) + tc + pageindex;
    								
    								if(ti<resourceCount)
    									{
    											tw = this["thumbframein_mc"+ti]._width;
    											th = this["thumbframein_mc"+ti]._height;
    											this["thumbframein_mc"+ti]._x = this["thumbframe"+ti]._x+(thumbwidth - tw)/2;
    											this["thumbframein_mc"+ti]._y = this["thumbframe"+ti]._y+(thumblength - th)/2;
    											
    									}
    							}
    						}
    					}
    					this["thumbframein_mc"+i].loadMovie(loadme);
    					noofthumbs = (currentpage-1) * noofcolumn * noofrow;
    					nom = noofthumbs;
    					callbig(nom);
    					this.filename.text = " "+images[nom];
    					this["thumbframe"+i].onPress = function()
    						{
    							startsubstring = 10;
    							endsubstring = startsubstring + nodigits.length;
    							largeindex=this._name.substring(startsubstring,endsubstring);
    							callbig(largeindex);
    						}
    				}
    			}
    	}
    }
    
    function callbig(index)
    {
    	filename.text = " "+images[index];
    	info.text = infotexts[index];
    	imageframe_mc.createEmptyMovieClip("hold",0);
    
    	my_mcl.loadClip("largeimages/"+images[index],this.imageframe_mc.hold);
    	imageframe_mc.onPress = function()
    	{getURL("pics/"+images[index],"_blank");}	
    
    }
    
    
    
    imageList_xml = new XML ();
    imageList_xml.ignoreWhite = true;
    imageList_xml.onLoad = function (success) {
    	if (success) {
    		imageListLoaded(whichalbum);
    		}
    };
    
    //////////////////////////////////////////
    //HERE IS WHERE YOU DECLARE YOUR XML FILE
    imageList_xml.load ("albums.xml");
    //////////////////////////////////////////
    
    rightbt.onRelease=function()
    {
    	if(currentpage != noofpage)
    	{
    		currentpage ++;
    		imageListLoaded(_global.whichalbum);
    	}
    }
    
    leftbt.onRelease=function()
    {
    	if(currentpage > 1)
    	{
    		currentpage --;
    		imageListLoaded(_global.whichalbum);
    	}
    }
    stop();
    This is a great application. I'm looking to modify it by adding a secondary row of thumbnails when a current thumb is clicked. Anyone familiar enought with this application to help me out with this? I'd be willing to pay as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center