urieljuliatti
06-18-2009, 06:52 PM
I am having some troubles to remove the movieClip from the current Loader (from the main FLA) at the external movies...
Check out how the external movie loads..
// -- FUNÇÃO NAVIGATE -- //
function navigate(event:MouseEvent):void{
if(event.target.name == "fotos" ){
carregaFotos();
removeLstrs();
}else {
switch(event.target.name) {
case "convide":
carregaConvide();
// Se clicar
removeLstrs();
break;
case "downloads":
carregaDownloads();
removeLstrs();
break;
case "info":
carregaInfo();
removeLstrs();
break;
} // end Switch
} // End IF
}
Check out these lines...
The Global Functions on each case loads the tween motion and the url (external swfs);
Check out the Global Functions lines...
// Removing the CHILDS to apply the tween effect after clicked!
function removeLstrs () {
convide.removeEventListener(MouseEvent.ROLL_OVER, btnOver);
convide.removeEventListener(MouseEvent.ROLL_OUT, btnOut);
fotos.removeEventListener(MouseEvent.ROLL_OVER, btnOver);
fotos.removeEventListener(MouseEvent.ROLL_OUT, btnOut);
info.removeEventListener(MouseEvent.ROLL_OVER, btnOver);
info.removeEventListener(MouseEvent.ROLL_OUT, btnOut);
downloads.removeEventListener(MouseEvent.ROLL_OVER , btnOver);
downloads.removeEventListener(MouseEvent.ROLL_OUT, btnOut);
}
// Loading and Removing
function carregaConvide () {
TweenLite.to(convide, 0.4, {x:404.6, y:148.3, scaleX:1, scaleY:1, alpha:1, ease:Bounce.easeOut, onComplete:nextStep});
function nextStep () {
TweenLite.to(convide, 0.4, {x:500, y:148.3, scaleX:1, scaleY:1, alpha:0, ease:Bounce.easeOut, onComplete:nextStep2});
}
function nextStep2 ():void {
convide.visible = false;
TweenLite.to(fotos, 0.3, {x:500, y:104, scaleX:1, scaleY:1, alpha:0, ease:Strong.easeOut, onComplete:nextStep3});
}
function nextStep3 ():void {
TweenLite.to(downloads, 0.3, {x:500, y:220, scaleX:1, scaleY:1, alpha:0, ease:Strong.easeOut, onComplete:carrega});
fotos.visible = false;
}
function carrega ():void {
downloads.visible = false;
meuCarregador.load(new URLRequest("convide.swf"));
}
}
function carregaFotos () {
TweenLite.to(fotos, 0.4, {x:404.6, y:148.3, scaleX:1, scaleY:1, alpha:1, ease:Bounce.easeOut, onComplete:nextStep});
function nextStep () {
TweenLite.to(convide, 0.4, {x:500, y:148.3, scaleX:1, scaleY:1, alpha:0, ease:Bounce.easeOut, onComplete:nextStep2});
}
function nextStep2 ():void {
TweenLite.to(downloads, 0.3, {x:500, y:104, scaleX:1, scaleY:1, alpha:0, ease:Strong.easeOut, onComplete:nextStep3});
}
function nextStep3 ():void {
TweenLite.to(info, 0.3, {x:500, y:220, scaleX:1, scaleY:1, alpha:0, ease:Strong.easeOut, onComplete:carrega});
}
function carrega ():void {
meuCarregador.load(new URLRequest("info.swf"));
}
}
I have the external swf with some Tween Classes instaled and codified.. But I don't know what to do to CLOSE the external swf loaded at "meuCarregador" and it back to the BEGINNING OF THE ANIMATION on MAIN FLA.
What can I do?
Check out how the external movie loads..
// -- FUNÇÃO NAVIGATE -- //
function navigate(event:MouseEvent):void{
if(event.target.name == "fotos" ){
carregaFotos();
removeLstrs();
}else {
switch(event.target.name) {
case "convide":
carregaConvide();
// Se clicar
removeLstrs();
break;
case "downloads":
carregaDownloads();
removeLstrs();
break;
case "info":
carregaInfo();
removeLstrs();
break;
} // end Switch
} // End IF
}
Check out these lines...
The Global Functions on each case loads the tween motion and the url (external swfs);
Check out the Global Functions lines...
// Removing the CHILDS to apply the tween effect after clicked!
function removeLstrs () {
convide.removeEventListener(MouseEvent.ROLL_OVER, btnOver);
convide.removeEventListener(MouseEvent.ROLL_OUT, btnOut);
fotos.removeEventListener(MouseEvent.ROLL_OVER, btnOver);
fotos.removeEventListener(MouseEvent.ROLL_OUT, btnOut);
info.removeEventListener(MouseEvent.ROLL_OVER, btnOver);
info.removeEventListener(MouseEvent.ROLL_OUT, btnOut);
downloads.removeEventListener(MouseEvent.ROLL_OVER , btnOver);
downloads.removeEventListener(MouseEvent.ROLL_OUT, btnOut);
}
// Loading and Removing
function carregaConvide () {
TweenLite.to(convide, 0.4, {x:404.6, y:148.3, scaleX:1, scaleY:1, alpha:1, ease:Bounce.easeOut, onComplete:nextStep});
function nextStep () {
TweenLite.to(convide, 0.4, {x:500, y:148.3, scaleX:1, scaleY:1, alpha:0, ease:Bounce.easeOut, onComplete:nextStep2});
}
function nextStep2 ():void {
convide.visible = false;
TweenLite.to(fotos, 0.3, {x:500, y:104, scaleX:1, scaleY:1, alpha:0, ease:Strong.easeOut, onComplete:nextStep3});
}
function nextStep3 ():void {
TweenLite.to(downloads, 0.3, {x:500, y:220, scaleX:1, scaleY:1, alpha:0, ease:Strong.easeOut, onComplete:carrega});
fotos.visible = false;
}
function carrega ():void {
downloads.visible = false;
meuCarregador.load(new URLRequest("convide.swf"));
}
}
function carregaFotos () {
TweenLite.to(fotos, 0.4, {x:404.6, y:148.3, scaleX:1, scaleY:1, alpha:1, ease:Bounce.easeOut, onComplete:nextStep});
function nextStep () {
TweenLite.to(convide, 0.4, {x:500, y:148.3, scaleX:1, scaleY:1, alpha:0, ease:Bounce.easeOut, onComplete:nextStep2});
}
function nextStep2 ():void {
TweenLite.to(downloads, 0.3, {x:500, y:104, scaleX:1, scaleY:1, alpha:0, ease:Strong.easeOut, onComplete:nextStep3});
}
function nextStep3 ():void {
TweenLite.to(info, 0.3, {x:500, y:220, scaleX:1, scaleY:1, alpha:0, ease:Strong.easeOut, onComplete:carrega});
}
function carrega ():void {
meuCarregador.load(new URLRequest("info.swf"));
}
}
I have the external swf with some Tween Classes instaled and codified.. But I don't know what to do to CLOSE the external swf loaded at "meuCarregador" and it back to the BEGINNING OF THE ANIMATION on MAIN FLA.
What can I do?