HI there , thanks for taking the time to look at this,
Hello I am a newbee, and I am trying to understand this following code made for a photo gallery. I do get the all process however I have been trying to make the “the fullImage_mc2” movie loop or going back to the first slide …without any luck
Some help or suggestion would be most welcome…
Thank you
code:
myGalleryXML.onLoad = function() {
gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
myImages = myGalleryXML.firstChild.childNodes;
myImagesTotal = myImages.length;
//numimages = myImagesTotal;
//trace("myImagesTotal "+myImagesTotal);
info_image = myImagesTotal;
//trace("myImagesTotal= "+myImagesTotal);
swa_page = myImagesTotal/15;
info_text.text = "Total Image: "+myImagesTotal;
//trace("Total Page= "+swa_page);
//page_text.text = swa_page;
onEnterFrame = function () {
b = swa_page;
test(b);
delete this.onEnterFrame;
};
//
thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
full_x = myGalleryXML.firstChild.attributes.full_x;
full_y = myGalleryXML.firstChild.attributes.full_y;
callThumbs();
createMask();
};
var _loc2 = 5;
var _loc3 = 22;
var _loc4 = 1;
function callThumbs() {
swarup.createEmptyMovieClip(“container_mc”, 0);
//container_mc.attachMovie(“txt”, getNextHighestDepth());
//container_mc._x = gallery_x;
//container_mc._y = gallery_y;
var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);
for (i=0; i<myImagesTotal; i++) {
thumbURL = myImages*.attributes.thumb_url;
//thum_swa =
//swa = container_mc*.attachMovie("txt", "txt", container_mc.getNextHighestDepth());
myThumb_mc = swarup.container_mc.createEmptyMovieClip(i, +i);
//mytxt_mc = attachMovie("txt", "txt"+i, getNextHighestDepth());
myN = eval("container_mc"+i);
//trace("ddddd+ "+mytxt_mc);
//for (var j in _parent.container_mc) {
//}
//trace("myThumb_mc= "+swa)
//myThumb_mc._y = thumb_height*i;
myThumb_mc._x = mytxt_mc._x=_loc3;
myThumb_mc._y = mytxt_mc._y=_loc2;
if (_loc4 == 3) {
_loc3 = _loc3+97;
_loc2 = 5;
_loc4 = 0;
} else {
_loc2 = _loc2+100;
}
++_loc4;
clipLoader.loadClip("photos/collection/thumbs/"+thumbURL, myThumb_mc);
preloader.onLoadStart = function(target) {
//attachMovie("my_love", target.getNextHighestDepth,0,0,100,20);
target.createTextField("my_txt", target.getNextHighestDepth, 0, 0, 100, 20);
target.my_txt.selectable = false;
target.my_txt.color = 0xFFFFFF;
};
preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
target.my_txt.color = 0xFFFFFF;
};
preloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
//target.my_txt.removeTextField();
target.my_txt.color = 0xFFFFFF;
target.my_txt.text = "";
target.onRelease = function() {
this._alpha = 100;
fullImage_mc2.removeMovieClip();
callFullImage(this._name);
//trace("callFullImage= = "+this._name);
fullImage_mc2.my_mun.text = this._name;
tt.removeTip();
};
target.onRollOver = function() {
this._alpha = 50;
//tooltip._visible = true;
//tooltip.testo = "HI";
//tt.showTip(this._name);
calltips(this._name);
//trace("onRollOver");
//attachMovie("tips", "tips", getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
};
target.onRollOut = function() {
this._alpha = 100;
//tooltip._visible = false;
//tips.removeMovieClip();
tt.removeTip();
};
};
}
}
//
function calltips(myNumber) {
myURL2 = myImages[myNumber].attributes.full_url;
myTitle2 = myImages[myNumber].attributes.title;
myStyle_Info2 = myImages[myNumber].attributes.style_info;
myDescribtion2 = myImages[myNumber].attributes.describtion;
//trace("myStyle_Info= "+myStyle_Info2);
tt.showTip(myTitle2);
}
//
function callFullImage(myNumber) {
next_btn.enabled = false;
pre_btn.enabled = false;
myURL = myImages[myNumber].attributes.full_url;
//trace("GUBLU============ "+myURL)
myTitle = myImages[myNumber].attributes.title;
myStyle_Info = myImages[myNumber].attributes.style_info;
myDescribtion = myImages[myNumber].attributes.describtion;
//trace("callFullImage url= "+myURL);
//trace("myStyle_Info= "+myStyle_Info);
//createEmptyMovieClip("fullImage_mc",getNextHighestDepth());
attachMovie("fullImage_mc2", "fullImage_mc2", getNextHighestDepth());
fullImage_mc2.pic_l.createEmptyMovieClip("fullImage_mc", getNextHighestDepth());
//fullImage_mc._x = full_x;
//fullImage_mc._y = full_y;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
fullImage_mc2.lod = "";
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
fullImage_mc2.lod = Math.floor((loadedBytes/totalBytes)*100);
};
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
//target.my_txt.text = myTitle;
fullImage_mc2.my_title.text = myTitle;
fullImage_mc2.my_style.text = myStyle_Info;
fullImage_mc2.my_describtion.text = myDescribtion;
fullImage_mc2.lod = "";
//fullImage_mc2.lod._visible = false
//fullImage_mc2.my_mun.text = this._name;
};
fullClipLoader.loadClip("photos/collection/full_images/"+myURL, fullImage_mc2.pic_l.fullImage_mc);
//trace("photos/collection/full_images/"+myURL)
}
//slideshow
function callSlideShow(myNumber) {
trace(“callSlideShow”);
fullImage_mc2.my_mun.text = “”;
myURL3 = myImages[myNumber].attributes.full_url;
myTitle3 = myImages[myNumber].attributes.title;
myStyle_Info3 = myImages[myNumber].attributes.style_info;
myDescribtion3 = myImages[myNumber].attributes.describtion;
trace("myStyle_Info= "+myStyle_Info);
trace("callSlideShow= "+myURL);
//createEmptyMovieClip(“fullImage_mc”,getNextHighestDepth());
//attachMovie(“fullImage_mc2”,“fullImage_mc2”,getNextHighestDepth());
fullImage_mc2.pic_l.createEmptyMovieClip(“fullImage_mc”, getNextHighestDepth());
//fullImage_mc._x = full_x;
//fullImage_mc._y = full_y;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
fullImage_mc2.lod = "";
//target.createTextField("my_txt",fullImage_mc2.pic_l.fullImage_mc.getNextHighestDepth,0,0,200,20);
//target.my_txt.selectable = false;
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
//target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
fullImage_mc2.lod = Math.floor((loadedBytes/totalBytes)*100);
};
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
//target.my_txt.text = myTitle3;
fullImage_mc2.my_title.text = myTitle3;
fullImage_mc2.my_style.text = myStyle_Info3;
fullImage_mc2.my_describtion.text = myDescribtion3;
fullImage_mc2.my_mun.text = myNumber*1;
//trace("SWA-myNumber= "+myNumber);
slide.gotoAndPlay(3);
fullImage_mc2.lod = "";
//trace("IMAGE LOAD DONE")
};
fullClipLoader.loadClip("photos/collection/full_images/"+myURL3, fullImage_mc2.pic_l.fullImage_mc);
}
//next
function callSlideNext(myNumber) {
trace(“callSlideShow”);
//fullImage_mc2.my_mun.text = “”;
myURL4 = myImages[myNumber].attributes.full_url;
myTitle4 = myImages[myNumber].attributes.title;
myStyle_Info4 = myImages[myNumber].attributes.style_info;
myDescribtion4 = myImages[myNumber].attributes.describtion;
trace("myStyle_Info= "+myStyle_Info);
trace("callSlideShow= "+myURL);
//createEmptyMovieClip("fullImage_mc",getNextHighestDepth());
//attachMovie("fullImage_mc2","fullImage_mc2",getNextHighestDepth());
fullImage_mc2.pic_l.createEmptyMovieClip("fullImage_mc", getNextHighestDepth());
//fullImage_mc._x = full_x;
//fullImage_mc._y = full_y;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
fullImage_mc2.lod = "";
//target.createTextField("my_txt",fullImage_mc2.pic_l.fullImage_mc.getNextHighestDepth,0,0,200,20);
//target.my_txt.selectable = false;
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
//target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
fullImage_mc2.lod = Math.floor((loadedBytes/totalBytes)*100);
};
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
//target.my_txt.text = myTitle4;
fullImage_mc2.my_title.text = myTitle4;
fullImage_mc2.my_style.text = myStyle_Info4;
fullImage_mc2.my_describtion.text = myDescribtion4;
fullImage_mc2.my_mun.text = myNumber*1;
//trace("SWA-myNumber= "+myNumber);
//slide.gotoAndPlay(3);
//trace("IMAGE LOAD DONE")
fullImage_mc2.lod = "";
};
fullClipLoader.loadClip("photos/collection/full_images/"+myURL4, fullImage_mc2.pic_l.fullImage_mc);
}