MovieClip.prototype.getCurrentPath = function() { str = _root._url; newstr = str.substring(0, (str.lastIndexOf("/"))+1); return (newstr); }; MovieClip.prototype.parseConfig = function() { lastdir = 0; lastsubdir = 0; lastmenu = 0; _root.dirs = new Array(); _root.themeColorsR = new Array(); _root.themeColorsG = new Array(); _root.themeColorsB = new Array(); _root.themeAlpha = new Array(); _root.menuname = new Array(); _root.musicname = new Array(); _root.imagemenu = new Array(); _root.isound = new Array(); haswrapper = 0; cNode = _root.options.firstChild; while (cNode != null) { if (cNode.nodeName == "gallery") { tmpNode = cNode.firstChild; haswrapper = 1; } cNode = cNode.nextSibling; } if (haswrapper == 0) { tmpNode = _root.options.firstChild; } while (tmpNode != null) { if (tmpNode.nodeType == 1) { tmpNode2 = tmpNode.firstChild; while (tmpNode2 != null) { if (tmpNode2.nodeType == 1) { if (tmpNode2.nodeName == "dir") { lastdir += 1; lastsubdir = 0; _root["subdir"+lastdir] = new Array(); _root.dirs[lastdir] = tmpNode2.attributes.value; } tmpNode3 = tmpNode2.firstChild; while (tmpNode3 != null) { if (tmpNode3.nodeType == 1) { switch (tmpNode3.nodeName) { case "serveraddress" : _root.serveraddress = tmpNode3.attributes.value; break; case "watermarktext" : _root.watermarktext = tmpNode3.attributes.value; break; case "watermarksetup" : _root.watermarkred = tmpNode3.attributes.red; _root.watermarkgreen = tmpNode3.attributes.green; _root.watermarkblue = tmpNode3.attributes.blue; _root.watermarkalpha = tmpNode3.attributes.alpha; _root.watermarksize = tmpNode3.attributes.size; _root.watermarkpos = tmpNode3.attributes.pos; break; case "watermarkshadow" : _root.swatermarkred = tmpNode3.attributes.red; _root.swatermarkgreen = tmpNode3.attributes.green; _root.swatermarkblue = tmpNode3.attributes.blue; break; case "pictureframe" : _root.fwid = tmpNode3.attributes.width; _root.frr = tmpNode3.attributes.red; _root.frg = tmpNode3.attributes.green; _root.frb = tmpNode3.attributes.blue; break; case "browserindent" : _root.browserindent = tmpNode3.attributes.value; break; case "numberspacing" : _root.numberspacing = tmpNode3.attributes.value; break; case "skinname" : _root.skinname = tmpNode3.attributes.value; break; case "numberx" : _root.thumbsX = tmpNode3.attributes.value; break; case "numbery" : _root.thumbsY = tmpNode3.attributes.value; break; case "minsize" : _root.min_wid = tmpNode3.attributes.minwidth; _root.min_hei = tmpNode3.attributes.minheight; break; case "zoom" : _root.minzoom = tmpNode3.attributes.minzoom; _root.maxzoom = tmpNode3.attributes.maxzoom; break; case "color" : _root.themeColorsR.push(Math.floor(tmpNode3.attributes.red)); _root.themeColorsG.push(Math.floor(tmpNode3.attributes.green)); _root.themeColorsB.push(Math.floor(tmpNode3.attributes.blue)); _root.themeAlpha.push(Math.floor(tmpNode3.attributes.alpha)); break; case "musicname" : _root.musicname.push(tmpNode3.attributes.value); break; case "firstpic" : _root.fstcat = tmpNode3.attributes.cat; _root.fstsubcat = tmpNode3.attributes.subcat; _root.fstimg = tmpNode3.attributes.img; break; case "enabledelay" : _root.delaymode = tmpNode3.attributes.value; break; case "delay" : _root.delaytime = tmpNode3.attributes.value; break; case "shrink" : _root.shrinkmode = tmpNode3.attributes.value; break; case "expand" : _root.expandmode = tmpNode3.attributes.value; break; case "center" : _root.centermode = tmpNode3.attributes.value; break; case "showbrowser" : _root.showbrowser = tmpNode3.attributes.value; break; //ANDREI UPDATE 02 Start case "showpictureinfo" : _root.showpictureinfo = tmpNode3.attributes.value; break; //ANDREI UPDATE 02 End case "showpopup" : _root.showpopup = tmpNode3.attributes.value; _root.popupindent = Math.ceil(tmpNode3.attributes.indent); _root.snappopup = Math.ceil(tmpNode3.attributes.snap); _root.popupwid = Math.ceil(tmpNode3.attributes.width); _root.popuphei = Math.ceil(tmpNode3.attributes.height); _root.popupauto = Math.ceil(tmpNode3.attributes.autosize); break; case "showthumbs" : _root.showthumbs = tmpNode3.attributes.value; break; //ANDREI UPDATE 05 Start case "fitarea" : _root.fitarea = tmpNode3.attributes.value; if (_root.fitarea == 1) { _root.fitW = tmpNode3.attributes.width; _root.fitH = tmpNode3.attributes.height; } break; //ANDREI UPDATE 05 End //ANDREI UPDATE 06 Start case "loop" : _root.loopPics = tmpNode3.attributes.value; break; //ANDREI UPDATE 06 End //ANDREI UPDATE 07 Start case "visibleimagemenu" : _root.visibleimagemenu = tmpNode3.attributes.value; break; //ANDREI UPDATE 07 End //ANDREI UPDATE 08 Start case "streammp3s" : _root.streammp3s = tmpNode3.attributes.value; break; //ANDREI UPDATE 08 End //ANDREI UPDATE 10 Start case "randompics" : _root.randompics = tmpNode3.attributes.value; break; //ANDREI UPDATE 10 End case "showquickthumbs" : _root.showquickthumbs = tmpNode3.attributes.value; break; case "autoopenbrowser" : _root.autoopenbrowser = tmpNode3.attributes.value; break; case "browserdragable" : _root.browserdragable = tmpNode3.attributes.value; break; case "showbrowserfiles" : _root.showbrowserfiles = tmpNode3.attributes.value; break; case "soundskip" : _root.soundskip = tmpNode3.attributes.value; break; //ANDREI UPDATE 01 Start case "background" : _root.backgroundImage = tmpNode3.attributes.path; break; //ANDREI UPDATE 01 End case "soundvolume" : _root.soundVol = tmpNode3.attributes.value; break; case "musicvolume" : _root.musVol = tmpNode3.attributes.value; break; case "speechvolume" : _root.commVol = tmpNode3.attributes.value; break; case "tint" : _root.tint = Math.ceil(tmpNode3.attributes.value)+100; break; case "imagemenuitem" : _root.imagemenu.push(tmpNode3.attributes.type); break; case "isound" : if (tmpNode3.attributes.value != "") { _root.isound.push(tmpNode3.attributes.value); } else { _root.isound.push("empty.mp3"); } break; case "popuppattern" : tmpNode4 = tmpNode3.firstChild; if (tmpNode4.nodeType == 3) { _root.popuppattern = tmpNode4.nodeValue; } break; case "menu" : _root.menuname.push(tmpNode3.attributes.name); lastmenu += 1; lastitem = 0; _root["menuitem"+lastmenu] = new Array(); tmpNode4 = tmpNode3.firstChild; while (tmpNode4 != null) { if (tmpNode4.nodeType == 1) { if (tmpNode4.nodeName == "menuitem") { lastitem += 1; _root["menuitem"+lastmenu][lastitem] = tmpNode4.attributes.type; } } tmpNode4 = tmpNode4.nextSibling; } break; case "subdir" : lastsubdir += 1; lastimg = 0; _root["img"+lastdir+"_"+lastsubdir] = new Array(); _root["tn"+lastdir+"_"+lastsubdir] = new Array(); _root["mp3"+lastdir+"_"+lastsubdir] = new Array(); _root["comment"+lastdir+"_"+lastsubdir] = new Array(); _root["xlink"+lastdir+"_"+lastsubdir] = new Array(); _root["xtarget"+lastdir+"_"+lastsubdir] = new Array(); _root["xname"+lastdir+"_"+lastsubdir] = new Array(); _root["flvPics"+lastdir+"_"+lastsubdir] = new Array(); _root["subdir"+lastdir][lastsubdir] = tmpNode3.attributes.value; tmpNode4 = tmpNode3.firstChild; while (tmpNode4 != null) { if (tmpNode4.nodeType == 1) { if (tmpNode4.nodeName == "img") { if (tmpNode4.attributes.value != "") { lastimg += 1; _root["img"+lastdir+"_"+lastsubdir][lastimg] = tmpNode4.attributes.value; var ext:String = tmpNode4.attributes.value.slice(-3); if (ext.toLowerCase() == "flv") { if (tmpNode4.attributes.videoPicture == "" || tmpNode4.attributes.videoPicture == undefined) { _root["flvPics"+lastdir+"_"+lastsubdir][lastimg] = "default"; } else { _root["flvPics"+lastdir+"_"+lastsubdir][lastimg] = tmpNode4.attributes.videoPicture; } } _root["tn"+lastdir+"_"+lastsubdir][lastimg] = tmpNode4.attributes.thumbnail; if (tmpNode4.attributes.mp3 != "") { _root["mp3"+lastdir+"_"+lastsubdir][lastimg] = tmpNode4.attributes.mp3; } else { _root["mp3"+lastdir+"_"+lastsubdir][lastimg] = undefined; } _root["xlink"+lastdir+"_"+lastsubdir][lastimg] = tmpNode4.attributes.link; _root["xtarget"+lastdir+"_"+lastsubdir][lastimg] = tmpNode4.attributes.target; if (tmpNode4.attributes.name<>undefined) { _root["xname"+lastdir+"_"+lastsubdir][lastimg] = tmpNode4.attributes.name; } else { _root["xname"+lastdir+"_"+lastsubdir][lastimg] = tmpNode4.attributes.value; } } } } tmpNode5 = tmpNode4.firstChild; if (tmpNode5.nodeType == 3) { _root["comment"+lastdir+"_"+lastsubdir][lastimg] = removeChars(tmpNode5.nodeValue, 10); //trace(escape(tmpNode5.nodeValue)); } tmpNode4 = tmpNode4.nextSibling; } break; } } tmpNode3 = tmpNode3.nextSibling; } } tmpNode2 = tmpNode2.nextSibling; } } tmpNode = tmpNode.nextSibling; } }; MovieClip.prototype.fitImage = function() { _root.workarea.image_panel.anim.pic1.pic._xscale = _root.zoomFactor; _root.workarea.image_panel.anim.pic1.pic._yscale = _root.zoomFactor; _root.workarea.image_panel.anim.pic1.back._width = _root.actualW; _root.workarea.image_panel.anim.pic1.back._height = _root.actualH; if (_root.shrinkmode == 1) { if (_root.workarea.image_panel.anim.pic1.pic._width>_root.actualW) { _root.workarea.image_panel.anim.pic1.pic._width = _root.actualW; _root.workarea.image_panel.anim.pic1.pic._yscale = _root.workarea.image_panel.anim.pic1.pic._xscale; } if (_root.workarea.image_panel.anim.pic1.pic._height>_root.actualH) { _root.workarea.image_panel.anim.pic1.pic._height = _root.actualH; _root.workarea.image_panel.anim.pic1.pic._xscale = _root.workarea.image_panel.anim.pic1.pic._yscale; } } if (_root.expandmode == 1) { if (_root.workarea.image_panel.anim.pic1.pic._width<_root.actualW) { _root.workarea.image_panel.anim.pic1.pic._width = _root.actualW; _root.workarea.image_panel.anim.pic1.pic._yscale = _root.workarea.image_panel.anim.pic1.pic._xscale; if (_root.workarea.image_panel.anim.pic1.pic._height>_root.actualH) { _root.workarea.image_panel.anim.pic1.pic._height = _root.actualH; _root.workarea.image_panel.anim.pic1.pic._xscale = _root.workarea.image_panel.anim.pic1.pic._yscale; } } else if (_root.workarea.image_panel.anim.pic1.pic._height<_root.actualH) { _root.workarea.image_panel.anim.pic1.pic._height = _root.actualH; _root.workarea.image_panel.anim.pic1.pic._xscale = _root.workarea.image_panel.anim.pic1.pic._yscale; if (_root.workarea.image_panel.anim.pic1.pic._width>_root.actualW) { _root.workarea.image_panel.anim.pic1.pic._width = _root.actualW; _root.workarea.image_panel.anim.pic1.pic._yscale = _root.workarea.image_panel.anim.pic1.pic._xscale; } } } if (_root.centermode == 1) { stx = 0; sty = 0; hei = _root.workarea.image_panel.anim.pic1.pic._height; wid = _root.workarea.image_panel.anim.pic1.pic._width; cx = (_root.actualW-wid)/2+stx; cy = (_root.actualH-hei)/2+sty; hei = _root.workarea.image_panel.anim.pic1.pic._x=cx; hei = _root.workarea.image_panel.anim.pic1.pic._y=cy; } _root.workarea.image_panel.anim.pic1.watermark._x = _root.workarea.image_panel.anim.pic1.pic._x; _root.workarea.image_panel.anim.pic1.watermark._y = _root.workarea.image_panel.anim.pic1.pic._y; _root.workarea.image_panel.anim.pic1.pic._xscale = _root.zoomFactor; _root.workarea.image_panel.anim.pic1.pic._yscale = _root.zoomFactor; checkScroll(); }; MovieClip.prototype.fitImage2 = function() { _root.workarea.image_panel.anim.pic.pic._xscale = _root.zoomFactor; _root.workarea.image_panel.anim.pic.pic._yscale = _root.zoomFactor; _root.workarea.image_panel.anim.pic.back._width = _root.actualW; _root.workarea.image_panel.anim.pic.back._height = _root.actualH; if (_root.shrinkmode == 1) { if (_root.workarea.image_panel.anim.pic.pic._width>_root.actualW) { _root.workarea.image_panel.anim.pic.pic._width = _root.actualW; _root.workarea.image_panel.anim.pic.pic._yscale = _root.workarea.image_panel.anim.pic.pic._xscale; } if (_root.workarea.image_panel.anim.pic.pic._height>_root.actualH) { _root.workarea.image_panel.anim.pic.pic._height = _root.actualH; _root.workarea.image_panel.anim.pic.pic._xscale = _root.workarea.image_panel.anim.pic.pic._yscale; } } if (_root.expandmode == 1) { if (_root.workarea.image_panel.anim.pic.pic._width<_root.actualW) { _root.workarea.image_panel.anim.pic.pic._width = _root.actualW; _root.workarea.image_panel.anim.pic.pic._yscale = _root.workarea.image_panel.anim.pic.pic._xscale; if (_root.workarea.image_panel.anim.pic.pic._height>_root.actualH) { _root.workarea.image_panel.anim.pic.pic._height = _root.actualH; _root.workarea.image_panel.anim.pic.pic._xscale = _root.workarea.image_panel.anim.pic.pic._yscale; } } else if (_root.workarea.image_panel.anim.pic.pic._height<_root.actualH) { _root.workarea.image_panel.anim.pic.pic._height = _root.actualH; _root.workarea.image_panel.anim.pic.pic._xscale = _root.workarea.image_panel.anim.pic.pic._yscale; if (_root.workarea.image_panel.anim.pic.pic._width>_root.actualW) { _root.workarea.image_panel.anim.pic.pic._width = _root.actualW; _root.workarea.image_panel.anim.pic.pic._yscale = _root.workarea.image_panel.anim.pic.pic._xscale; } } } if (_root.centermode == 1) { stx = 0; sty = 0; hei = _root.workarea.image_panel.anim.pic.pic._height; wid = _root.workarea.image_panel.anim.pic.pic._width; cx = (_root.actualW-wid)/2+stx; cy = (_root.actualH-hei)/2+sty; hei = _root.workarea.image_panel.anim.pic.pic._x=cx; hei = _root.workarea.image_panel.anim.pic.pic._y=cy; } _root.workarea.image_panel.anim.pic.watermark._x = _root.workarea.image_panel.anim.pic.pic._x; _root.workarea.image_panel.anim.pic.watermark._y = _root.workarea.image_panel.anim.pic.pic._y; checkScroll(); }; MovieClip.prototype.loadNext = function() { if (_root.showMode == 0) { if (_root.isLoading<>1) { dir = _root.curDir; subdir = _root.curSubdir; if (_root.randompics == 1 && _root.IpressNext == false) { img = _root.randRange(1, _root["img"+dir+"_"+subdir].length-1); if (img == _root.curImg) { img = _root.randRange(1, _root["img"+dir+"_"+subdir].length-1); loadPic(dir, subdir, img); } else { loadPic(dir, subdir, img); } } else { img = _root.curImg+1; num = _root["img"+dir+"_"+subdir].length; if (img>=num) { if ((_root.delaymode>0 && _root.loopPics) == true) { img = 1; _root.curImg = img; loadPic(dir, subdir, img); } else if (_root.IpressNext == true) { img = 1; _root.curImg = img; _root.IpressNext = false; loadPic(dir, subdir, img); } } else if (img_root.numPages) { _root.curPage = 1; } _root.workarea.thumbnails.removeMovieClip(); _root.workarea.createEmptyMovieClip("thumbnails", 68); _root.workarea.thumbnails._x = _root.staticmask._x; _root.workarea.thumbnails._y = _root.staticmask._y; loadThumb(1); } }; MovieClip.prototype.loadPrev = function() { if (_root.showMode == 0) { if (_root.isLoading<>1) { dir = _root.curDir; subdir = _root.curSubdir; img = _root.curImg-1; num = _root["img"+dir+"_"+subdir].length; if (img<1) { img = num-1; } loadPic(dir, subdir, img); _root.curImg = img; } } else if (_root.showMode == 1) { _root.curPage = _root.curPage+1; if (_root.curPage>_root.numPages) { _root.curPage = 1; } _root.workarea.thumbnails.removeMovieClip(); _root.workarea.createEmptyMovieClip("thumbnails", 68); _root.workarea.thumbnails._x = _root.staticmask._x; _root.workarea.thumbnails._y = _root.staticmask._y; loadThumb(1); } }; MovieClip.prototype.doTransition = function() { num = 1; _root.attachMovie("trans"+num, "transition", 1501); _root.transition._width = _root.actualW+1; _root.transition._height = _root.actualH+1; point = new Object(); point.x = _root.workarea.image_panel.anim.pic1._x; point.y = _root.workarea.image_panel.anim.pic1._y; localToGlobal(point); _root.transition._x = _root.staticmask._x; _root.transition._y = _root.staticmask._y; _root.workarea.image_panel.anim.pic.setMask(_root.transition); _root.transition._visible = false; }; MovieClip.prototype.loadPic = function(dir, subdir, img) { if (_root.delaySchimbat>0 && (_root.delaySchimbat != _root.delaymode)) { startTimer(); _root.delaySchimbat = 0; } if (_root.videoPlaying == 1) { if (_root.valoareTimer>-1) { startTimer(); } _root.workarea.image_panel.anim.pic._visible = true; _root.workarea.image_panel.anim.pic1._visible = true; _root.workarea.image_panel.anim.image_menu._visible = true; _root.workarea.image_panel.anim.image_menu.buttons.videoButton.gotoAndStop(1); _root.nsStream.pause(true); removeMovieClip(_root.workarea.video_mc); _root.videoPlaying == 0; } _root.curDir = dir; _root.curSubdir = subdir; _root.curImg = img; _root.isSndLoading = 0; createBottomList(); _root.workarea.context.removeMovieClip(); if (_root.showMode == 1) { _root.workarea.image_panel.anim.pic._visible = true; _root.workarea.image_panel.anim.pic1._visible = true; _root.showMode = 0; } _root.workarea.thumbnails.removeMovieClip(); _root.workarea.image_panel.anim.fileinfo._visible = true; _root.workarea.panner._visible = true; _root.transition.gotoAndStop(_root.transition._totalframes); _root.workarea.image_panel.anim.pic.pic._alpha = 100; _root.isLoading = 1; _root.showNext = 1; _root.workarea.image_panel.anim.pic1._alpha = 0; _root.workarea.image_panel.anim.pic1.pic.clear(); if (_root.showMode == 0) { _root.workarea.image_panel.anim.pic.pic._visible = false; _root.workarea.image_panel.anim.pic.frame._alpha = 0; _root.workarea.image_panel.anim.pic1.frame._alpha = 100; _root.workarea.image_panel.anim.pic.watermark._visible = false; _root.workarea.image_panel.anim.pic1.watermark._visible = true; } ext = _root["img"+dir+"_"+subdir][img].slice(-3); if (ext.toLowerCase() != "flv") { fname = _root.dirs[dir]+"/"+_root["subdir"+dir][subdir]+"/"+_root["img"+dir+"_"+subdir][img]; _root.workarea.image_panel.anim.image_menu.buttons.videoButton._visible = false; _root.thereIsAVideoButon = 0; } else { if (_root["flvPics"+dir+"_"+subdir][img] != "default") { fname = _root.dirs[dir]+"/"+_root["subdir"+dir][subdir]+"/"+_root["flvPics"+dir+"_"+subdir][img]; } else { fname = "default_video_image.jpg"; } _root.workarea.image_panel.anim.image_menu.buttons.videoButton._visible = true; _root.thereIsAVideoButon = 1; } _root.workarea.image_panel.anim.pic1.pic.loadMovie(fname); _root.workarea.attachMovie("loader_image", "image_loader", 200); _root.workarea.applySize(); }; MovieClip.prototype.loadVideo = function(fname:String) { var tobj = this; _root.ncConnection = new NetConnection(); _root.ncConnection.connect(null); _root.nsStream = new NetStream(_root.ncConnection); _root.nsStream.setBufferTime(0); this.videoHolder.vMovie.attachVideo(_root.nsStream); _root.nsStream.play(fname); _root.movieAudio = new Sound(this.movieSoundHolder); this.movieSoundHolder.attachAudio(_root.nsStream); _root.movieAudio.setVolume(_root.commVol); _root.showMovie = 0; _root.nsStream.onStatus = function(infoObject:Object):Void { //trace(infoObject.code); switch (infoObject.code) { case 'NetStream.Play.Stop' : this.seek(0); this.pause(true); break; case 'NetStream.Buffer.Full' : if (_root.showMovie == 0) { //tobj.videoHolder._width = tobj.videoHolder.vMovie.width; //tobj.videoHolder._height = tobj.videoHolder.vMovie.height; //tobj.videoMask._width = tobj.videoHolder.vMovie.width; //tobj.videoMask._height = tobj.videoHolder.vMovie.height; //tobj.movieControl._x = (tobj.videoMask._width - tobj.movieControl._width)/2; tobj.movieControl._y = tobj.videoMask._height-21; _root.showMovie = 1; } break; } }; }; MovieClip.prototype.loadSnd = function(dir, subdir, img) { _root.snd = new Sound(); if (_root["mp3"+dir+"_"+subdir][img] != undefined) { _root.isSndLoading = 1; fname = getCurrentPath()+_root.dirs[dir]+"/"+_root["subdir"+dir][subdir]+"/"+_root["mp3"+dir+"_"+subdir][img]; _root.snd.onSoundComplete = function() { if (_root.delaymode>0) { _root.snd.onSoundComplete = null; _root.sndComplete = 1; } }; if (_root.streammp3s == 1) { _root.snd.loadSound(fname, true); /*_root.snd.stop(); var total:Number = _root.snd.getBytesTotal(); if (total<500000) { _root.streamingSize = 1; } else if (total<1300000) { _root.streamingSize = total/5; } else { _root.streamingSize = total/10; } _root.workarea.attachMovie("loader_sound", "sound_loader", 201); _root.workarea.sound_loader.main.txt.text = "STREAMING";*/ } else { _root.snd.loadSound(fname, false); _root.workarea.attachMovie("loader_sound", "sound_loader", 201); _root.workarea.sound_loader.main.txt.text = "LOADING SOUND"; } _root.workarea.applySize(); } }; // function getHexa(nr:Number):String { var char:String = ""+nr; switch (nr) { case 10 : char = "A"; break; case 11 : char = "B"; break; case 12 : char = "C"; break; case 13 : char = "D"; break; case 14 : char = "E"; break; case 15 : char = "F"; break; } return char; } MovieClip.prototype.applyColor = function(r, g, b) { my_color = new Color(this); r = Math.floor(r/16); g = Math.floor(g/16); b = Math.floor(b/16); var charR:String = getHexa(r); var charG:String = getHexa(g); var charB:String = getHexa(b); var RGBcolor:String = "0x"+charR+charR+charG+charG+charB+charB; my_color.setRGB(RGBcolor); }; // MovieClip.prototype.applyColorDown = function(r, g, b) { my_color = new Color(this); my_color_transform = new Object(); my_color_transform.ra = Math.ceil(r/255*50); my_color_transform.rb = Math.ceil(r/255*128); my_color_transform.ga = Math.ceil(g/255*50); my_color_transform.gb = Math.ceil(g/255*128); my_color_transform.ba = Math.ceil(b/255*50); my_color_transform.bb = Math.ceil(b/255*128); my_color.setTransform(my_color_transform); }; MovieClip.prototype.applyColorUp = function(r, g, b) { my_color = new Color(this); my_color_transform = new Object(); my_color_transform.ra = Math.ceil(r/255*100)-100; my_color_transform.rb = 255; my_color_transform.ga = Math.ceil(g/255*100)-100; my_color_transform.gb = 255; my_color_transform.ba = Math.ceil(b/255*100)-100; my_color_transform.bb = 255; my_color.setTransform(my_color_transform); }; MovieClip.prototype.createCatBrowser = function() { _root.workarea.attachMovie("catmenu", "browser", 505); _root.workarea.browser.createEmptyMovieClip("catbrowser", 100); _root.workarea.browser.catbrowser._x = Math.ceil(_root.browserindent); _root.workarea.browser.catbrowser._y = Math.ceil(_root.workarea.browser._height-4); _root.workarea.browser.catbrowser._visible = false; num = _root.dirs.length-1; for (c=1; c<=num; c++) { _root.workarea.browser.catbrowser.attachMovie("category_item", "item"+c, c); _root.workarea.browser.catbrowser["item"+c]._y = Math.ceil(_root.workarea.browser.catbrowser["item"+c].back._height+1)*(c-1); _root.workarea.browser.catbrowser["item"+c].itemname.text = _root.dirs[c]; _root.workarea.browser.catbrowser["item"+c].num = c; _root.workarea.browser.catbrowser["item"+c].onRollOver = function() { _root.isounds.sound2.start(0, 0); createSubBrowser(this.num); _root.workarea.browser.catbrowser["item"+_root.brCat].icon.gotoAndStop(1); this.icon.gotoAndStop(2); _root.brCat = this.num; }; _root.workarea.browser.catbrowser["item"+c].onRollOut = function() { updateField(); }; _root.workarea.browser.catbrowser["item"+c].onReleaseOutside = function() { updateField(); }; } _root.workarea.applyTheme(); }; MovieClip.prototype.createSubBrowser = function(cat) { _root.workarea.browser.catbrowser.createEmptyMovieClip("subbrowser", 5000); _root.workarea.browser.catbrowser.subbrowser._x = 153; _root.workarea.browser.catbrowser.subbrowser._y = _root.workarea.browser.catbrowser["item"+cat]._y; num = _root["subdir"+cat].length-1; for (c=1; c<=num; c++) { _root.workarea.browser.catbrowser.subbrowser.attachMovie("category_item", "item"+c, c); _root.workarea.browser.catbrowser.subbrowser["item"+c]._y = Math.ceil(_root.workarea.browser.catbrowser.subbrowser["item"+c].back._height+1)*(c-1); if (_root.showbrowserfiles == 1) { _root.workarea.browser.catbrowser.subbrowser["item"+c].itemname.text = _root["subdir"+cat][c]; } else { _root.workarea.browser.catbrowser.subbrowser["item"+c].itemname.text = _root["subdir"+cat][c]+" ["+(_root["img"+cat+"_"+c].length-1)+"]"; } _root.workarea.browser.catbrowser.subbrowser["item"+c].num = c; _root.workarea.browser.catbrowser.subbrowser["item"+c].cat = cat; _root.workarea.browser.catbrowser.subbrowser["item"+c].subcat = c; if (_root.showbrowserfiles == 1) { _root.workarea.browser.catbrowser.subbrowser["item"+c].onRollOver = function() { _root.isounds.sound2.start(0, 0); createImgBrowser(cat, this.num); _root.workarea.browser.catbrowser.subbrowser["item"+_root.brSubcat].icon.gotoAndStop(1); this.icon.gotoAndStop(2); _root.brSubcat = this.num; }; } else { _root.workarea.browser.catbrowser.subbrowser["item"+c].onRollOver = function() { this.icon.gotoAndStop(2); _root.isounds.sound2.start(0, 0); }; } _root.workarea.browser.catbrowser.subbrowser["item"+c].onRollOut = function() { this.icon.gotoAndStop(1); updateField(); }; _root.workarea.browser.catbrowser.subbrowser["item"+c].onReleaseOutside = function() { this.icon.gotoAndStop(1); updateField(); }; _root.workarea.browser.catbrowser.subbrowser["item"+c].onRelease = function() { _root.curDir = this.cat; _root.curSubdir = this.subcat; showThumbs(); _root.isounds.sound3.start(0, 0); }; } _root.workarea.applyTheme(); }; MovieClip.prototype.createImgBrowser = function(cat, subcat) { _root.workarea.image_panel.anim.image_menu._visible = false; _root.workarea.browser.catbrowser.subbrowser.createEmptyMovieClip("imgbrowser", 5000); _root.workarea.browser.catbrowser.subbrowser.imgbrowser._x = 153; _root.workarea.browser.catbrowser.subbrowser.imgbrowser._y = _root.workarea.browser.catbrowser.subbrowser["item"+subcat]._y; num = _root["img"+cat+"_"+subcat].length-1; for (c=1; c<=num; c++) { _root.workarea.browser.catbrowser.subbrowser.imgbrowser.attachMovie("category_item", "item"+c, c); _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c]._y = Math.ceil(_root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].back._height+1)*(c-1); _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].itemname.text = _root["xname"+cat+"_"+subcat][c]; _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].cat = cat; _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].subcat = subcat; _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].num = c; _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].onRollOver = function() { _root.isounds.sound2.start(0, 0); _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+_root.brImg].icon.gotoAndStop(1); this.icon.gotoAndStop(2); _root.brImg = this.num; }; _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].onRollOut = function() { updateField(); }; _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].onReleaseOutside = function() { updateField(); }; _root.workarea.browser.catbrowser.subbrowser.imgbrowser["item"+c].onRelease = function() { _root.curDir = this.cat; _root.curSubdir = this.subcat; _root.curImg = this.num; if (_root.visibleimagemenu == 1) { _root.workarea.image_panel.anim.image_menu._visible = true; } loadPic(_root.curDir, _root.curSubdir, _root.curImg); _root.isounds.sound3.start(0, 0); }; } _root.workarea.applyTheme(); }; MovieClip.prototype.hideThumbs = function() { createBottomList(); _root.workarea.image_panel.anim.pic._visible = true; _root.workarea.image_panel.anim.pic1._visible = true; _root.workarea.thumbnails.removeMovieClip(); _root.showMode = 0; _root.isounds.sound11.start(0, 0); _root.workarea.image_panel.anim.fileinfo._visible = true; _root.workarea.panner._visible = true; }; MovieClip.prototype.showThumbs = function() { _root.workarea.image_panel.anim.image_menu.buttons.videoButton.gotoAndStop(1); _root.nsStream.pause(true); removeMovieClip(_root.workarea.video_mc); _root.workarea.image_panel.anim.image_menu._visible = false; _root.snd = new Sound(); _root.workarea.image_panel.anim.fileinfo._visible = false; _root.workarea.panner._visible = false; _root.isounds.sound10.start(0, 0); createBottomList(); _root.workarea.image_panel.anim.pic._visible = false; _root.workarea.image_panel.anim.pic1._visible = false; _root.firstThumb = 1; _root.lastThumb = 0; numt = _root.thumbsX*_root.thumbsY; dir = _root.curDir; subdir = _root.curSubdir; nump = _root["img"+dir+"_"+subdir].length-1; _root.curPage = 1; _root.numPages = Math.ceil(nump/numt); _root.showMode = 1; _root.thumbsW = Math.floor(_root.actualW/_root.thumbsX); _root.thumbsH = Math.floor(_root.actualH/_root.thumbsY); _root.workarea.createEmptyMovieClip("thumbnails", 68); _root.workarea.thumbnails._x = _root.staticmask._x; _root.workarea.thumbnails._y = _root.staticmask._y; _root.workarea.attachMovie("thumbs_context", "context", 5324); _root.workarea.context._visible = false; if (_root.snappopup<>1) { _root.workarea.context.onMouseMove = function() { this._x = _root.workarea._xmouse; this._y = _root.workarea._ymouse; }; } loadThumb(1); }; MovieClip.prototype.loadThumb = function(num) { _root.workarea.thumbnails.attachMovie("thumb", "thumb"+num, num); numt = _root.thumbsX*_root.thumbsY; tny = Math.ceil(num/_root.thumbsX)-1; tnx = num-tny*_root.thumbsX-1; tx = tnx*_root.thumbsW+2; ty = tny*_root.thumbsH+2; _root.workarea.thumbnails["thumb"+num]._x = tx; _root.workarea.thumbnails["thumb"+num]._y = ty; _root.workarea.thumbnails["thumb"+num].resizeThumb(_root.thumbsW, _root.thumbsH); _root.thumbloader = new MovieClipLoader(); thumbListener = new Object(); thumbListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) { //trace(loadedBytes+" = bytes loaded at progress callback "); //trace(totalBytes+" = bytes total at progress callback \n"); }; thumbListener.onLoadInit = function(target_mc) { _root.workarea.thumbnails["thumb"+num].pixsize = target_mc._width+"x"+target_mc._height; _root.workarea.thumbnails["thumb"+num].xsize = target_mc._width; _root.workarea.thumbnails["thumb"+num].ysize = target_mc._height; _root.workarea.thumbnails["thumb"+num].kbsize = Math.ceil(target_mc.getBytesTotal()/1024)+"kb"; num = _root.lastThumb; numt = _root.thumbsX*_root.thumbsY; phei = _root.workarea.thumbnails["thumb"+num].frame._height; pwid = _root.workarea.thumbnails["thumb"+num].frame._width; px = _root.workarea.thumbnails["thumb"+num].frame._x; py = _root.workarea.thumbnails["thumb"+num].frame._y; _root.workarea.thumbnails["thumb"+num].loader._visible = false; _root.workarea.thumbnails["thumb"+num].loader.removeMovieClip(); target_mc._width = pwid; target_mc._yscale = target_mc._xscale; if (target_mc._height>phei) { target_mc._height = phei; target_mc._xscale = target_mc._yscale; } target_mc._x = (pwid-target_mc._width)/2+px; target_mc._y = (phei-target_mc._height)/2+py; nump = _root["img"+dir+"_"+subdir].length-1; target_mc._parent._parent.gotoAndPlay("intro"); if (num_root.workarea.context.fill._height) { _root.workarea.context.txt.onEnterFrame = function() { if (_root.popupPause>=0) { _root.workarea.context.txt._y = -_root.popupYPos; _root.popupYPos += 1; } else { _root.popupPause += 1; } if (_root.popupYPos>=_root.workarea.context.txt._height) { _root.popupYPos = -_root.workarea.context.fill._height; } }; } }; _root.workarea.thumbnails["thumb"+num].onRollOut = function() { this.pic_mc.gotoAndStop(1); _root.workarea.context._visible = false; }; _root.workarea.thumbnails["thumb"+num].onReleaseOutside = function() { this.pic_mc.gotoAndStop(1); _root.workarea.context._visible = false; }; } }; _root.thumbloader.addListener(thumbListener); dir = _root.curDir; subdir = _root.curSubdir; img = (_root.curPage-1)*numt+num; _root.workarea.thumbnails["thumb"+num].imgnum = img; _root.workarea.thumbnails["thumb"+num].fnp.fname.text = _root["xname"+dir+"_"+subdir][img]; var ext:String = _root["img"+dir+"_"+subdir][img].slice(-3); if (ext.toLowerCase() != "flv") { fname = _root.dirs[dir]+"/"+_root["subdir"+dir][subdir]+"/"+_root["img"+dir+"_"+subdir][img]; } else { if (_root["flvPics"+dir+"_"+subdir][img] != "default") { fname = _root.dirs[dir]+"/"+_root["subdir"+dir][subdir]+"/"+_root["flvPics"+dir+"_"+subdir][img]; } else { fname = "default_video_image.jpg"; } } _root.lastThumb = num; if (_root["comment"+dir+"_"+subdir][img] != undefined) { _root.workarea.thumbnails["thumb"+num].comment = _root["comment"+dir+"_"+subdir][img]; } else { _root.workarea.thumbnails["thumb"+num].comment = ""; } _root.workarea.thumbnails["thumb"+num].xname = _root["xname"+dir+"_"+subdir][img]; _root.workarea.thumbnails["thumb"+num].filename = _root["img"+dir+"_"+subdir][img]; _root.workarea.thumbnails["thumb"+num].urla = _root.getCurrentPath()+fname; _root.workarea.thumbnails["thumb"+num].cat = _root.dirs[dir]; _root.workarea.thumbnails["thumb"+num].subcat = _root["subdir"+dir][subdir]; _root.thumbloader.loadClip(fname, _root.workarea.thumbnails["thumb"+num].pic_mc.pic_anim.pic); _root.workarea.thumbnails["thumb"+num].onRelease = function() { _root.isounds.sound19.start(0, 0); dir = _root.curDir; subdir = _root.curSubdir; img = this.imgnum; loadPic(dir, subdir, img); }; _root.workarea.thumbnails["thumb"+num].onRollOver = function() { _root.isounds.sound18.start(0, 0); this.pic_mc.gotoAndPlay(2); this.useHandCursor = false; }; _root.workarea.thumbnails["thumb"+num].onRollOut = function() { this.pic_mc.gotoAndStop(1); }; _root.workarea.thumbnails["thumb"+num].onReleaseOutside = function() { this.pic_mc.gotoAndStop(1); if (_root.visibleimagemenu == 1) { _root.workarea.image_panel.anim.image_menu._visible = true; } }; }; MovieClip.prototype.createCustomMenus = function() { num = _root.menuname.length; if (num>0) { for (c=1; c<=num; c++) { createCustomMenu(c); } } _root.workarea.applySize(); }; MovieClip.prototype.createCustomMenu = function(num) { _root.workarea.image_panel.anim.custom_menus.attachMovie("custom_menu", "menu"+num, num); _root.workarea.image_panel.anim.custom_menus["menu"+num].btn.kaption.autoSize = "left"; _root.workarea.image_panel.anim.custom_menus["menu"+num].btn.kaption.text = _root.menuname[num-1]; _root.workarea.image_panel.anim.custom_menus["menu"+num].btn.center._width = Math.ceil(_root.workarea.image_panel.anim.custom_menus["menu"+num].btn.kaption._width+1); _root.workarea.image_panel.anim.custom_menus["menu"+num].btn.right._x = Math.ceil(_root.workarea.image_panel.anim.custom_menus["menu"+num].btn.center._width)-.6; if (num>1) { boundz = _root.workarea.image_panel.anim.custom_menus["menu"+(num-1)].btn.getBounds(_root.workarea.image_panel.anim.custom_menus); _root.workarea.image_panel.anim.custom_menus["menu"+num]._x = Math.ceil(boundz.xMax); } _root.workarea.image_panel.anim.custom_menus["menu"+num].btn.onRollOver = function() { if (this._parent.anim._currentframe>6 or this._parent.anim._currentframe == 1) { this._parent.anim.gotoAndPlay(2); this.right.icon.gotoAndStop(2); _root.isounds.sound6.start(0, 0); } }; _root.workarea.image_panel.anim.custom_menus["menu"+num].btn.onMouseMove = function() { if (not this._parent.hitTest(_root._xmouse, _root._ymouse, true) and this._parent.anim._currentframe == 6) { this._parent.anim.gotoAndPlay(7); this.right.icon.gotoAndStop(1); _root.isounds.sound7.start(0, 0); } }; numi = _root["menuitem"+num].length-1; if (numi>0) { for (o=numi; o>=1; o--) { switch (_root["menuitem"+num][o]) { case "buttonNext" : butname = "btn_next_wide"; break; case "buttonPrevious" : butname = "btn_prev_wide"; break; case "buttonThumbnails" : butname = "btn_thmb_wide"; break; case "buttonTimer" : butname = "btn_time_wide"; break; case "buttonInfo" : butname = "btn_info_wide"; break; case "buttonSndVolume" : butname = "btn_sndvolume_wide"; break; case "buttonMusicVolume" : butname = "btn_musvolume_wide"; break; case "buttonCommentVolume" : butname = "btn_commvolume_wide"; break; case "buttonGamma" : butname = "btn_tint_wide"; break; case "buttonPan" : butname = "btn_pan_wide"; break; case "buttonAbout" : butname = "btn_about_wide"; break; case "buttonPopup" : butname = "btn_popup_wide"; break; case "divider" : butname = "btn_divider_wide"; break; case "buttonSndControls" : butname = "btn_soundcontrols_wide"; break; case "buttonMusControls" : butname = "btn_musiccontrols_wide"; break; } _root.workarea.image_panel.anim.custom_menus["menu"+num].anim.buttons.attachMovie(butname, "button"+o, o); _root.workarea.image_panel.anim.custom_menus["menu"+num].anim.buttons["button"+o].fill._alpha = _root.themeAlpha[13]; _root.workarea.image_panel.anim.custom_menus["menu"+num].anim.buttons["button"+o].frame._alpha = _root.themeAlpha[14]; _root.workarea.image_panel.anim.custom_menus["menu"+num].anim.buttons["button"+o].darker._alpha = _root.themeAlpha[13]; if (o0) { for (o=1; o<=numi; o++) { switch (_root.imagemenu[o-1]) { case "buttonNext" : butname = "btn_next_small"; break; case "buttonPrevious" : butname = "btn_prev_small"; break; case "buttonInfo" : butname = "btn_info_small"; break; case "buttonLeft" : butname = "btn_left_small"; break; case "buttonRight" : butname = "btn_right_small"; break; case "buttonUp" : butname = "btn_up_small"; break; case "buttonDown" : butname = "btn_down_small"; break; case "buttonZoomIn" : butname = "btn_zoomin_small"; break; case "buttonZoomOut" : butname = "btn_zoomout_small"; break; case "buttonZoomReset" : butname = "btn_zoom0_small"; break; case "divider" : butname = "btn_divider"; break; } _root.workarea.image_panel.anim.image_menu.buttons.attachMovie(butname, "button"+o, o); if (o>1) { boundz = _root.workarea.image_panel.anim.image_menu.buttons["button"+(o-1)].getBounds(_root.workarea.image_panel.anim.image_menu.buttons); _root.workarea.image_panel.anim.image_menu.buttons["button"+o]._x = Math.ceil(boundz.xMax); } } } _root.workarea.image_panel.anim.image_menu.buttons.attachMovie("btn_video_wide", "videoButton", o); boundz = _root.workarea.image_panel.anim.image_menu.buttons["button"+(o-1)].getBounds(_root.workarea.image_panel.anim.image_menu.buttons); _root.workarea.image_panel.anim.image_menu.buttons.videoButton._x = Math.ceil(boundz.xMax); if (_root.thereIsAVideoButon == 0) { _root.workarea.image_panel.anim.image_menu.buttons.videoButton._visible = false; } applySize(); }; MovieClip.prototype.createBottomList = function(num) { dir = _root.curDir; subdir = _root.curSubdir; nump = _root["img"+dir+"_"+subdir].length-1; _root.workarea.btm_list.panel.numbers_mc._x = 25; for (name in _root.workarea.btm_list.panel.numbers_mc) { if (typeof (_root.workarea.btm_list.panel.numbers_mc[name]) == "movieclip") { _root.workarea.btm_list.panel.numbers_mc[name].removeMovieClip(); } } for (c=1; c<=nump; c++) { _root.workarea.btm_list.panel.numbers_mc.attachMovie("btm_number", "number"+c, c); _root.workarea.btm_list.panel.numbers_mc["number"+c].darker.darker_mc.txt.text = c; _root.workarea.btm_list.panel.numbers_mc["number"+c].darker.darker_mc.txt.autoSize = "left"; _root.workarea.btm_list.panel.numbers_mc["number"+c].btn._width = _root.workarea.btm_list.panel.numbers_mc["number"+c].darker.darker_mc.txt._width; if (c>1) { boundz = _root.workarea.btm_list.panel.numbers_mc["number"+(c-1)].getBounds(_root.workarea.btm_list.panel.numbers_mc); _root.workarea.btm_list.panel.numbers_mc["number"+c]._x = boundz.xMax+Math.ceil(_root.numberspacing); } _root.workarea.btm_list.panel.numbers_mc["number"+c].num = c; } }; MovieClip.prototype.startTimer = function() { if (_root.delaymode == 0) { _root.delaymode = 2; timer = new Date(); _root.now_time = timer.getTime(); if (_root.delaytime == undefined or _root.delaytime<1) { _root.delaytime = 5000; } } else if (_root.delaymode<0) { _root.delaymode = -_root.delaymode; timer = new Date(); _root.now_time = timer.getTime(); } }; MovieClip.prototype.stopTimer = function() { if (_root.delaymode>0) { _root.delaymode = -_root.delaymode; } }; MovieClip.prototype.updateField = function(mode) { o = 0; if (_root.workarea.browser.cat_panel.header.hitTest(_root._xmouse, _root._ymouse)) { o = o+1; } if (_root.workarea.browser.catbrowser.hitTest(_root._xmouse, _root._ymouse, true)) { o = o+1; } if (o<1) { _root.workarea.browser.catbrowser._visible = false; _root.workarea.browser.cat_panel.header.open.icon.gotoAndStop(1); createCatBrowser(); _root.isounds.sound5.start(0, 0); } _root.workarea.applyTheme(); }; MovieClip.prototype.setSndVolume = function(volume) { for (c=1; c<=_root.isound.length; c++) { _root.isounds["sound"+c].setVolume(volume); } }; MovieClip.prototype.setMusVolume = function(volume) { _root.music_mc.setVolume(volume); }; MovieClip.prototype.setCommVolume = function(volume) { if (_root.snd.duration>0) { _root.snd.setVolume(volume); } _root.commVol = volume; }; MovieClip.prototype.setTint = function(tint) { _root.tint = tint; tint = (tint-100)/100; my_color = new Color(_root.workarea.image_panel.anim.pic.pic); my_color_transform = new Object(); my_color_transform.ra = 100; my_color_transform.rb = 255*tint; my_color_transform.ga = 100; my_color_transform.gb = 255*tint; my_color_transform.ba = 100; my_color_transform.bb = 255*tint; my_color.setTransform(my_color_transform); }; MovieClip.prototype.resizePanner = function() { coeffh = _root.workarea.image_panel.anim.pic.pic._height/_root.workarea.image_panel.anim.pic.back._height; coeffw = _root.workarea.image_panel.anim.pic.pic._width/_root.workarea.image_panel.anim.pic.back._width; coeffx = (_root.workarea.image_panel.anim.pic.back._x-_root.workarea.image_panel.anim.pic.pic._x)/_root.workarea.image_panel.anim.pic.pic._width; coeffy = (_root.workarea.image_panel.anim.pic.back._y-_root.workarea.image_panel.anim.pic.pic._y)/_root.workarea.image_panel.anim.pic.pic._height; if (coeffh<1) { coeffh = 1; } if (coeffw<1) { coeffw = 1; } if (coeffx<0) { coeffx = 0; } if (coeffy<0) { coeffy = 0; } hei = Math.ceil(this.panel.pic._height/coeffh); wid = Math.ceil(this.panel.pic._width/coeffw); x = Math.ceil(-coeffx*this.panel.pic._width); y = Math.ceil(-coeffy*this.panel.pic._height); this.panel.panner._x = -x+(this.panel.pic._x); this.panel.panner._y = -y+(this.panel.pic._y); this.panel.panner.frame_up._width = wid; this.panel.panner.frame_dn._width = wid; this.panel.panner.shadow_up._width = wid; this.panel.panner.shadow_dn._width = wid; this.panel.panner.frame_rt._height = hei; this.panel.panner.frame_lt._height = hei; this.panel.panner.backgnd._width = wid; this.panel.panner.backgnd._height = hei; this.panel.panner.frame_dn._y = hei-2; this.panel.panner.shadow_dn._y = hei-1; this.panel.panner.frame_rt._x = wid-1; }; MovieClip.prototype.checkScroll = function() { _root.canScrollUp = false; _root.canScrollDown = false; _root.canScrollLeft = false; _root.canScrollRight = false; _root.canScrollChanged = true; boundz = _root.workarea.image_panel.anim.pic.pic.getBounds(_root.workarea.image_panel.anim.pic); boundz2 = _root.workarea.image_panel.anim.pic.back.getBounds(_root.workarea.image_panel.anim.pic); if (boundz.xMax>boundz2.xMax) { _root.canScrollRight = true; } if (boundz.xMinboundz2.yMax) { _root.canScrollDown = true; } if (boundz.yMin_root.workarea.image_panel.anim.pic.pic._width) { coef = _root.workarea.image_panel.anim.pic.watermark._width/_root.workarea.image_panel.anim.pic.pic._width; _root.workarea.image_panel.anim.pic.watermark._width /= coef; _root.workarea.image_panel.anim.pic.watermark._height /= coef; } }; MovieClip.prototype.checkMove = function() { if (_root.autoMove == 1) { if (_root.vertMove != 1) { _root.autoMove = 2; } } if (_root.autoMove == 2) { if (_root.horMove != 1) { _root.autoMove = 3; } } if (_root.autoMove == 3) { if (_root.vertMove != 1) { _root.autoMove = 4; } } if (_root.autoMove == 4) { if (_root.horMove != 1) { _root.autoMove = 1; } } }; MovieClip.prototype.replaceTxt = function(inputText, searchString, replaceString) { iText = inputText; eText = ""; lastInd = 0; while (iText.indexOf(searchString, lastInd)>-1) { eText = eText+iText.substr(lastInd, iText.indexOf(searchString, lastInd)-lastInd)+replaceString; lastInd = iText.indexOf(searchString, lastInd)+searchString.length; } eText = eText+iText.substr(lastInd, iText.length-lastInd); return eText; }; MovieClip.prototype.zoomIn = function() { if (_root.zoomFactor<=_root.maxzoom) { _root.zoomFactor = _root.zoomFactor*1.2; _root.canZoomChanged = true; _root.canZoomOut = true; setZoom(); } else { _root.canZoomChanged = true; _root.canZoomIn = false; } }; MovieClip.prototype.zoomOut = function() { if (_root.zoomFactor>=_root.minzoom) { _root.zoomFactor = _root.zoomFactor/1.2; _root.canZoomChanged = true; _root.canZoomIn = true; setZoom(); } else { _root.canZoomChanged = true; _root.canZoomOut = false; } }; MovieClip.prototype.zoomZero = function() { _root.zoomFactor = 100; _root.canZoomChanged = true; _root.canZoomIn = true; _root.canZoomOut = true; setZoom(); }; MovieClip.prototype.determineZoomFactor = function() { _root.zoomFactor = 100; if (this._height>_root.fitH || this._width>_root.fitW) { while (this._height>_root.fitH || this._width>_root.fitW) { _root.zoomFactor -= 1; this._xscale = _root.zoomFactor; this._yscale = _root.zoomFactor; } } else if (this._height<_root.fitH || this._width<_root.fitW) { while (this._height<_root.fitH || this._width<_root.fitW) { _root.zoomFactor += 1; this._xscale = _root.zoomFactor; this._yscale = _root.zoomFactor; } } }; MovieClip.prototype.prevMusic = function() { num = _root.curMusic; num2 = _root.musicname.length; if (num2>0) { if (num == 0) { num = num2-1; } else { num -= 1; } _root.curMusic = num; _root.workarea.attachMovie("loader_music", "loader_music", 225); _root.workarea.applySize(); _root.music_mc = new Sound(); mname = getCurrentPath()+_root.musicname[num]; _root.music_mc.loadSound(mname, false); } }; MovieClip.prototype.nextMusic = function() { num = _root.curMusic; num2 = _root.musicname.length; if (num2>0) { if (num == num2-1) { num = 0; } else { num += 1; } _root.curMusic = num; _root.workarea.attachMovie("loader_music", "loader_music", 225); _root.workarea.applySize(); _root.music_mc = new Sound(); mname = getCurrentPath()+_root.musicname[num]; _root.music_mc.loadSound(mname, false); } }; MovieClip.prototype.setZoom = function() { if (_root.delaymode>0) { _root.delaySchimbat = _root.delaymode; _root.delaymode = -_root.delaymode; } fitImage(); fitImage2(); createImageMenu(); _root.workarea.panner.resizePanner(); checkScroll(); }; MovieClip.prototype.removeChars = function(strn, code) { s = String.fromCharCode(code); li = 0; rs = ""; while (strn.indexOf(s, li)>0) { ci = strn.indexOf(s, li); rs += strn.substring(li, ci); li = ci+1; } if (li