les dejo el codigo a ver si me pueden ayudar... MUCHAS GRACIAS!
package main_fla
{
import adobe.utils.*;
import caurina.transitions.*;
import caurina.transitions.properties.*;
import com.ui.*;
import flash.accessibility.*;
import flash.display.*;
import flash.errors.*;
import flash.events.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
import flash.net.URLRequest.*;
import flash.net.URLLoader;
import flash.events.MouseEvent;
public dynamic class MainTimeline extends flash.display.MovieClip
{
public function OpenUrl()
{
URLRequest("http://www.greenzap.com.ar/");
}
public function MainTimeline()
{
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
return;
}
public function openNewImage(arg1:uint):*
{
var loc1:*=null;
loaderImage.unload();
loc1 = arrayImgs[arg1];
loaderImage.load(new flash.net.URLRequest(loc1));
return;
}
public function fullscreenMode(arg1:flash.events.MouseEvent):void
{
stage.displayState = _fullscr ? flash.display.StageDisplayState.NORMAL : flash.display.StageDisplayState.FULL_SCREEN;
_fullscr = !_fullscr;
return;
}
public function setSizeScroll():void
{
var loc1:*=null;
loc1 = _menuContainer.getChildByName("btn1") as flash.display.MovieClip;
scrollW = Math.floor(_menuContainer.x + loc1.width - 30);
_txtPage.width = scrollW;
return;
}
public function onComplete(arg1:flash.events.Event):void
{
var evt:flash.events.Event;
var loc1:*;
evt = arg1;
try
{
dataGall = new XML(evt.target.data);
loaderXML.removeEventListener(flash.events.Event.COMPLETE, onComplete);
loaderXML.removeEventListener(flash.events.ProgressEvent.PROGRESS, progressLoaded);
parsDataGall();
gallCategory(0);
nextFrame();
}
catch (err:TypeError)
{
trace("Could not parse loaded content as XML:\n" + undefined.message);
}
return;
}
public function openThumbs(arg1:uint):void
{
var loc1:*=0;
var loc2:*=NaN;
var loc3:*=NaN;
var loc4:*=null;
var loc5:*=0;
var loc6:*=null;
var loc7:*=0;
openThumbFlag = true;
activeGallBtn = _gallmenuContainer.getChildByName("btnGall" + numGallery) as flash.display.MovieClip;
loc1 = 10;
loc2 = numGallery + 1;
while (loc2 <= arrayGallName.length)
{
loc4 = _gallmenuContainer.getChildByName("btnGall" + loc2) as flash.display.MovieClip;
loc5 = arrGallThumbsY[loc2] + thumbSize + loc1;
caurina.transitions.Tweener.addTween(loc4, {"y":loc5, "time":0.6});
loc2 = (loc2 + 1);
}
loc3 = numGallery;
while (loc3 > 0)
{
loc6 = _gallmenuContainer.getChildByName("btnGall" + loc3) as flash.display.MovieClip;
loc7 = arrGallThumbsY[loc3];
caurina.transitions.Tweener.addTween(loc6, {"y":loc7, "time":0.6});
loc3 = (loc3 - 1);
}
_newThumbsX = 0;
_thumbsContainer.x = _newThumbsX;
_thumbsContainer.y = arrGallThumbsY[numGallery] + activeGallBtn.height + loc1 / 2;
_gallmenuContainer.addChild(_thumbsContainer);
gallCategory((numGallery - 1));
createThumbs();
if (arrayThumbs.length > countVisblThumbs)
{
scrollThumbFlag = true;
createScrollThumbs();
}
return;
}
public function rollOutBottCtrl(arg1:flash.events.MouseEvent):void
{
caurina.transitions.Tweener.addTween(arg1.target, {"_filter":_objFilterStart, "time":1});
removeToolTip();
return;
}
public function rollOverMenuBtn(arg1:flash.events.MouseEvent):void
{
if (numPage != arg1.target.index)
{
caurina.transitions.Tweener.addTween(arg1.target._line, {"width":3, "time":1});
caurina.transitions.Tweener.addTween(arg1.target._txt, {"_filter":_objFilterEnd, "time":1});
}
return;
}
public function infoChangeText():*
{
var loc1:*=null;
loc1 = controlBar.getChildByName("scrollInfo") as com.ui.Scroll;
_txt.htmlText = arrayTitles[numActivImage] + "<br>" + arrayDescr[numActivImage];
loc1.resizeScroll(infoW, infoH);
loc1.setButtonsPosition(infoW - 40, infoH, infoW - 25, infoH);
return;
}
public function moving(arg1:flash.events.Event):void
{
galleryImage.x = galleryImage.x + (_newImX + galleryImage.width / 2 - galleryImage.x) / _speedIm;
galleryImage.y = galleryImage.y + (_newImY + galleryImage.height / 2 - galleryImage.y) / _speedIm;
return;
}
public function gallMenu():void
{
var loc1:*=NaN;
var loc2:*=null;
loc1 = 1;
while (loc1 <= arrayGallName.length)
{
loc2 = new mcBtnGall();
loc2.index = loc1;
loc2.name = "btnGall" + loc1;
loc2.y = Math.ceil(loc2.height * (loc1 - 1));
arrGallThumbsY[loc1] = loc2.y;
loc2._txt.text = arrayGallName[(loc1 - 1)];
loc2._txt.mouseEnabled = false;
loc2.buttonMode = true;
_gallmenuContainer.addChild(loc2);
loc2.addEventListener(flash.events.MouseEvent.ROLL_OVER, rollOverGallBtn);
loc2.addEventListener(flash.events.MouseEvent.ROLL_OUT, rollOutGallBtn);
loc2.addEventListener(flash.events.MouseEvent.CLICK, clickGallBtn);
loc1 = (loc1 + 1);
}
gallMenuH = _gallmenuContainer.height;
return;
}
public function progressHandler(arg1:flash.events.ProgressEvent):void
{
var loc1:*=NaN;
loc1 = Math.round(arg1.bytesLoaded / arg1.bytesTotal * 100);
_txtLoadInfo.text = "CARGADO SONIDO " + loc1 + "%";
return;
}
public function addToolTip(arg1:String):*
{
_txtTip.text = arg1;
_rectTip.width = _txtTip.width;
_rectTip.height = _txtTip.height;
_toolTip.addChild(_rectTip);
_toolTip.addChild(_txtTip);
_toolTip.x = mouseX - _toolTip.width - 10;
_toolTip.y = mouseY - 10;
addChild(_toolTip);
stage.addEventListener(flash.events.MouseEvent.MOUSE_MOVE, showToolTip);
return;
}
function frame3():*
{
_sound = new flash.media.Sound();
req = new flash.net.URLRequest("music/track.mp3");
_sound.addEventListener(flash.events.Event.COMPLETE, completeHandler);
_sound.addEventListener(flash.events.IOErrorEvent.IO_ERROR, ioErrorHandler);
_sound.addEventListener(flash.events.ProgressEvent.PROGRESS, progressHandler);
_sound.load(req);
stop();
return;
}
function frame4():*
{
caurina.transitions.properties.ColorShortcuts.init();
firstImage = true;
galleryImage = new flash.display.MovieClip();
galleryImage.x = stage.stageWidth / 2;
galleryImage.y = stage.stageHeight / 2;
fill = "fill";
fit = "fit";
imageModeView = fill;
_mcLineLoadImage = new mcLine();
_lineY = barH + 1;
addChild(_mcLineLoadImage);
loaderImage = new flash.display.Loader();
loaderImage.contentLoaderInfo.addEventListener(flash.events.ProgressEvent.PROGRESS, progressLoadImage);
loaderImage.contentLoaderInfo.addEventListener(flash.events.Event.OPEN, onOpenLoadImage);
loaderImage.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, onCompleteLoadImage);
loaderImage.contentLoaderInfo.addEventListener(flash.events.Event.INIT, onInitLoadImage);
loaderImage.load(new flash.net.URLRequest(defImage));
_speedIm = 20;
stage.addEventListener(flash.events.Event.RESIZE, onResizeStageLoading);
stop();
return;
}
public function ioErrorHandler(arg1:flash.events.Event):void
{
trace("ioErrorHandler: " + arg1);
return;
}
function frame6():*
{
caurina.transitions.properties.ColorShortcuts.init();
caurina.transitions.properties.FilterShortcuts.init();
color = 16777215;
alphaStart = 0;
alphaEnd = 0.6;
blurX = 6;
blurY = 6;
strength = 2;
quality = 3;
inner = false;
knockout = false;
_objFilterStart = new flash.filters.GlowFilter(color, alphaStart, blurX, blurY, strength, quality, inner, knockout);
_objFilterEnd = new flash.filters.GlowFilter(color, alphaEnd, blurX, blurY, strength, quality, inner, knockout);
barMinH = 30;
barMaxH = 260;
currentBarPos = barMinH;
_btnCloseMenuBar = new arrCloseBar();
removeChild(_mcLine);
removeChild(_siteTitle);
menuBar = new flash.display.Sprite();
menuBar.y = stage.stageHeight - currentBarPos;
addChild(menuBar);
_bgrBarMenu = new mcBgrBar();
_bgrBarMenu.width = stage.stageWidth;
_bgrBarMenu.height = barMaxH;
_bgrBarMenu.alpha = 0.7;
menuBar.addChild(_bgrBarMenu);
_btnCloseMenuBar.x = stage.stageWidth - _btnCloseMenuBar.width;
_btnCloseMenuBar.buttonMode = true;
_btnCloseMenuBar.visible = false;
menuBar.addChild(_btnCloseMenuBar);
_btnCloseMenuBar.addEventListener(flash.events.MouseEvent.CLICK, clickTitle);
_btnCloseMenuBar.addEventListener(flash.events.MouseEvent.ROLL_OVER, rollOverBtnClose);
_btnCloseMenuBar.addEventListener(flash.events.MouseEvent.ROLL_OUT, rollOutBtnClose);
_mcLine.y = 0;
_mcLine.width = stage.stageWidth;
menuBar.addChild(_mcLine);
bottControlBar = new flash.display.Sprite();
_btnAutoplay = new btnAutoplay();
_btnMusic = new btnMusic();
_btnFullscr = new btnFullscr();
addChild(bottControlBar);
bottControlBar.addChild(_btnAutoplay);
bottControlBar.addChild(_btnMusic);
bottControlBar.addChild(_btnFullscr);
_btnMusic.x = _btnMusic.width;
_btnFullscr.x = _btnFullscr.width * 2;
bottControlBar.x = stage.stageWidth - bottControlBar.width - titleSiteStartX;
bottControlBar.y = stage.stageHeight - barMinH;
_siteTitle.y = titleSiteStartY;
menuBar.addChild(_siteTitle);
_siteTitle.buttonMode = true;
_siteTitle.addEventListener(flash.events.MouseEvent.CLICK, clickTitle);
_copyright = new mcCopyright();
_copyright.x = titleSiteStartX;
_copyright.y = stage.stageHeight - _copyright.height * 2;
addChild(_copyright);
_copyright.alpha = 0;
arrMenu = new Array(" QUIENES SOMOS ", " PORTFOLIO ", " CONTACTO ", "VIDEO");
pageAboutData = "data/about.txt";
_menuContainer = new flash.display.Sprite();
arrButtonNameX = [];
numPage = 0;
mainMenuW = 0;
menuBar.addChild(_menuContainer);
mainMenu();
_gallmenuContainer = new flash.display.Sprite();
arrGallThumbsY = new Array();
numGallery = 0;
gallMenu();
_thumbsContainer = new flash.display.MovieClip();
firstThumbsOpening = true;
thumbSize = 42;
_deltaThumb = 2;
countVisblThumbs = 8;
_newThumbsX = 0;
thumbMaskW = countVisblThumbs * thumbSize + _deltaThumb * (countVisblThumbs - 1);
thumbMask = new flash.display.Sprite();
_btnNext = new mcArr();
_btnPrev = new mcArr();
scrollThumbFlag = false;
openThumbFlag = false;
_gallmenuContainer.addChild(thumbMask);
_gallmenuContainer.addChild(_btnNext);
_gallmenuContainer.addChild(_btnPrev);
thumbMask.visible = false;
_btnNext.visible = false;
_btnPrev.visible = false;
decelerationScroll = 4;
coeffMouseStep = 2;
btnStep = 4;
_scrollContent = new flash.display.MovieClip();
_txtPage = new flash.text.TextField();
_txtPage.name = "_txtPage";
_txtPage.autoSize = flash.text.TextFieldAutoSize.LEFT;
_txtPage.multiline = true;
_txtPage.wordWrap = true;
_txtPage.embedFonts = true;
formatTxtPage = new flash.text.TextFormat();
formatTxtPage.font = "standard 07_56";
formatTxtPage.color = 16777215;
formatTxtPage.size = 8;
_txtPage.defaultTextFormat = formatTxtPage;
scrollX = titleSiteStartX;
scrollY = barMinH + titleSiteStartX;
scrollH = barMaxH - scrollY - 55;
_sendFormPage = new mcSendForm();
controlBar = new flash.display.Sprite();
_bgrCtrlBar = new mcBgrBar();
_mcLineCtrlBar = new mcLine();
controlBarH = barH;
areaBarH = 100;
_areaCtrlBar = new flash.display.MovieClip();
_areaCtrlBar.name = "_areaCtrlBar";
_areaCtrlBar.graphics.beginFill(0);
_areaCtrlBar.graphics.drawRect(0, 0, stage.stageWidth, areaBarH);
_areaCtrlBar.graphics.endFill();
addChild(_areaCtrlBar);
_areaCtrlBar.visible = false;
_btnPrevIm = new btnPrev();
_btnNextIm = new btnNext();
controlsContainer = new flash.display.Sprite();
totalControls = 4;
infoFlag = false;
_txtContainer = new flash.display.MovieClip();
_txt = new flash.text.TextField();
_txt.name = "_txt";
_txt.autoSize = flash.text.TextFieldAutoSize.LEFT;
_txt.multiline = true;
_txt.wordWrap = true;
_txt.embedFonts = true;
_formatTxt = new flash.text.TextFormat();
_formatTxt.font = "standard 07_56";
_formatTxt.size = 8;
_formatTxt.color = 16777215;
_txt.defaultTextFormat = _formatTxt;
infoH = 26;
_stepZoom = 0.1;
panImageFlag = false;
_bgrCtrlBar.width = stage.stageWidth;
_bgrCtrlBar.height = controlBarH;
_bgrCtrlBar.alpha = 0.7;
controlBar.addChild(_bgrCtrlBar);
_mcLineCtrlBar.y = controlBarH;
_mcLineCtrlBar.width = stage.stageWidth;
controlBar.addChild(_mcLineCtrlBar);
controlBar.y = -controlBar.height;
addChild(controlBar);
_btnPrevIm.x = titleSiteStartX;
_btnNextIm.x = stage.stageWidth - _btnNextIm.width - titleSiteStartX;
_btnPrevIm.buttonMode = true;
_btnNextIm.buttonMode = true;
controlBar.addChild(_btnPrevIm);
controlBar.addChild(_btnNextIm);
_btnPrevIm.addEventListener(flash.events.MouseEvent.ROLL_OVER, rollOverNextIm);
_btnPrevIm.addEventListener(flash.events.MouseEvent.ROLL_OUT, rollOutNextIm);
_btnNextIm.addEventListener(flash.events.MouseEvent.ROLL_OVER, rollOverNextIm);
_btnNextIm.addEventListener(flash.events.MouseEvent.ROLL_OUT, rollOutNextIm);
_btnPrevIm.addEventListener(flash.events.MouseEvent.CLICK, onClickPrevIm);
_btnNextIm.addEventListener(flash.events.MouseEvent.CLICK, onClickNextIm);
createControls();
disableControls();
stage.addEventListener(flash.events.Event.ENTER_FRAME, openCtrlBar);
_btnAutoplay.buttonMode = true;
_btnAutoplay.name = "reproducir";
delaySec = 4;
_timer = new flash.utils.Timer(delaySec * 1000);
_btnAutoplay.addEventListener(flash.events.MouseEvent.CLICK, autoplay);
_btnAutoplay.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
soundFlag = true;
_btnMusic.buttonMode = true;
_btnMusic.name = "sonido";
_song = _sound.play(0, 9999);
_btnMusic.addEventListener(flash.events.MouseEvent.CLICK, musicOnOff);
_btnMusic.addEventListener(flash.events.MouseEvent.ROLL_OVER, rollOverBottCtrl);
_btnMusic.addEventListener(flash.events.MouseEvent.ROLL_OUT, rollOutBottCtrl);
_fullscr = false;
_btnFullscr.buttonMode = true;
_btnFullscr.name = "imagen completa";
_btnFullscr.addEventListener(flash.events.MouseEvent.CLICK, fullscreenMode);
_btnFullscr.addEventListener(flash.events.MouseEvent.ROLL_OVER, rollOverBottCtrl);
_btnFullscr.addEventListener(flash.events.MouseEvent.ROLL_OUT, rollOutBottCtrl);
stage.addEventListener(flash.events.Event.RESIZE, onResizeStage);
stop();
return;
}
public function sendForm():void
{
_sendFormPage.gotoAndStop(1);
_sendFormPage.y = scrollY;
_sendFormPage.x = arrButtonNameX[numPage];
_menuContainer.addChild(_sendFormPage);
return;
}
public function onClickThumb(arg1:flash.events.MouseEvent):void
{
numActivImage = (arg1.target.parent.index - 1);
openNewImage(numActivImage);
if (infoFlag)
{
infoChangeText();
}
return;
}
public function progressLoadImage(arg1:flash.events.ProgressEvent):void
{
var loc1:*=NaN;
loc1 = Math.round(arg1.bytesLoaded / arg1.bytesTotal * 100);
_txtLoadInfo.text = "CARGANDO IMAGEN" + loc1 + "%";
_mcLineLoadImage.width = loc1 * stage.stageWidth / 100;
if (infoFlag)
{
_mcLineLoadImage.y = 91;
_txtLoadInfo.y = 94;
}
else
{
_mcLineLoadImage.y = _lineY;
_txtLoadInfo.y = _lineY + 4;
}
return;
}
function frame1():*
{
stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
stage.align = flash.display.StageAlign.TOP_LEFT;
stage.showDefaultContextMenu = false;
bgrImage = new flash.display.Sprite();
bgrImage.name = "bgrImage";
addChild(bgrImage);
bgrImageLoad = new flash.display.Sprite();
bgrImageLoad.name = "bgrImageLoad";
addChild(bgrImageLoad);
titleSiteStartX = 18;
titleSiteStartY = 5;
_siteTitle = new mcSiteTitle();
_siteTitle.x = titleSiteStartX;
_siteTitle.y = titleSiteStartY;
addChild(_siteTitle);
barH = 30;
_txtLoadInfo = new flash.text.TextField();
_txtLoadInfo.name = "_txtLoadInfo";
_txtLoadInfo.autoSize = flash.text.TextFieldAutoSize.LEFT;
_txtLoadInfo.x = titleSiteStartX;
_txtLoadInfo.y = 35;
formatTxt = new flash.text.TextFormat();
formatTxt.font = "Tahoma";
formatTxt.color = 16777215;
formatTxt.size = 10;
_txtLoadInfo.defaultTextFormat = formatTxt;
addChild(_txtLoadInfo);
_mcLine = new mcLine();
_mcLine.y = barH;
_mcLine.width = 1;
addChild(_mcLine);
progressLoading();
stop();
return;
}
function frame2():*
{
arrayGallName = new Array();
arrayGallPath = new Array();
arrayImgs = new Array();
arrayBigImgs = new Array();
arrayThumbs = new Array();
arrayTitles = new Array();
arrayBuyLink = new Array();
arrayBuy = new Array();
arrayFullsize = new Array();
arrayDescr = new Array();
loaderXML = new flash.net.URLLoader();
loaderXML.addEventListener(flash.events.Event.COMPLETE, onComplete, false, 0, true);
loaderXML.addEventListener(flash.events.ProgressEvent.PROGRESS, progressLoaded, false, 0, true);
loaderXML.load(new flash.net.URLRequest("data/cgal.xml"));
stop();
return;
}
public function rollOutNextIm(arg1:flash.events.MouseEvent):void
{
caurina.transitions.Tweener.addTween(arg1.target, {"_filter":_objFilterStart, "time":1});
return;
}
public function progressLoaded(arg1:flash.events.ProgressEvent):void
{
var loc1:*=NaN;
loc1 = Math.round(arg1.bytesLoaded / arg1.bytesTotal * 100);
_txtLoadInfo.text = "CARGANDO GALERIA " + loc1 + "%";
return;
}
function frame5():*
{
titleSiteEndX = titleSiteStartX;
titleSiteEndY = stage.stageHeight - _siteTitle.height;
lineY = stage.stageHeight - barH;
nextFrame();
stop();
return;
}
public function closeCtrlBar(arg1:flash.events.Event):void
{
if (_areaCtrlBar.hitTestPoint(mouseX, mouseY))
{
stage.removeEventListener(flash.events.Event.ENTER_FRAME, closeCtrlBar);
caurina.transitions.Tweener.addTween(controlBar, {"y":-controlBar.height, "time":1});
_areaCtrlBar.y = 0;
_areaCtrlBar.height = areaBarH;
stage.addEventListener(flash.events.Event.ENTER_FRAME, openCtrlBar);
}
return;
}
public function closePage(arg1:Number):void
{
var loc1:*=null;
var loc2:*=NaN;
var loc3:*=null;
var loc4:*=arg1;
switch (loc4)
{
case 1:
{
removeScrollText(menuBar, "scrollTextPage");
break;
}
case 2:
{
if (numGallery != 0)
{
loc1 = _gallmenuContainer.getChildByName("btnGall" + numGallery) as flash.display.MovieClip;
caurina.transitions.Tweener.addTween(loc1._txt, {"_filter":_objFilterStart, "time":1});
caurina.transitions.Tweener.addTween(loc1._dot, {"_filter":_objFilterStart, "time":1});
}
numGallery = 0;
if (openThumbFlag)
{
closeThumbs();
}
loc2 = 1;
while (loc2 <= arrayGallName.length)
{
(loc3 = _gallmenuContainer.getChildByName("btnGall" + loc2) as flash.display.MovieClip).y = arrGallThumbsY[loc2];
loc2 = (loc2 + 1);
}
removeGallMenu();
break;
}
case 3:
{
removeSendForm();
break;
}
}
return;
}
public function onTimer(arg1:flash.events.TimerEvent):void
{
_timer.stop();
var loc1:*;
numActivImage++;
if (numActivImage > (arrayImgs.length - 1))
{
numActivImage = 0;
}
openNewImage(numActivImage);
disableControls();
return;
}
public function parsDataGall():void
{
var loc1:*=0;
var loc2:*=0;
var loc3:*=null;
loc1 = dataGall.gallery.length();
loc2 = 0;
while (loc2 < loc1)
{
loc3 = dataGall.gallery[loc2].attributes();
arrayGallName[loc2] = loc3[1];
arrayGallPath[loc2] = loc3[2];
loc2 = (loc2 + 1);
}
return;
}
public function openGallMenu():void
{
_gallmenuContainer.x = arrButtonNameX[numPage];
_gallmenuContainer.y = barMinH;
_menuContainer.addChild(_gallmenuContainer);
return;
}
public function removeGallMenu():void
{
_menuContainer.removeChild(_gallmenuContainer);
return;
}
public function removeSendForm():void
{
_menuContainer.removeChild(_sendFormPage);
return;
}
public function rollOverControl(arg1:flash.events.MouseEvent):void
{
var loc1:*=null;
if (arg1.target.index == 9)
{
arg1.target._btn9.mouseEnabled = false;
}
caurina.transitions.Tweener.addTween(arg1.target, {"_filter":_objFilterEnd, "time":1});
loc1 = arrNameToolTips[(arg1.target.index - 1)];
if (arg1.target.index != 10)
{
addToolTip(loc1);
}
else
{
if (lockImageFlag)
{
addToolTip("unlock photo movement");
}
else
{
addToolTip("lock photo movement");
}
}
return;
}
public function removeScrollThumbs():void
{
_thumbsContainer.mask = null;
thumbMask.visible = false;
_btnNext.visible = false;
_btnPrev.visible = false;
return;
}
public function onClickPrevThumbs(arg1:flash.events.MouseEvent):void
{
_newThumbsX = _newThumbsX + thumbSize + _deltaThumb;
if (_newThumbsX <= 0)
{
caurina.transitions.Tweener.addTween(_thumbsContainer, {"x":_newThumbsX, "time":1});
}
else
{
_newThumbsX = 0;
}
return;
}
public function removeScrollText(arg1:flash.display.Sprite, arg2:String):void
{
var loc1:*=null;
loc1 = arg1.getChildByName(arg2) as com.ui.Scroll;
loc1.removeScroll();
arg1.removeChild(loc1);
loc1 = null;
return;
}
public function onInitLoadImage(arg1:flash.events.Event):void
{
var loc1:*=null;
var loc2:*=null;
var loc3:*=null;
var loc4:*=null;
if (!firstImage)
{
galleryImage.removeChildAt(0);
}
var loc5:*;
galleryImage.scaleY = loc5 = 1;
galleryImage.scaleX = loc5;
loc1 = flash.display.Bitmap(loaderImage.content);
loc2 = new flash.display.BitmapData(loc1.width, loc1.height, false, 4294967295);
loc2.draw(loaderImage, new flash.geom.Matrix());
(loc3 = new flash.display.Bitmap(loc2)).smoothing = true;
loc3.x = (-loc3.width) / 2;
loc3.y = (-loc3.height) / 2;
galleryImage.addChildAt(loc3, 0);
bgrImage.addChild(galleryImage);
galleryImage.name = "galleryImage";
imRealWidth = galleryImage.width;
imRealHeight = galleryImage.height;
galleryImage.x = stage.stageWidth / 2;
galleryImage.y = stage.stageHeight / 2;
galleryImage.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, -255, -255, -255, 0);
loc4 = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
caurina.transitions.Tweener.addTween(galleryImage, {"_colorTransform":loc4, "time":4});
if (imageModeView == fill)
{
fillImage(galleryImage);
}
if (imageModeView == fit)
{
fitImage(galleryImage);
}
if (autoplayFlag)
{
_timer.start();
}
if (firstImage)
{
nextFrame();
}
firstImage = false;
return;
}
public function onOpenLoadImage(arg1:flash.events.Event):void
{
_txtLoadInfo.visible = true;
_mcLineLoadImage.width = 1;
caurina.transitions.Tweener.addTween(_mcLineLoadImage, {"alpha":1, "time":1});
return;
}
public function infoImage():void
{
var loc1:*=null;
if (infoFlag)
{
removeScrollText(controlBar, "scrollInfo");
caurina.transitions.Tweener.addTween(_bgrCtrlBar, {"height":controlBarH, "time":1});
caurina.transitions.Tweener.addTween(_mcLineCtrlBar, {"y":controlBarH, "time":1});
infoFlag = false;
}
else
{
infoW = stage.stageWidth - titleSiteStartX * 2;
_txt.width = infoW;
_txt.htmlText = arrayTitles[numActivImage] + "<br>" + arrayDescr[numActivImage];
_txtContainer.addChild(_txt);
loc1 = new com.ui.Scroll(stage, _txtContainer, infoW, infoH, decelerationScroll, coeffMouseStep, btnStep);
loc1.name = "scrollInfo";
loc1.activateScroll();
loc1.x = Math.round((stage.stageWidth - infoW) / 2);
loc1.y = controlBarH + 5;
loc1.hideDragarea();
loc1.hideDragger();
loc1.setButtonsPosition(infoW - 40, infoH, infoW - 25, infoH);
controlBar.addChild(loc1);
caurina.transitions.Tweener.addTween(_bgrCtrlBar, {"height":areaBarH - 10, "time":1});
caurina.transitions.Tweener.addTween(_mcLineCtrlBar, {"y":areaBarH - 10, "time":1});
infoFlag = true;
}
return;
}
public function rollOutGallBtn(arg1:flash.events.MouseEvent):void
{
if (numGallery != arg1.target.index)
{
caurina.transitions.Tweener.addTween(arg1.target._txt, {"_filter":_objFilterStart, "time":1});
caurina.transitions.Tweener.addTween(arg1.target._dot, {"_filter":_objFilterStart, "time":1});
}
return;
}
public function resetImage():void
{
if (imageModeView == fill && !lockImageFlag)
{
startMoveImage();
}
galleryImage.removeEventListener(flash.events.MouseEvent.MOUSE_DOWN, onStartDragImage);
galleryImage.removeEventListener(flash.events.MouseEvent.MOUSE_UP, onStopDragImage);
panImageFlag = false;
if (imageModeView == fill)
{
fillImage(galleryImage);
}
if (imageModeView == fit)
{
fitImage(galleryImage);
}
return;
}
public function rollOverThumb(arg1:flash.events.MouseEvent):void
{
var loc1:*=null;
loc1 = arg1.target.getChildByName("_bgrThumb") as flash.display.MovieClip;
caurina.transitions.Tweener.addTween(loc1, {"_color":16777215, "time":1});
caurina.transitions.Tweener.addTween(loc1, {"height":44, "width":44, "x":-1, "y":-1, "time":1});
return;
}
public function endMoveImage():void
{
stage.removeEventListener(flash.events.MouseEvent.MOUSE_MOVE, imageMove);
stage.removeEventListener(flash.events.Event.ENTER_FRAME, moving);
return;
}
public function autoplay(arg1:flash.events.MouseEvent):void
{
if (autoplayFlag)
{
autoplayFlag = false;
_timer.stop();
_timer.removeEventListener("timer", onTimer);
}
else
{
autoplayFlag = true;
_timer.addEventListener("timer", onTimer);
_timer.start();
}
return;
}
public function closeThumbs():void
{
caurina.transitions.Tweener.removeTweens(_thumbsContainer);
if (scrollThumbFlag)
{
removeScrollThumbs();
scrollThumbFlag = false;
}
removeThumbs();
_gallmenuContainer.removeChild(_thumbsContainer);
openThumbFlag = false;
return;
}
public function createThumbs():void
{
var loc1:*=NaN;
var loc2:*=null;
var loc3:*=null;
loc1 = 1;
while (loc1 <= arrayThumbs.length)
{
loc2 = new flash.display.MovieClip();
loc2.index = loc1;
loc2.name = "thumb" + loc1;
loc3 = new flash.display.MovieClip();
loc3.name = "_bgrThumb";
loc3.graphics.beginFill(0);
loc3.graphics.drawRect(0, 0, thumbSize, thumbSize);
loc3.graphics.endFill();
loc3.alpha = 0;
loc2.addChild(loc3);
loc2.x = (loc2.width + _deltaThumb) * (loc1 - 1);
loc2.buttonMode = true;
_thumbsContainer.addChild(loc2);
caurina.transitions.Tweener.addTween(loc3, {"alpha":1, "time":1});
loadThumbImage(loc2, arrayThumbs[(loc1 - 1)]);
loc2.addEventListener(flash.events.MouseEvent.ROLL_OVER, rollOverThumb);
loc2.addEventListener(flash.events.MouseEvent.ROLL_OUT, rollOutThumb);
loc2.addEventListener(flash.events.MouseEvent.CLICK, onClickThumb);
loc1 = (loc1 + 1);
}
return;
}
public function clickGallBtn(arg1:flash.events.MouseEvent):void
{
var loc1:*=null;
if (numGallery != arg1.target.index)
{
if (numGallery != 0)
{
loc1 = _gallmenuContainer.getChildByName("btnGall" + numGallery) as flash.display.MovieClip;
caurina.transitions.Tweener.addTween(loc1._txt, {"_filter":_objFilterStart, "time":1});
caurina.transitions.Tweener.addTween(loc1._dot, {"_filter":_objFilterStart, "time":1});
}
numGallery = arg1.target.index;
currentBarPos = gallMenuH + barMinH * 2 + thumbSize;
caurina.transitions.Tweener.addTween(menuBar, {"y":stage.stageHeight - currentBarPos, "time":1});
if (openThumbFlag)
{
closeThumbs();
}
openThumbs(numGallery);
}
return;
}
public function fillImage(arg1:flash.display.MovieClip):void
{
var loc1:*=NaN;
var loc2:*=NaN;
var loc3:*=NaN;
loc1 = stage.stageWidth / imRealWidth;
loc2 = stage.stageWidth / 2;
loc3 = stage.stageHeight / 2;
_deltaImX = stage.stageWidth - imRealWidth * loc1;
_deltaImY = stage.stageHeight - imRealHeight * loc1;
caurina.transitions.Tweener.addTween(arg1, {"scaleX":loc1, "scaleY":loc1, "x":loc2, "y":loc3, "time":1, "onComplete":startMoveImage});
return;
}
public function createScrollThumbs():void
{
thumbMask.name = "thumbMask";
thumbMask.graphics.beginFill(6736896);
thumbMask.graphics.drawRect(-1, (_thumbsContainer.y - 1), thumbMaskW + 1, thumbSize + 2);
thumbMask.graphics.endFill();
_thumbsContainer.mask = thumbMask;
_btnNext.x = thumbMask.width + _deltaThumb;
_btnNext.y = _thumbsContainer.y + Math.round((thumbSize - _btnNext.height) / 2);
_btnNext.buttonMode = true;
_btnPrev.x = -_deltaThumb;
_btnPrev.y = _btnNext.y + _btnNext.height;
_btnPrev.rotation = 180;
_btnPrev.buttonMode = true;
thumbMask.visible = true;
_btnNext.visible = true;
_btnPrev.visible = true;
_btnNext.addEventListener(flash.events.MouseEvent.CLICK, onClickNextThumbs);
_btnPrev.addEventListener(flash.events.MouseEvent.CLICK, onClickPrevThumbs);
return;
}
public function rollOverBottCtrl(arg1:flash.events.MouseEvent):void
{
addToolTip(arg1.target.name);
caurina.transitions.Tweener.addTween(arg1.target, {"_filter":_objFilterEnd, "time":1});
return;
}
public function rollOutBtnClose(arg1:flash.events.MouseEvent):void
{
caurina.transitions.Tweener.addTween(arg1.target, {"_filter":_objFilterStart, "time":1});
return;
}
public function clickTitle(arg1:flash.events.MouseEvent):void
{
var loc1:*=null;
if (numPage != 0)
{
loc1 = _menuContainer.getChildByName("btn" + numPage) as flash.display.MovieClip;
caurina.transitions.Tweener.addTween(loc1._line, {"width":1, "time":1});
caurina.transitions.Tweener.addTween(loc1._txt, {"_filter":_objFilterStart, "time":1});
closePage(numPage);
numPage = 0;
currentBarPos = barMinH;
caurina.transitions.Tweener.addTween(menuBar, {"y":stage.stageHeight - currentBarPos, "time":1});
caurina.transitions.Tweener.addTween(_copyright, {"alpha":0, "time":1});
_btnCloseMenuBar.visible = false;
}
return;
}
public function rollOutMenuBtn(arg1:flash.events.MouseEvent):void
{
if (numPage != arg1.target.index)
{
caurina.transitions.Tweener.addTween(arg1.target._line, {"width":1, "time":1});
caurina.transitions.Tweener.addTween(arg1.target._txt, {"_filter":_objFilterStart, "time":1});
}
return;
}
public function disableControls():void
{
var loc1:*=null;
var loc2:*=null;
loc1 = controlsContainer.getChildByName("_control3") as flash.display.MovieClip;
if (arrayFullsize[numActivImage] != 1)
{
loc1.alpha = 0.3;
loc1.buttonMode = false;
loc1.mouseEnabled = false;
}
else
{
loc1.alpha = 1;
loc1.buttonMode = true;
loc1.mouseEnabled = true;
}
loc2 = controlsContainer.getChildByName("_control4") as flash.display.MovieClip;
if (arrayBuy[numActivImage] != 1)
{
loc2.alpha = 0.3;
loc2.buttonMode = false;
loc2.mouseEnabled = false;
}
else
{
loc2.alpha = 1;
loc2.buttonMode = true;
loc2.mouseEnabled = true;
}
return;
}
public function startMoveImage():void
{
if (!lockImageFlag)
{
_newImX = (-mouseX) / stage.stageWidth * (galleryImage.width - stage.stageWidth);
_newImY = (-mouseY) / stage.stageHeight * (galleryImage.height - stage.stageHeight);
stage.addEventListener(flash.events.MouseEvent.MOUSE_MOVE, imageMove);
stage.addEventListener(flash.events.Event.ENTER_FRAME, moving);
}
return;
}
public function rollOverNextIm(arg1:flash.events.MouseEvent):void
{
caurina.transitions.Tweener.addTween(arg1.target, {"_filter":_objFilterEnd, "time":1});
return;
}
public function clickMenuBtn(arg1:flash.events.MouseEvent):void
{
var loc1:*=null;
if (numPage != arg1.target.index)
{
if (numPage != 0)
{
loc1 = _menuContainer.getChildByName("btn" + numPage) as flash.display.MovieClip;
caurina.transitions.Tweener.addTween(loc1._line, {"width":1, "time":1});
caurina.transitions.Tweener.addTween(loc1._txt, {"_filter":_objFilterStart, "time":1});
}
closePage(numPage);
numPage = arg1.target.index;
openPage(numPage);
_btnCloseMenuBar.visible = true;
caurina.transitions.Tweener.addTween(_copyright, {"alpha":1, "time":1});
}
return;
}
public function saveImage():void
{
var loc1:*=null;
loc1 = arrayBigImgs[numActivImage];
flash.net.navigateToURL(new flash.net.URLRequest(loc1), "_blank");
return;
}
public function loaderEnterFrame(arg1:flash.events.Event):void
{
var loc1:*=NaN;
loc1 = Math.round(stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal * 100);
_txtLoadInfo.text = "CARGANDO " + loc1 + "%";
_mcLine.width = loc1 * stage.stageWidth / 100;
if (loc1 == 100)
{
removeEventListener(flash.events.Event.ENTER_FRAME, loaderEnterFrame);
nextFrame();
}
return;
}
public function viewMode(arg1:Object):void
{
var loc1:*=null;
loc1 = controlsContainer.getChildByName("_control" + 10) as flash.display.MovieClip;
if (imageModeView != fill)
{
imageModeView = fill;
arg1.gotoAndStop(1);
fillImage(galleryImage);
startMoveImage();
loc1.visible = true;
}
else
{
imageModeView = fit;
arg1.gotoAndStop(2);
endMoveImage();
fitImage(galleryImage);
loc1.visible = false;
}
return;
}
public function onClickNextThumbs(arg1:flash.events.MouseEvent):void
{
var loc1:*=NaN;
var loc2:*=NaN;
loc1 = arrayThumbs.length * (thumbSize + _deltaThumb) - _deltaThumb;
loc2 = thumbMaskW - loc1;
_newThumbsX = _newThumbsX - (thumbSize + _deltaThumb);
if (_newThumbsX >= loc2)
{
caurina.transitions.Tweener.addTween(_thumbsContainer, {"x":_newThumbsX, "time":1});
}
else
{
_newThumbsX = loc2;
}
return;
}
public function alignMenu():void
{
spaceMenuStartX = _siteTitle.x + _siteTitle.width;
spaceMenuEndX = bottControlBar.x;
deltaSpaceMenu = spaceMenuEndX - spaceMenuStartX;
_menuContainer.x = spaceMenuStartX + Math.ceil((deltaSpaceMenu - mainMenuW) / 2);
return;
}
public function onStartDragImage(arg1:flash.events.MouseEvent):void
{
arg1.target.startDrag();
return;
}
public function showToolTip(arg1:flash.events.MouseEvent):*
{
if (arg1.target.hitTestPoint(mouseX, mouseY))
{
_toolTip.x = mouseX - _toolTip.width - 10;
_toolTip.y = mouseY - 10;
}
arg1.updateAfterEvent();
return;
}
public function progressLoading():void
{
_txtLoadInfo.text = "CARGANDO 0%";
addEventListener(flash.events.Event.ENTER_FRAME, loaderEnterFrame);
return;
}
public function onClickControl(arg1:flash.events.MouseEvent):void
{
var loc1:*=0;
loc1 = arg1.target.index;
var loc2:*=loc1;
switch (loc2)
{
case 1:
{
infoImage();
break;
}
case 2:
{
printImage();
break;
}
case 3:
{
if (arrayFullsize[numActivImage] == 1)
{
saveImage();
}
break;
}
case 4:
{
URLRequest("http://www.greenzap.com.ar/");
break;
}
}
return;
}
public function buyImage():void
{
var loc1:*=null;
loc1 = arrayBuyLink[numActivImage];
flash.net.navigateToURL(new flash.net.URLRequest(loc1), "_blank");
return;
}
public function createTextPage(arg1:String):void
{
var _linkTxt:String;
var loaderPageData:flash.net.URLLoader;
var onCompletePageData:Function;
var progressLoadedPageData:Function;
var loc1:*;
loaderPageData = null;
onCompletePageData = null;
progressLoadedPageData = null;
_linkTxt = arg1;
onCompletePageData = function (arg1:flash.events.Event):void
{
var evt:flash.events.Event;
var scrollTextPage:com.ui.Scroll;
var loc1:*;
scrollTextPage = null;
evt = arg1;
try
{
setSizeScroll();
_txtPage.htmlText = evt.target.data;
_scrollContent.addChild(_txtPage);
scrollTextPage = new com.ui.Scroll(stage, _scrollContent, scrollW, scrollH, decelerationScroll, coeffMouseStep, btnStep);
scrollTextPage.name = "scrollTextPage";
scrollTextPage.activateScroll();
scrollTextPage.x = scrollX;
scrollTextPage.y = scrollY;
scrollTextPage.hideDragarea();
scrollTextPage.hideDragger();
scrollTextPage.setButtonsPosition(scrollW - 40, scrollH, scrollW - 25, scrollH);
menuBar.addChild(scrollTextPage);
loaderPageData.removeEventListener(flash.events.Event.COMPLETE, onCompletePageData);
loaderPageData.removeEventListener(flash.events.ProgressEvent.PROGRESS, progressLoadedPageData);
}
catch (err:TypeError)
{
trace("Could not parse loaded content as XML:\n" + undefined.message);
}
return;
}
progressLoadedPageData = function (arg1:flash.events.ProgressEvent):void
{
var loc1:*=NaN;
loc1 = Math.round(arg1.bytesLoaded / arg1.bytesTotal * 100);
_txtPage.text = "CARGANDO " + loc1 + "%";
return;
}
loaderPageData = new flash.net.URLLoader();
loaderPageData.addEventListener(flash.events.Event.COMPLETE, onCompletePageData, false, 0, true);
loaderPageData.addEventListener(flash.events.ProgressEvent.PROGRESS, progressLoadedPageData, false, 0, true);
loaderPageData.load(new flash.net.URLRequest("data/about.txt"));
return;
}
public function loadThumbImage(arg1:flash.display.MovieClip, arg2:String):*
{
var _loadLineThumb:mcLine;
var _mc:flash.display.MovieClip;
var _thumbName:String;
var loader:flash.display.Loader;
var onInitLoadThumb:Function;
var progressLoadThumb:Function;
var loc1:*;
loader = null;
_loadLineThumb = null;
progressLoadThumb = null;
onInitLoadThumb = null;
_mc = arg1;
_thumbName = arg2;
progressLoadThumb = function (arg1:flash.events.ProgressEvent):void
{
var loc1:*=NaN;
loc1 = Math.round(arg1.bytesLoaded / arg1.bytesTotal * 100);
_loadLineThumb.width = Math.floor(loc1 * thumbSize / 100);
return;
}
onInitLoadThumb = function (arg1:flash.events.Event):void
{
var loc1:*=null;
var loc2:*=null;
var loc3:*=null;
_mc.removeChild(_loadLineThumb);
loc1 = new flash.display.MovieClip();
loc2 = flash.display.Bitmap(loader.content);
loc2.x = 1;
loc2.y = 1;
_mc.addChild(loc2);
loc2.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, 0);
loc3 = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
caurina.transitions.Tweener.addTween(loc2, {"_colorTransform":loc3, "time":3});
return;
}
loader = new flash.display.Loader();
_loadLineThumb = new mcLine();
_loadLineThumb.x = 1;
_loadLineThumb.y = 1;
_loadLineThumb.width = 1;
_loadLineThumb.height = 40;
_mc.addChild(_loadLineThumb);
loader.contentLoaderInfo.addEventListener(flash.events.ProgressEvent.PROGRESS, progressLoadThumb);
loader.contentLoaderInfo.addEventListener(flash.events.Event.INIT, onInitLoadThumb);
loader.load(new flash.net.URLRequest(_thumbName));
return;
}
public function printImage():void
{
var loc1:*=null;
loc1 = new flash.printing.PrintJob();
loc1.start();
loc1.addPage(galleryImage);
loc1.send();
return;
}
public function mainMenu():void
{
var loc1:*=NaN;
var loc2:*=null;
loc1 = 1;
while (loc1 <= arrMenu.length)
{
loc2 = new mcBtnMenu();
loc2.name = "btn" + loc1;
loc2.index = loc1;
loc2.x = loc2.width * (loc1 - 1);
loc2._txt.autoSize = flash.text.TextFieldAutoSize.LEFT;
loc2._txt.text = arrMenu[(loc1 - 1)];
loc2._txt.x = Math.ceil((loc2.width - loc2._txt.width) / 2);
arrButtonNameX[loc1] = loc2.x + loc2._txt.x;
loc2._txt.mouseEnabled = false;
loc2.buttonMode = true;
_menuContainer.addChild(loc2);
mainMenuW = mainMenuW + loc2.width;
loc2.addEventListener(flash.events.MouseEvent.ROLL_OVER, rollOverMenuBtn);
loc2.addEventListener(flash.events.MouseEvent.ROLL_OUT, rollOutMenuBtn);
loc2.addEventListener(flash.events.MouseEvent.CLICK, clickMenuBtn);
loc1 = (loc1 + 1);
}
alignMenu();
return;
}
public function rollOutControl(arg1:flash.events.MouseEvent):void
{
}
public function onCompleteLoadImage(arg1:flash.events.Event):void
{
caurina.transitions.Tweener.addTween(_mcLineLoadImage, {"alpha":0, "time":1});
_txtLoadInfo.visible = false;
return;
}
public function panImage():void
{
if (!panImageFlag)
{
if (!lockImageFlag)
{
endMoveImage();
}
galleryImage.addEventListener(flash.events.MouseEvent.MOUSE_DOWN, onStartDragImage);
galleryImage.addEventListener(flash.events.MouseEvent.MOUSE_UP, onStopDragImage);
panImageFlag = true;
}
return;
}
public function removeToolTip():*
{
stage.removeEventListener(flash.events.MouseEvent.MOUSE_MOVE, showToolTip);
removeChild(_toolTip);
return;
}
public function rollOutThumb(arg1:flash.events.MouseEvent):void
{
var loc1:*=null;
loc1 = arg1.target.getChildByName("_bgrThumb") as flash.display.MovieClip;
caurina.transitions.Tweener.addTween(loc1, {"_color":0, "time":1});
caurina.transitions.Tweener.addTween(loc1, {"height":42, "width":42, "x":0, "y":0, "time":1});
return;
}
public function onResizeStageApp(arg1:flash.events.Event=null):void
{
_mcLine.width = stage.stageWidth;
_mcLine.y = stage.stageHeight - barH;
_siteTitle.y = stage.stageHeight - _siteTitle.height;
fitImage(galleryImage);
return;
}
public function lockImage():void
{
removeToolTip();
if (lockImageFlag)
{
lockImageFlag = false;
startMoveImage();
addToolTip("lock photo movement");
}
else
{
lockImageFlag = true;
endMoveImage();
addToolTip("unlock photo movement");
}
return;
}
public function gallCategory(arg1:uint):void
{
var loc1:*=0;
var loc2:*=0;
var loc3:*=null;
loc1 = dataGall.gallery[arg1].image.length();
arrayImgs = [];
arrayBigImgs = [];
arrayThumbs = [];
arrayTitles = [];
arrayBuyLink = [];
arrayBuy = [];
arrayFullsize = [];
arrayDescr = [];
loc2 = 0;
while (loc2 < loc1)
{
loc3 = dataGall.gallery[arg1].image[loc2].attributes();
arrayImgs[loc2] = arrayGallPath[arg1] + loc3[1];
arrayBigImgs[loc2] = arrayGallPath[arg1] + loc3[2];
arrayThumbs[loc2] = arrayGallPath[arg1] + loc3[3];
arrayTitles[loc2] = loc3[4];
arrayBuyLink[loc2] = loc3[5];
arrayBuy[loc2] = loc3[6];
arrayFullsize[loc2] = loc3[7];
if (loc3[8] == 1)
{
defImage = arrayGallPath[arg1] + loc3[1];
numActivImage = loc2;
}
arrayDescr[loc2] = dataGall.gallery[arg1].image[loc2].description;
loc2 = (loc2 + 1);
}
return;
}
public function onClickPrevIm(arg1:flash.events.MouseEvent):void
{
var loc1:*;
numActivImage--;
if (numActivImage < 0)
{
numActivImage = (arrayImgs.length - 1);
}
openNewImage(numActivImage);
if (infoFlag)
{
infoChangeText();
}
disableControls();
return;
}
public function removeThumbs():void
{
var loc1:*=NaN;
var loc2:*=null;
loc1 = 1;
while (loc1 <= arrayThumbs.length)
{
loc2 = _thumbsContainer.getChildByName("thumb" + loc1) as flash.display.MovieClip;
_thumbsContainer.removeChild(loc2);
loc1 = (loc1 + 1);
}
return;
}
public function rollOverBtnClose(arg1:flash.events.MouseEvent):void
{
caurina.transitions.Tweener.addTween(arg1.target, {"_filter":_objFilterEnd, "time":1});
return;
}
public function onStopDragImage(arg1:flash.events.MouseEvent):void
{
arg1.target.stopDrag();
return;
}
public function onResizeStage(arg1:flash.events.Event):void
{
var loc1:*=null;
var loc2:*=null;
menuBar.y = stage.stageHeight - currentBarPos;
_bgrBarMenu.width = stage.stageWidth;
_mcLine.width = stage.stageWidth;
_copyright.y = stage.stageHeight - _copyright.height * 2;
_btnCloseMenuBar.x = stage.stageWidth - _btnCloseMenuBar.width;
bottControlBar.x = stage.stageWidth - bottControlBar.width - titleSiteStartX;
bottControlBar.y = stage.stageHeight - barMinH;
if (imageModeView == fill)
{
fillImage(galleryImage);
}
if (imageModeView == fit)
{
fitImage(galleryImage);
}
alignMenu();
if (numPage == 1)
{
setSizeScroll();
loc1 = menuBar.getChildByName("scrollTextPage") as com.ui.Scroll;
loc1.resizeScroll(scrollW, scrollH);
loc1.setButtonsPosition(scrollW - 40, scrollH, scrollW - 25, scrollH);
}
_bgrCtrlBar.width = stage.stageWidth;
_mcLineCtrlBar.width = stage.stageWidth;
_areaCtrlBar.width = stage.stageWidth;
_btnNextIm.x = stage.stageWidth - _btnNextIm.width - titleSiteStartX;
controlsContainer.x = Math.round((stage.stageWidth - controlsContainer.width) / 2);
if (infoFlag)
{
infoW = stage.stageWidth - titleSiteStartX * 2;
_txt.width = infoW;
loc2 = controlBar.getChildByName("scrollInfo") as com.ui.Scroll;
loc2.setButtonsPosition(infoW - 40, infoH, infoW - 25, infoH);
}
return;
}
public function onResizeStageLoading(arg1:flash.events.Event):void
{
_mcLine.width = stage.stageWidth;
return;
}
public function zoomOutImage():void
{
var loc1:*=NaN;
if (!lockImageFlag)
{
endMoveImage();
}
loc1 = galleryImage.scaleX - _stepZoom;
if (loc1 > 0)
{
caurina.transitions.Tweener.addTween(galleryImage, {"scaleX":loc1, "scaleY":loc1, "time":1});
}
if (!panImageFlag)
{
caurina.transitions.Tweener.addTween(galleryImage, {"x":stage.stageWidth / 2, "y":stage.stageHeight / 2, "time":1});
}
return;
}
public function onClickNextIm(arg1:flash.events.MouseEvent):void
{
var loc1:*;
numActivImage++;
if (numActivImage > (arrayImgs.length - 1))
{
numActivImage = 0;
}
openNewImage(numActivImage);
if (infoFlag)
{
infoChangeText();
}
disableControls();
return;
}
public function fitImage(arg1:flash.display.MovieClip):void
{
var loc1:*=NaN;
var loc2:*=NaN;
var loc3:*=NaN;
var loc4:*=NaN;
var loc5:*=NaN;
loc4 = stage.stageWidth - arg1.width;
loc5 = stage.stageHeight - arg1.height;
if (loc4 < loc5)
{
loc1 = stage.stageWidth / imRealWidth;
}
else
{
loc1 = stage.stageHeight / imRealHeight;
}
loc2 = stage.stageWidth / 2;
loc3 = stage.stageHeight / 2;
caurina.transitions.Tweener.addTween(arg1, {"scaleX":loc1, "scaleY":loc1, "x":loc2, "y":loc3,