Comunidad de diseño web y desarrollo en internet online

como eliminar moviclips de una galeria

Citar            
MensajeEscrito el 10 Abr 2009 07:03 pm
Hola que tal la verdad es que no se practicamnete nada de acton script asi que agradescod eantemano toda la info que he encontrado aca, acutualmente estoy haciendo una galeria para una amiga el problea es que cuando voy a otras escenas la gaeria permanece
este es el codigo:
Stage.scaleMode = "noScale";
fscommand("showmenu", "false");
fscommand("fullscreen", "false");
Stage.align = "TL";
#include "mc_tween2.as"
this.Thumb_mc2._visible=false;
function ridim() {
back._width = Stage.width;
back._height = Stage.height;
mask._width = Stage.width;
mask._height = Stage.height;
}
var sl:Object = new Object();
sl.onResize = function() {
ridim();
};
Stage.addListener(sl);
sl.onResize();
ridim();

//----------------------- Variables Setting ----------------------------
click = false;
lock = false;
var Gallery:XML = new XML();
Gallery.ignoreWhite = true;
var Data:Array = new Array();
var Total:Number = 0;
var PicLoader:MovieClipLoader = new MovieClipLoader();
var BigLoader:MovieClipLoader = new MovieClipLoader();
var thumbListener:Object = new Object();
var bigListener:Object = new Object();
var Loaded:Number = 0;
var Ready:Number = 0;
var Opened:Boolean = false;
loaderBar_mc._alpha = 0;
var workLoadListener:Object = new Object();
//-------------------------------------------------------------------------

//----------------------- Handlers ----------------------------------------
Gallery.onLoad = function(success:Boolean) {
if (!success) {
Gallery.load("lettore.php");
Total = Gallery.firstChild.childNodes.length;
Data = this.firstChild.childNodes;
CreateThumbs();
} else {
Total = Gallery.firstChild.childNodes.length;
Data = this.firstChild.childNodes;
CreateThumbs();
}
};


thumbListener.onLoadStart = function(alvo_mc:MovieClip) {
loaderBar_mc.alphaTo(100,1,"easeOutQuad");
};

thumbListener.onLoadInit = function(my_mc:MovieClip) {
Loaded++;
Larg = my_mc._width;
Altu = my_mc._height;
if (Larg>Altu) {
my_mc._height = 149.4;
my_mc._width = 199.2;
} else {
my_mc._height = 199.2;
my_mc._width = 149.4;
my_mc._rotation = +90;
my_mc._x = my_mc._x+200;
my_mc._parent._rotation = -90;
my_mc.gotoAndStop(2);
}
CreateThumbs(Larg,Altu);
};

thumbListener.onLoadProgress = function(alvo_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
var Percent = bytesLoaded/bytesTotal*100;
loaderBar_mc._xscale = Percent;
};

thumbListener.onLoadComplete = function(alvo_mc:MovieClip) {
posicionaThumb(alvo_mc);
loaderBar_mc.alphaTo(0,1,"easeOutQuad");
};


//-------------------------------------------------------------------------

//----------------------- Functions -----------------------------------------
function CreateThumbs(valx:Number, valy:Number) {
if (Loaded<Total) {
Thumb_mc2.duplicateMovieClip("Thumb"+Loaded+"_mc",Loaded);
//Moving to a random position
//this["Thumb"+Loaded+"_mc"]._x = random(1500)*-1;
//this["Thumb"+Loaded+"_mc"]._y = random(1500)*-1;
this["Thumb"+Loaded+"_mc"].recebe_mc.colorTo(0xffffff)
this["Thumb"+Loaded+"_mc"].scaleTo(100)
carregaEsseThumb(this["Thumb"+Loaded+"_mc"]);
}
}


