# Video Gallery

**URL:** https://forum.kirupa.com/t/video-gallery/268305
**Category:** Uncategorized
**Created:** [August 12, 2008, 1:52pm UTC](https://forum.kirupa.com/t/video-gallery/268305 "2008-08-12T13:52:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![xyz123](https://avatars.discourse-cdn.com/v4/letter/x/ad7895/32.png) [@xyz123](https://forum.kirupa.com/u/xyz123)
#### Post date: [August 12, 2008, 1:52pm UTC](https://forum.kirupa.com/t/video-gallery/268305/1 "2008-08-12T13:52:10Z")

</div>

Hello to everyone can anyone help me about this problem actually the code below  
is working when you clicked on the thumbnails it shows the larger image and i want  
to modify it. Instead of loading the full images i want to load the corresponding  
videos not the full image. And i want to load it externally like thumbnails using XML,

Note: Im using Macromedia Flash Pro 8,  
I dont have any knowledge with this software  
I need this because this is my school project so please help me!!  
The code below are also taken from some flash tutorial site because im just starting  
to learn it  
sorry for my english :0

[COLOR=Red]thank you in advance for any helful comments and suggestions and usefull informations![/COLOR]

anyway can you label it or explain it step by step when you modified it  
you can reply here or you can email me [hotrixy@yahoo.com](mailto:hotrixy@yahoo.com)…

```php

var myMenu_cm:ContextMenu = new ContextMenu();
myMenu_cm.hideBuiltInItems();

var myGalleryXML = new XML();
myGalleryXML.ignoreWhite = true;
myGalleryXML.load("gallery2.xml");

myGalleryXML.onLoad = function() { 
_root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
_root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
_root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
_root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;

_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = myImages.length;

_root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
_root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;

_root.full_x = myGalleryXML.firstChild.attributes.full_x;
_root.full_y = myGalleryXML.firstChild.attributes.full_y;

callThumbs();
createMask();
scrolling();
};

function callThumbs() {
import mx.transitions.Tween;
import mx.transitions.easing.*;
_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
container_mc._x = _root.gallery_x;
container_mc._y = _root.gallery_y;

var clipLoader = new MovieClipLoader();
var preloader = new Object();

clipLoader.addListener(preloader);
for (i=0; i<_root.myImagesTotal; i++) {
thumbURL = myImages*.attributes.thumb_url; 
myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth() );
myThumb_mc._x = _root.thumb_width*i;
clipLoader.loadClip("thumbss/"+thumbURL,myThumb_mc);

new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);

target.onRollOver=function(){
this._alpha=50;
};

target.onRollOut=function(){
this._alpha=100;
};

preloader.onLoadComplete=function(target){
target.onRelease=function(){
callFullImage(this._name);
}
}

}
}

//I THINK THIS PART IS THE PROBLEM BUT IM NOT SURE//

function callFullImage(myNumber) {

 myURL = myImages[myNumber].attributes.full_url;

_root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());

fullImage_mc._x = _root.full_x;
fullImage_mc._y = _root.full_y;

var fullClipLoader = new MovieClipLoader();
fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);

}

function createMask() {
_root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
mask_mc._x = _root.gallery_x;
mask_mc._y = _root.gallery_y;
mask_mc.beginFill(0x000000,100);
mask_mc.lineTo(_root.gallery_width,0);
mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
mask_mc.lineTo(0,_root.gallery_height);
mask_mc.lineTo(0,0);
container_mc.setMask(mask_mc);

}

function scrolling() { 
_root.onEnterFrame = function() {

container_mc._x += Math.cos(((mask_mc._xmouse)/mask_mc._width)*Math.PI)*15;

if (container_mc._x>mask_mc._x) {
container_mc._x = mask_mc._x;
}

if (container_mc._x<(mask_mc._x-(container_mc._width-mask_mc._width))) {
container_mc._x = mask_mc._x-(container_mc._width-mask_mc._width);
}

};
}

```
