Exibir outra ação
Olá Pessoal!!!
Estou com um probleminha.... seguinte:
Estou editando um site q achei pela net.. e não estou conseguindo fazer certas alterações nele...
entrem no link:
http://www.douglasdaniel.com/01/index.html
Na parte de baixo, tem 3 links: Home - Galeria de Fotos - Contato
Ao clicar em "Galeria de Fotos", ele já abre uma visualização da categoria 1 das fotos.. e no lado esquerdo, tem um botão escrito: "Categorias"
Ao clicar nessa "Categorias" - abre uma outra parte, com 3 quadrados para escolher as categorias: "Decoração" - "Ensaio" - "Publicidade"
Meu problema é o seguinte...
Gostaria q eu ao clicar no link lá em baixo: "Galeria de Fotos", ao invés de entrar naquela primeira parte com as fotinhos, e o botão de categorias do lado,
já entrasse diretamente nessa parte com os 3 quadrado..
Só que estão no mesmo swf... e ñ sei alterar no script...
Vou postar aqui pra vcs... agradeço mt qualquer ajuda!!
import flash.display.*;
//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
timeBar._visible = false;
blackBack._visible = false;
blackBack._alpha = 0;
categoriesAdd._visible = false;
bottomBar.closeCategories._visible = false;
bottomBar.openCategories._visible = true;
bottomBar.btPlay._visible = true;
bottomBar.btStop._visible = false;
contentBox._visible = false;
contentBox._alpha = 0;//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
loadCategoriesXMLFirstTime ();
//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadCategoriesXMLFirstTime () {
var mainCatFirstTime:XML = new XML ();
mainCatFirstTime.ignoreWhite = true;
mainCatFirstTime.onLoad = function (success) {
if (success) {
var xml:XMLNode = this.firstChild;
var categoryTitleFirstTime:String = xml.childNodes[0].childNodes[0].childNodes[0].nodeValue;
newCategoryTitle = categoryTitleFirstTime;
categoryTitleForContent = xml.childNodes[0].childNodes[0].childNodes[0].nodeValue;
displayPositions ();
loadImages ();
}
};
mainCatFirstTime.load ("elite_xml_imagegallery_xml/categories.xml");
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function setCategoriesSize () {
if (isModule == true) {
if (_root.subMenuOpened == true) {
for (catId = 0; catId < xmlCatTotalItems; catId++) {
categoriesAdd.attach["categoriesAttach" + catId].descriptionMC.scrollSlider.arrows._tint = color;
categoriesAdd.attach["categoriesAttach" + catId].grey._height = (Stage.height - 120) - 50;
categoriesAdd.attach["categoriesAttach" + catId].black._height = (Stage.height - 120) - 54;
categoriesAdd.attach["categoriesAttach" + catId].bt._height = (Stage.height - 120) - 50;
categoriesAdd.attach["categoriesAttach" + catId].masker._height = ((Stage.height - 120) - categoriesAdd.attach["categoriesAttach" + catId].masker._y) - 70;
categoriesAdd.attach["categoriesAttach" + catId].descriptionMC.scrollBar._height = categoriesAdd.attach["categoriesAttach" + catId].masker._height;
}
}
else {
for (catId = 0; catId < xmlCatTotalItems; catId++) {
categoriesAdd.attach["categoriesAttach" + catId].descriptionMC.scrollSlider.arrows._tint = color;
categoriesAdd.attach["categoriesAttach" + catId].grey._height = (Stage.height - 95) - 50;
categoriesAdd.attach["categoriesAttach" + catId].black._height = (Stage.height - 95) - 54;
categoriesAdd.attach["categoriesAttach" + catId].bt._height = (Stage.height - 95) - 50;
categoriesAdd.attach["categoriesAttach" + catId].masker._height = ((Stage.height - 95) - categoriesAdd.attach["categoriesAttach" + catId].masker._y) - 70;
categoriesAdd.attach["categoriesAttach" + catId].descriptionMC.scrollBar._height = categoriesAdd.attach["categoriesAttach" + catId].masker._height;
}
}
}
else {
for (catId = 0; catId < xmlCatTotalItems; catId++) {
categoriesAdd.attach["categoriesAttach" + catId].descriptionMC.scrollSlider.arrows._tint = color;
categoriesAdd.attach["categoriesAttach" + catId].grey._height = Stage.height - 50;
categoriesAdd.attach["categoriesAttach" + catId].black._height = Stage.height - 54;
categoriesAdd.attach["categoriesAttach" + catId].bt._height = Stage.height - 50;
categoriesAdd.attach["categoriesAttach" + catId].masker._height = (Stage.height - categoriesAdd.attach["categoriesAttach" + catId].masker._y) - 70;
categoriesAdd.attach["categoriesAttach" + catId].descriptionMC.scrollBar._height = categoriesAdd.attach["categoriesAttach" + catId].masker._height;
}
}
setPositions ();
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadCategories () {
abortSlideShow ();
blackBack._visible = true;
ZigoEngine.doTween (blackBack,'_alpha',100,1,"linear",0,function () {
loadCategoriesXML ();
});
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadCategoriesXML () {
//
categoriesAdd._visible = true;
categoriesAdd._alpha = 100;
//
bottomBar.closeCategories._visible = true;
bottomBar.openCategories._visible = false;
//
var mainCategories:XML = new XML ();
mainCategories.ignoreWhite = true;
mainCategories.onLoad = function (success) {
if (success) {
var xml:XMLNode = this.firstChild;
xmlCatTotalItems = xml.childNodes.length;
for (i = 0; i < xml.childNodes.length; i++) {
var categoryTitle:String = xml.childNodes[i].childNodes[0].childNodes[0].nodeValue;
var categoryDescription:String = xml.childNodes[i].childNodes[1].childNodes[0].nodeValue;
var categoryPicture:String = xml.childNodes[i].childNodes[2].childNodes[0].nodeValue;
var categoryXml:String = xml.childNodes[i].childNodes[3].childNodes[0].nodeValue;
//
categoriesAdd.attach.attachMovie ("categoriesAttach","categoriesAttach" + i,i);
categoriesAdd.attach["categoriesAttach" + i].descriptionMC.scrollBar._visible = false;
categoriesAdd.attach["categoriesAttach" + i].descriptionMC.scrollSlider._visible = false;
//
categoriesAdd.attach["categoriesAttach" + i].titleTxt.htmlText = categoryTitle;
categoryTitleForContent = xml.childNodes[0].childNodes[0].childNodes[0].nodeValue;
//
categoriesAdd.attach["categoriesAttach" + i].descriptionMC.descriptionTxt.txt.autoSize = true;
categoriesAdd.attach["categoriesAttach" + i].descriptionMC.descriptionTxt.txt.htmlText = categoryDescription;
//
if (categoriesAdd.attach["categoriesAttach" + i].descriptionMC.descriptionTxt.txt._height > categoriesAdd.attach["categoriesAttach" + i].masker._height) {
categoriesAdd.attach["categoriesAttach" + i].descriptionMC.scrollSlider._visible = true;
categoriesAdd.attach["categoriesAttach" + i].descriptionMC.scrollBar._visible = true;
}
//
catImagesArr.push (categoryPicture);
catId = i;
//
categoriesAdd.attach["categoriesAttach" + i].bt.instanceCatTitle = categoryTitle;
categoriesAdd.attach["categoriesAttach" + i].bt.instanceXML = categoryXml;
loadCategoriesSmoothed (catImagesArr[catId],categoriesAdd.attach["categoriesAttach" + catId].picture);
ZigoEngine.doTween (categoriesAdd.attach["categoriesAttach" + i],'_x',260 * i,0.5,"linear",i / 260);
//
categoriesAdd.attach["categoriesAttach" + i].bt.onRelease = function () {
newCategoryTitle = this.instanceCatTitle;
categoryTitleForContent = this.instanceCatTitle
newCategoryXML = this.instanceXML;
closeCategories ();
removeThumbnails ();
};
initFloat (categoriesAdd);
setCategoriesSize ();
}
}
};
mainCategories.load ("elite_xml_imagegallery_xml/categories.xml");
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function closeCategories () {
ZigoEngine.doTween (categoriesAdd,'_alpha',0,1,"linear",0,function () {
categoriesAdd._visible = false;
removeCategoriesList ();
});
//
ZigoEngine.doTween (blackBack,'_alpha',0,1,"linear",1,function () {
blackBack._visible = false;
bottomBar.closeCategories._visible = false;
bottomBar.openCategories._visible = true;
});
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function removeCategoriesList () {
for (catId = 0; catId < xmlCatTotalItems; catId++) {
removeMovieClip (categoriesAdd.attach["categoriesAttach" + catId]);
}
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function removeThumbnails () {
ZigoEngine.doTween (imageContainer,'_alpha',0,1,"linear");
for (tmbId = 0; tmbId < totalImages; tmbId++) {
removeMovieClip (tmbs.containerTmbs["attach" + tmbId]);
if (tmbId == totalImages - 1) {
delete tmbs.containerTmbs.onEnterFrame;
loadImagesByCat ();
tmbs._alpha = 100;
tmbs.containerTmbs._x = 0;
}
}
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadImages () {
var images:XML = new XML ();
images.ignoreWhite = true;
images.onLoad = function (success) {
if (success) {
var xml:XMLNode = this.firstChild;
totalImages = xml.childNodes.length;
for (i = 0; i < xml.childNodes.length; i++) {
var imagesTitle:String = xml.childNodes[i].childNodes[0].childNodes[0].nodeValue;
var imagesLarge:String = xml.childNodes[i].childNodes[1].childNodes[0].nodeValue;
var imagesTmb:String = xml.childNodes[i].childNodes[2].childNodes[0].nodeValue;
var imagesDesc:String = xml.childNodes[i].childNodes[3].childNodes[0].nodeValue;
//
bottomBar.rightSide.imageTxt.txt.autoSize = true;
bottomBar.rightSide.imageTxt.txt.text = "1";
//
bottomBar.rightSide.totalTxt.txt.autoSize = true;
bottomBar.rightSide.totalTxt.txt.text = totalImages;
//
displayPositions ();
//
imageTitleArr.push (imagesTitle);
imagesArr.push (imagesLarge);
imageDescArr.push (imagesDesc);
//
tmbs.containerTmbs.attachMovie ("attach","attach" + i,i);
tmbs.containerTmbs["attach" + i]._x = i * 30;
//
loadThumbnails (imagesTmb,tmbs.containerTmbs["attach" + i].picture);
loadThumbnails (imagesTmb,tmbs.containerTmbs["attach" + i].largeTmb.picture);
//
contentBox.contentBox_text.catText.text = categoryTitleForContent;
contentBox.contentBox_text.titleText.text = xml.childNodes[0].childNodes[0].childNodes[0].nodeValue;
contentBox.contentBox_text.descText.htmlText = xml.childNodes[0].childNodes[3].childNodes[0].nodeValue;
contentBox.contentBox_text.descText.autoSize = true;
myListenerload.onResize ();
//
tmbs.containerTmbs["attach" + i].bt.idInstance = i;
//
tmbs.containerTmbs["attach" + i].bt.onRelease = function () {
//
cursorArr = this.idInstance;
//
for (a = 0; a < totalImages; a++) {
if(tmbs.containerTmbs["attach" + a].back._tint == color){
tmbs.containerTmbs["attach" + a].bt.enabled = true;
tmbs.containerTmbs["attach" + a].back._tint = 0x353535;
}
//
if(a > 0){
if(a == totalImages - 1){
tmbs.containerTmbs["attach" + cursorArr].gotoAndPlay("close");
tmbs.containerTmbs["attach" + cursorArr].bt.enabled = false;
tmbs.containerTmbs["attach" + cursorArr].back._tint = color;
}
}
}
//
abortSlideShow ();
//
bottomBar.rightSide.imageTxt.txt.autoSize = true;
bottomBar.rightSide.imageTxt.txt.text = cursorArr + 1;
//
displayPositions ();
//
contentBox.contentBox_text.catText.text = categoryTitleForContent;
contentBox.contentBox_text.titleText.text = imageTitleArr[cursorArr];
contentBox.contentBox_text.descText.htmlText = imageDescArr[cursorArr];
contentBox.contentBox_text.descText.autoSize = true;
myListenerload.onResize ();
//
ZigoEngine.doTween (imageContainer,'_alpha',0,1,"easeOutExpo",0,function () {
loadBitmapSmoothed (imagesArr[cursorArr],imageContainer);
});
};
}
}
loadBitmapSmoothed (imagesArr[cursorArr],imageContainer);
};
images.load ("elite_xml_imagegallery_xml/category1.xml");
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadImagesByCat () {
//
commingFromNewCat = true;
tmbs.startEnterFrame ();
imagesArrByCat.splice (0);
cursorArr = 0;
//
var imagesByCat:XML = new XML ();
imagesByCat.ignoreWhite = true;
imagesByCat.onLoad = function (success) {
if (success) {
var xml:XMLNode = this.firstChild;
totalImages = xml.childNodes.length;
for (i = 0; i < xml.childNodes.length; i++) {
var imagesTitleByCat:String = xml.childNodes[i].childNodes[0].childNodes[0].nodeValue;
var imagesLargeByCat:String = xml.childNodes[i].childNodes[1].childNodes[0].nodeValue;
var imagesTmbByCat:String = xml.childNodes[i].childNodes[2].childNodes[0].nodeValue;
var imagesDescByCat:String = xml.childNodes[i].childNodes[3].childNodes[0].nodeValue;
//
bottomBar.rightSide.imageTxt.txt.autoSize = true;
bottomBar.rightSide.imageTxt.txt.text = "1";
//
bottomBar.rightSide.totalTxt.txt.autoSize = true;
bottomBar.rightSide.totalTxt.txt.text = totalImages;
//
displayPositions ();
//
imagesArrByCat.push (imagesLargeByCat);
//
tmbs.containerTmbs.attachMovie ("attach","attach" + i,i);
tmbs.containerTmbs["attach" + i]._x = i * 30;
//
loadThumbnails (imagesTmbByCat,tmbs.containerTmbs["attach" + i].picture);
loadThumbnails (imagesTmbByCat,tmbs.containerTmbs["attach" + i].largeTmb.picture);
//
contentBox.contentBox_text.catText.text = categoryTitleForContent;
contentBox.contentBox_text.titleText.text = xml.childNodes[0].childNodes[0].childNodes[0].nodeValue;
contentBox.contentBox_text.descText.htmlText = xml.childNodes[0].childNodes[3].childNodes[0].nodeValue;
contentBox.contentBox_text.descText.autoSize = true;
myListenerload.onResize ();
//
tmbs.containerTmbs["attach" + i].bt.idInstance = i;
//
tmbs.containerTmbs["attach" + i].bt.onRelease = function () {
cursorArr = this.idInstance;
//
for (a = 0; a < totalImages; a++) {
if(tmbs.containerTmbs["attach" + a].back._tint == color){
tmbs.containerTmbs["attach" + a].bt.enabled = true;
tmbs.containerTmbs["attach" + a].back._tint = 0x353535;
}
//
if(a > 0){
if(a == totalImages - 1){
tmbs.containerTmbs["attach" + cursorArr].gotoAndPlay("close");
tmbs.containerTmbs["attach" + cursorArr].bt.enabled = false;
tmbs.containerTmbs["attach" + cursorArr].back._tint = color;
}
}
}
//
abortSlideShow ();
//
bottomBar.rightSide.imageTxt.txt.autoSize = true;
bottomBar.rightSide.imageTxt.txt.text = cursorArr + 1;
//
displayPositions ();
//
contentBox.contentBox_text.catText.text = categoryTitleForContent;
contentBox.contentBox_text.titleText.text = imageTitleArr[cursorArr];
contentBox.contentBox_text.descText.htmlText = imageDescArr[cursorArr];
contentBox.contentBox_text.descText.autoSize = true;
myListenerload.onResize ();
//
ZigoEngine.doTween (imageContainer,'_alpha',0,1,"easeOutExpo",0,function () {
loadBitmapSmoothed (imagesArrByCat[cursorArr],imageContainer);
});
};
}
}
loadBitmapSmoothed (imagesArrByCat[cursorArr],imageContainer);
};
imagesByCat.load (newCategoryXML);
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function displayPositions () {
bottomBar.rightSide.stroke1._x = Math.floor (bottomBar.rightSide.imageTxt._x + bottomBar.rightSide.imageTxt._width + 5);
bottomBar.rightSide.labelTotal._x = Math.floor (bottomBar.rightSide.stroke1._x + 5);
bottomBar.rightSide.totalTxt._x = Math.floor (bottomBar.rightSide.labelTotal._x + bottomBar.rightSide.labelTotal._width);
bottomBar.rightSide.stroke2._x = Math.floor (bottomBar.rightSide.totalTxt._x + bottomBar.rightSide.totalTxt._width + 5);
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadCategoriesSmoothed (url:String, target:MovieClip) {
//
var bmc:MovieClip = target.createEmptyMovieClip ("bmc", target.getNextHighestDepth ());
var listener:Object = new Object ();
//
listener.tmc = target;
//
listener.onLoadStart = function () {
//trace("onLoadStart")
};
//
listener.onLoadProgress = function (mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
//percent = Math.round (bytesLoaded / bytesTotal * 100);
};
//
listener.onLoadInit = function (mc:MovieClip) {
//
var bitmap:BitmapData = new BitmapData (mc._width, mc._height, true, 0);
this.tmc.attachBitmap (bitmap,1,"auto",true);
bitmap.draw (mc);
//
setPositions ();
};
//
var loader:MovieClipLoader = new MovieClipLoader ();
loader.addListener (listener);
loader.loadClip (url,bmc);
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadBitmapSmoothed (url:String, target:MovieClip) {
//
var bmc:MovieClip = target.createEmptyMovieClip ("bmc", target.getNextHighestDepth ());
var listener:Object = new Object ();
//
listener.tmc = target;
//
listener.onLoadStart = function () {
attachMovie ("loadPictureMC","loadPictureMC",1);
loadPictureMC._x = Math.floor (Stage.width / 2 - loadPictureMC._width / 2);
if (isModule == true) {
if (_root.subMenuOpened == true) {
loadPictureMC._y = Math.floor ((Stage.height - 120) / 2 - loadPictureMC._height / 2);
}
else {
loadPictureMC._y = Math.floor ((Stage.height - 95) / 2 - loadPictureMC._height / 2);
}
}
else {
loadPictureMC._y = Math.floor (Stage.height / 2 - loadPictureMC._height / 2);
}
};
//
listener.onLoadProgress = function (mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
percent = Math.round (bytesLoaded / bytesTotal * 100);
loadPictureMC.percentTxt.text = percent + "%";
};
//
listener.onLoadInit = function (mc:MovieClip) {
removeMovieClip (loadPictureMC);
imageContainer._alpha = 0;
var bitmap:BitmapData = new BitmapData (mc._width, mc._height, true, 0);
this.tmc.attachBitmap (bitmap,1,"auto",true);
bitmap.draw (mc);
ZigoEngine.doTween (imageContainer,'_alpha',100,5,"easeOutExpo");
imageContainer.onRelease = function(){
abortSlideShow ();
contentBox._visible = true;
ZigoEngine.doTween(contentBox,'_alpha',100,1,"easeOutExpo")
}
setPositions ();
};
//
var loader:MovieClipLoader = new MovieClipLoader ();
loader.addListener (listener);
loader.loadClip (url,bmc);
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadThumbnails (externalTarget:String, targetRoot:MovieClip) {
var mcLoader:MovieClipLoader = new MovieClipLoader ();
var listenerLoad:Object = new Object ();
listenerLoad.tmc = targetRoot;
listenerLoad.onLoadInit = function (mc:MovieClip) {
var bitmap:BitmapData = new BitmapData (mc._width, mc._height, true, 0);
this.tmc.attachBitmap (bitmap,1,"auto",true);
bitmap.draw (mc);
};
mcLoader.addListener (listenerLoad);
mcLoader.loadClip (externalTarget,targetRoot);
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function setPositions () {
if (isModule == true) {
if (_root.subMenuOpened == true) {
if (imageContainer._height > imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
else {
imageContainer._height = (Stage.height - 120) - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
// - - - - - IF PICTURE HORIZONAL - - - - -
if (imageContainer._height < imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
else {
imageContainer._height = (Stage.height - 120) - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
// - - - - - IF PICTURE SQUARE - - - - -
if (imageContainer._height == imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
else {
imageContainer._height = (Stage.height - 120) - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
//-------------------------------------------------------------------------------------------
imageContainer._x = Stage.width / 2 - imageContainer._width / 2;
imageContainer._y = (Stage.height - 120) / 2 - imageContainer._height / 2 - bottomBar._height / 2;
}
else {
// - - - - - IF PICTURE VERTICAL - - - - -
if (imageContainer._height > imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
else {
imageContainer._height = (Stage.height - 95) - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
// - - - - - IF PICTURE HORIZONAL - - - - -
if (imageContainer._height < imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
if(imageContainer._height >= Stage.height - 95){
imageContainer._height = (Stage.height - 95) - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}else{
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
}
else {
imageContainer._height = (Stage.height - 95) - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
// - - - - - IF PICTURE SQUARE - - - - -
if (imageContainer._height == imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
else {
imageContainer._height = (Stage.height - 95) - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
//-------------------------------------------------------------------------------------------
imageContainer._x = Stage.width / 2 - imageContainer._width / 2;
imageContainer._y = (Stage.height - 95) / 2 - imageContainer._height / 2 - bottomBar._height / 2;
}
}
else {
// - - - - - IF PICTURE VERTICAL - - - - -
if (imageContainer._height > imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
else {
imageContainer._height = Stage.height - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
// - - - - - IF PICTURE HORIZONAL - - - - -
if (imageContainer._height < imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
else {
imageContainer._height = Stage.height - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
// - - - - - IF PICTURE SQUARE - - - - -
if (imageContainer._height == imageContainer._width) {
if (imageContainer._width >= Stage.width - 20) {
imageContainer._width = Stage.width - 20;
imageContainer._yscale = imageContainer._xscale;
}
else {
imageContainer._height = Stage.height - 20 - bottomBar._height;
imageContainer._xscale = imageContainer._yscale;
}
}
//-------------------------------------------------------------------------------------------
imageContainer._x = Stage.width / 2 - imageContainer._width / 2;
imageContainer._y = Stage.height / 2 - imageContainer._height / 2 - bottomBar._height / 2;
}
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function setSlideShow () {
statusSlideShow = true;
timeBar._visible = true;
timeBar._x = 0;
timeBar._y = 0;
executeLoadingImgGallery ();
bottomBar.btPlay._visible = false;
bottomBar.btStop._visible = true;
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function executeLoadingImgGallery () {
if (statusSlideShow == true) {
if (cursorArr == totalImages - 1) {
cursorArr = 0;
timeBar._xscale = 0;
ZigoEngine.doTween (imageContainer,'_alpha',0,1,"easeOutExpo",0,function () {
if (commingFromNewCat == true) {
loadBitmapSmoothedSlideShow (imagesArrByCat[cursorArr],imageContainer);
}
else {
loadBitmapSmoothedSlideShow (imagesArr[cursorArr],imageContainer);
}
});
}
else {
cursorArr++;
timeBar._xscale = 0;
ZigoEngine.doTween (imageContainer,'_alpha',0,1,"easeOutExpo",0,function () {
if (commingFromNewCat == true) {
loadBitmapSmoothedSlideShow (imagesArrByCat[cursorArr],imageContainer);
}
else {
loadBitmapSmoothedSlideShow (imagesArr[cursorArr],imageContainer);
}
});
}
bottomBar.rightSide.imageTxt.txt.autoSize = true;
bottomBar.rightSide.imageTxt.txt.text = cursorArr + 1;
displayPositions ();
}
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function loadBitmapSmoothedSlideShow (url:String, target:MovieClip) {
var bmc:MovieClip = target.createEmptyMovieClip ("bmc", target.getNextHighestDepth ());
var listener:Object = new Object ();
listener.tmc = target;
//
listener.onLoadStart = function () {
attachMovie ("loadPictureMC_slideShow","loadPictureMC_slideShow",1);
loadPictureMC_slideShow._x = Math.floor (Stage.width / 2 - loadPictureMC_slideShow._width / 2);
if (isModule == true) {
if (_root.subMenuOpened == true) {
loadPictureMC_slideShow._y = Math.floor ((Stage.height - 120) / 2 - loadPictureMC_slideShow._height / 2);
}
else {
loadPictureMC_slideShow._y = Math.floor ((Stage.height - 95) / 2 - loadPictureMC_slideShow._height / 2);
}
}
else {
loadPictureMC_slideShow._y = Math.floor (Stage.height / 2 - loadPictureMC_slideShow._height / 2);
}
};
//
listener.onLoadProgress = function (mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
percent = Math.round (bytesLoaded / bytesTotal * 100);
loadPictureMC_slideShow.percentTxt.text = percent + "%";
};
//
listener.onLoadInit = function (mc:MovieClip) {
removeMovieClip (loadPictureMC_slideShow);
//
imageContainer._alpha = 0;
//
var bitmap:BitmapData = new BitmapData (mc._width, mc._height, true, 0);
this.tmc.attachBitmap (bitmap,1,"auto",true);
bitmap.draw (mc);
//
ZigoEngine.doTween (imageContainer,'_alpha',100,5,"easeOutExpo");
//
countTimeBar ();
setPositions ();
};
//
var loader:MovieClipLoader = new MovieClipLoader ();
loader.addListener (listener);
loader.loadClip (url,bmc);
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function abortSlideShow () {
statusSlideShow = false;
timeBar._visible = false;
timeBar._xscale = 0;
bottomBar.btPlay._visible = true;
bottomBar.btStop._visible = false;
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function countTimeBar () {
if (statusSlideShow == true) {
ZigoEngine.doTween (timeBar,'_xscale',Stage.width + 100,5,"easeInExpo",0,executeLoadingImgGallery);
}
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function updateMovies () {
if (categoriesAdd._width > Stage.width) {
d = 5;
mov = _root._xmouse;
coef = (Stage.width - (categoriesAdd._width + 100)) / Stage.width;
categoriesAdd._x -= (((categoriesAdd._x - 50)) - coef * mov) / d;
}
else {
categoriesAdd._x = Stage.width / 2 - categoriesAdd._width / 2;
}
}//
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
function initFloat (mc:MovieClip) {
temp = mc;
temp.onEnterFrame = this.updateMovies;
}Discussão (5)
Carregando comentários...