# Help required for my Photo Website

**URL:** <https://forum.kirupa.com/t/help-required-for-my-photo-website/323066>\
**Category:** Uncategorized\
**Created:** [June 15, 2011, 4:13pm UTC](https://forum.kirupa.com/t/help-required-for-my-photo-website/323066 "2011-06-15T16:13:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jatintalwar](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jatintalwar](https://forum.kirupa.com/u/jatintalwar)\
**Post date:** [June 15, 2011, 4:13pm UTC](https://forum.kirupa.com/t/help-required-for-my-photo-website/323066/1 "2011-06-15T16:13:33Z")

</div>

Loading of variables in frame 1st of the main movie timeline.

url = “xxxxx”;  
loadVariablesNum((url + “\_main.php”), 0);

Main timeline has a movieclip with instance name “big\_preview” that contains following movieclip “load\_big\_pic” along with an actions layer that has code for alignments of images on the stage  
This clip (load\_big\_pic) in turn holds

1. preview\_frame( movieclip)
2. big\_frame (movieclip)
3. prew\_but (button) and
4. Close Button for closing the image .  
So its the “big\_frame” movieclip that loads the large preview of the image  
The prew\_button has action to play a mask clicking on which closes the big image preview anywhere over the stage area .

“big\_frame” holds the “big\_frame\_loder” and “big\_frame\_cont” movieclip .  
The “big\_frame\_cont” holds “big\_frame\_cont\_pre”.

Following is the action for “big\_frame” movieclip :

```auto
onClipEvent(load){
	if(_parent._parent.biggest_pic_to_load){
		loadMovie(_parent._parent.biggest_pic_to_load, this.big_frame_cont.big_frame_cont_pre);
	}
}

```

That was about the loading of the Large size Big Image on the stage once the respective thumbnail is clicked .

The start of galleries loads action by a frame with following code :

```auto
if(!_root.comment_position){
		loadVariablesNum(((_root.url + "_gallery.") + _root.file_option), 0);
		_parent.gallery.stop();
		intervalID = setInterval(check_loaded, 100);
		

```

The variables are loaded from the \_gallery.php file as above . The gallery.php file has images in follwing manner :

&cat\_0=LANDSCAPES& ( this is the category)

&cat\_0\_pic\_0=Picture name.jpg& ( the name can be anyting but , a .jpg extension image )  
&cat\_0\_pic\_1=Picture name.jpg&

Other category will be &cat\_1= Something& and SO on and so forth …

As far as my homework goes , I have searched to the other action codes in the movie , specially on the galleries page .It gives me the hint of variables that have been parsed by flash from the php files . THey are :

On the frame 1 of the gallery page :

```auto
if(!img_start){
	img_start = 0;
}
var pic_names = new Array();
var category;
if(!_root.gallery_category){
	category = 0;
} else if(_root.gallery_category){
	category = _root.gallery_category;
}

```

and on Frame 2 of gallery page :

```auto
var coll_position = 0;
var row_position = 0;
i = img_start;
while(i < (img_start + colls * rows)){
	if(_root[((("cat_" + category) + "_pic_") + i)]){
		this[("image" + i)].removeMovieClip();
		duplicateMovieClip(preview.clip, [("image" + i)], i); 
		

```

The Category button has follwing action:

```auto
if(_root.template_help_preview != "true"){
			preview[("image" + i)].small_pic_to_load = (_root[("cat_" + category)] + "/small/") + _root[((("cat_" + category) + "_pic_") + i)]; //( this is for the thumbnail of the pictures to be loaded )
			preview[("image" + i)].big_pic_to_load = (_root[("cat_" + category)] + "/big/") + _root[((("cat_" + category) + "_pic_") + i)]; //( This is for the big sized image ...without zoom )
		}

```

Above actions I have pasted to give u an idea what the present values inside my movies are .

Now what i want is :  
The Big Preview movie loads the zoomed version of the image on the stage once we click the zoom button in the gallery.  
I want to create 2 buttons , one on the left and other on Right of the ZOOMED image i.e in on the " big\_preview" movie that changes the zoomed preview to NEXT image without having to click the small thumbnails again . And the Click of previous  
button takes the image One back .  
ALso , Can a slide show of big images be created ???  
This is already a feature in Newer Template designs , that uses XML for lading gallery , but Mine is a older “php” version .  
What I can make out is I have to define few variables like :  
Current image , Current category , total images in a folder , next imat that will be previous image +1 and vice versa …

Has to be something LIKE this maybe ,

```auto
on (release)
{
     if (template_help_preview != "true")
    {
        myArray = _root.big_preview.biggest_pic_to_load.split("/");
        pathArray = _root.big_preview.biggest_pic_to_load.split(myArray[2]);
        currentImageNumber = _root.getNumberByname(myArray[2], _root.gallery_category);
        currentImagePath = pathArray[0];
        imageCount = _root.getCountCategoryImages(_root.gallery_category) - 1;
    }
    else
    {
        categoryName = _root.getCurrentGalleryName(_root.gallery_category);
        preImagePath = _root.big_preview.biggest_pic_to_load.split(categoryName);
        myArray = preImagePath[1].split("_");
        currentImageNumber = _root.getNumberByname(myArray[2], _root.gallery_category);
        tempCatName = categoryName.split(" ");
        newCategoryName = tempCatName.join("_");
        currentImagePath = _root.url + "_" + newCategoryName + "_big_";
    } // end else if
    imagesCount = _root.getCountCategoryImages(_root.gallery_category) - 1;
    if (currentImageNumber != imagesCount)
    {
        newImageToLoad = currentImageNumber + 1;
        categoryPrev = _root.getGalleryImage(newImageToLoad, _root.gallery_category);
        _root.big_preview.biggest_pic_to_load = currentImagePath + categoryPrev.name;
        _root.big_preview.stopMovie = "false";
        _root.big_preview.play();
    } // end if
}

```

OF COURSE THE ABOVE CODE IS FOR THE XML VERSION OF THE SIMILAR TEMPLATE . My template doesnt have functions marked in red as above .  
Iam badly stuck on this problem …  
Any help will be Highly appreciated …  
Moderators , Please pardon the lengthy post , but I had to elaborate …