function carregaEsseThumb(Aonde:MovieClip) {
Aonde.pqn = Data[Loaded].attributes.pqn;
Aonde.gde = Data[Loaded].attributes.gde;
Aonde.form = Data[Loaded].attributes.form;
Aonde.legenda = Data[Loaded].attributes.legenda;
PicLoader.loadClip(Aonde.gde,Aonde.recebe_mc);
Aonde.recebe_mc.scaleTo(41.5);
}
function posicionaThumb(Qual:MovieClip) {
//Qual._parent.tween(["_x", "_y", "_rotation"],[randRange(200, 480), randRange(100, 300), random(360)],2,"easeOutQuad");
Qual._parent.recebe_mc.colorTo(null,3,"easeOutQuad")
/*Qual._parent.onRollOver = function() {
if (!Opened) {
desombraMe(this);
}
};*/
Qual._parent.onPress = function() {
if (!Opened) {
this.modo = 1;
this.modo_time = 1;
//this.swapDepths(Total);
//Qual._parent.startDrag();
this.scaleTo(130,0.04,"easeOutQuad");
sombraMe(this);
}
//if this is the first click
if (!_root.click) {
timer = getTimer()/1000;
_root.click = true;
} else {
timer2 = getTimer()/1000;
//if it is a double click
if ((timer2-timer)<.25) {
Qual._parent.stopDrag();
if (!Opened) {
Abre(this);
_root.mask.visible = true;
_root.mask._alpha = 45;
_root.mask.swapDepths(_root.getNextHighestDepth());
Opened = true;
} else if (Opened) {
fecha(this);
_global.locked = 0;
Opened = false;
desombraMe(this);
_root.mask._alpha = 0;
_root.mask.swapDepths(0);
_root.click = false;
}
} else {
timer = getTimer()/1000;
_root.click = true;
}
}
};
Qual._parent.onRelease = function() {
this.modo = 2;
this.modo_time = 2;
Qual._parent.stopDrag();
angle = getProperty(Qual._parent, _rotation);
if (!Opened) {
Qual._parent.scaleTo(100,0.1,"easeOutQuad");
desombraMe(this);
//Qual._parent.tween(["_rotation"], [angle+randRange(-5,5)], 0.5, "easeOutQuad");
}
};
Qual._parent.onReleaseOutside = function() {
this.modo = 2;
this.modo_time = 2;
if (!Opened) {
Qual._parent.scaleTo(100,0.1,"easeOutQuad");
desombraMe(this);
}
};
Qual._parent.onRollOut = function() {
/*this.modo=2;
this.modo_time=2;*/

if (!Opened) {
Qual._parent.scaleTo(100,0.1,"easeOutQuad");
desombraMe(this);
}
};


}
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random()*(max-min+1))+min;
return randomNum;
}
onEnterFrame = function () {

};
function sombraMe(Movie:MovieClip) {
Movie.alphaTo(100,0.002,"easeOutQuad",0.002,swapa);
////
}
function desombraMe(Movie:MovieClip) {
Movie.thumb.frameTo(1,0.5,"easeOutQuad");
}
//
function swapa() {
this.alphaTo(100,0.0002,"easeOutQuad");
this.swapDepths(_root.getNextHighestDepth());
this.thumb.frameTo(15,0.005,"easeOutQuad");
}
//
function Abre(Qual) {
if (!Opened) {
Qual.scaleTo(240,0.5,"easeOutQuad");
rotazion = Qual.recebe_mc._rotation;
_global.locked = 1;
Qual.tween(["_x", "_y", "_rotation"],[(Stage.width/2), (Stage.height/2), -rotazion],0.5,"easeOutQuad",0);
}
}
//
function fecha(Qual:MovieClip) {
fechaFoto();
Qual.scaleTo(100,3,"easeOutElastic");
//Qual.tween(["_x", "_y", "_rotation"],[random(780), random(400), random(360)],0.5,"easeOutQuad");
_global.locked = 0;
}
//

function fechaFoto() {
fotoGrande_mc.mascara_mc._yscale = 0;
fotoGrande_mc._x = 50000;
fotoGrande_mc._y = 50000;
}

function fetchaAll() {
for (i=0; i<Total; i++) {
this["Thumb"+i+"_mc"].tween(["_rotation"],[random(360)],0.5,"easeInOutBack");
this["Thumb"+i+"_mc"].tween(["_x", "_y"],[Stage.width-1470, Stage.height+300],2,"easeOutQuad");
}
}
//-------------------------------------------------------------------------
//----------------------- Start Here --------------------------------------
//Loading XML archive
Gallery.load("fotos.xml");
//Setting listner for Class MovieClip Loader
PicLoader.addListener(thumbListener);
//Setting other Listner for other classes Mcl
BigLoader.addListener(bigListener);
//Stopping
stop();

pdrian decirme que codigo puedo poner para que cuando valla aotro frame no aparecsca ala galeroa se los agradeceroa mucho.

Por astroboy

1 de clabLevel



 

safari
Citar            
MensajeEscrito el 11 Abr 2009 01:40 am
k galeria es men o como funciona o de donde la bajaste digo pork yo tengo varios protos de galerias tal ves te pueda ayudar yo no soy experto en el tema pero si hay la llevo poco a poco

Por tjmysteri

Claber

138 de clabLevel



 

msie8

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.