..:: MX Studio Fóruns ::..: Botao fechar um swf externo - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Botao fechar um swf externo Flash

#1 User is offline   pdance 

  • Group: Membros
  • Posts: 3
  • Joined: 30-May 06

  Posted 30 May 2006 - 06:48 PM

Estou com um problema.........
Estou abrindo um arquivo swf externo e queria um botao para fechar essa arquivo dentro do flash.

No aguardo.
0

#2 User is offline   vanmaster7 

  • Group: Membros
  • Posts: 16
  • Joined: 30-May 06

Posted 30 May 2006 - 07:01 PM

pra carregar vc usou o "loadMovie", creio eu, pra descarregar ou fechar vc deve usar o comando "unload".
0

#3 User is offline   pdance 

  • Group: Membros
  • Posts: 3
  • Joined: 30-May 06

  Posted 31 May 2006 - 10:09 AM

Eu estou usando esse codigo aqui.............

/ function: loadFlashPaper
// ------------------------
// Load FlashPaper document, size it,
// Parameters:
// path_s: Path of SWF to load
// dest_mc: Movie clip to hold the imported SWF
// width_i: New size of the dest MC
// height_i: New size of the dest MC
// loaded_o: (optional) Object to be notified that loading is complete
function loadFlashPaper(path_s, dest_mc, width_i, height_i, loaded_o) {
var intervalID = 0;
var loadFunc = function(){
dest_mc._visible = false;
var fp = dest_mc.getIFlashPaper();
if (!fp) {
return;
} else if (fp.setSize(width_i, height_i) == false) {
return;
} else {
clearInterval(intervalID);
var pages_i = fp.getNumberOfPages();
ctrlHolder_mc.swapDepths(_root.control_mc);
dest_mc._visible = true; // Now show the document
_root.control_mc._visible = true; // Now show the controller
loaded_o.onLoaded(fp);
}
}
intervalID = setInterval(loadFunc, 100);
dest_mc.loadMovie(path_s);
}


// function: onLoaded()
// ------------------------
// Called once loading is complete
// Parameters:
// fp: FlashPaper interface (returned by getIFlashPaper())
function onLoaded(fp) {
// We can now call the FlashPaper API functions.
// Remove the standard user interface features:
fp.showUIElement("PrevNext", false);
fp.showUIElement("Print", false);
fp.showUIElement("Find", false);
fp.showUIElement("Tool", false);
fp.showUIElement("Pop", false);
fp.showUIElement("Zoom", true);
fp.showUIElement("Page", false);
fp.showUIElement("Overflow", false);
fp.enableScrolling(true);
// Some additional API features (here commented out):
// Go to page:
// fp.setCurrentPage(8);
// Change the magnification to 50%:
// fp.setCurrentZoom(50);
}

// Hide the navigation controller until after the document is loaded:
_root.control_mc._visible = false;

// Create movie clip to hold the document:
var theDocMC_mc = this.createEmptyMovieClip("theDocMC",100);
// Create movie clip to exchange the depth with the navigation controller clip:
var ctrlHolder_mc = this.createEmptyMovieClip("ctrlHolder",200);

// Position the document clip on the stage:
theDocMC_mc._x = 11;
theDocMC_mc._y = 105;

// Load the FlashPaper document:
loadFlashPaper("mp_intro.swf", theDocMC_mc, 699, 279, this);
stop();

nao estou usando loadmovie.......

quando abre esse swf eu nao consigo fechar,,,,,,,queria um botao para fechar esse arquivo.........

Esse arquivo esta abrindo dentro do flash

Obrigado
0

#4 User is offline   Natan 

  • Group: Moderador Global
  • Posts: 7350
  • Joined: 28-February 04

Posted 31 May 2006 - 10:28 AM

Tenta esse:

ActionScript
dest_mc.unloadMovie();


Qualquer coisa é só falar.

Falow
0

#5 User is offline   pdance 

  • Group: Membros
  • Posts: 3
  • Joined: 30-May 06

  Posted 31 May 2006 - 01:18 PM

QUOTE(pdance @ 31/5/2006 09:05:48)
Eu estou usando esse codigo aqui.............

/ function: loadFlashPaper
// ------------------------
// Load FlashPaper document, size it,
// Parameters:
//  path_s: Path of SWF to load
//  dest_mc: Movie clip to hold the imported SWF
//  width_i: New size of the dest MC
// height_i: New size of the dest MC
// loaded_o: (optional) Object to be notified that loading is complete
function loadFlashPaper(path_s, dest_mc, width_i, height_i, loaded_o) {
var intervalID = 0;
var loadFunc = function(){ 
  dest_mc._visible = false; 
  var fp = dest_mc.getIFlashPaper();
  if (!fp) {
  return;
  } else if (fp.setSize(width_i, height_i) == false) {
  return;
  } else {
  clearInterval(intervalID); 
  var pages_i = fp.getNumberOfPages();
  ctrlHolder_mc.swapDepths(_root.control_mc);
  dest_mc._visible = true;  // Now show the document
  _root.control_mc._visible = true; // Now show the controller
  loaded_o.onLoaded(fp);
  }
}
intervalID = setInterval(loadFunc, 100);
dest_mc.loadMovie(path_s);
}


// function: onLoaded()
// ------------------------
// Called once loading is complete
// Parameters:
//  fp: FlashPaper interface (returned by getIFlashPaper())
function onLoaded(fp) {
// We can now call the FlashPaper API functions.
// Remove the standard user interface features:
fp.showUIElement("PrevNext", false);
fp.showUIElement("Print", false);
fp.showUIElement("Find", false);
fp.showUIElement("Tool", false);
fp.showUIElement("Pop", false);
fp.showUIElement("Zoom", true);
fp.showUIElement("Page", false);
fp.showUIElement("Overflow", false);
fp.enableScrolling(true);
// Some additional API features (here commented out):
// Go to page:
// fp.setCurrentPage(8);
// Change the magnification to 50%:
// fp.setCurrentZoom(50);
}

// Hide the navigation controller until after the document is loaded:
_root.control_mc._visible = false; 

// Create movie clip to hold the document:
var theDocMC_mc = this.createEmptyMovieClip("theDocMC",100);
// Create movie clip to exchange the depth with the navigation controller clip:
var ctrlHolder_mc = this.createEmptyMovieClip("ctrlHolder",200);

// Position the document clip on the stage:
theDocMC_mc._x = 11;
theDocMC_mc._y = 105;

// Load the FlashPaper document:
loadFlashPaper("mp_intro.swf", theDocMC_mc, 699, 279, this);
stop();

nao estou usando loadmovie.......

quando abre esse swf eu nao consigo fechar,,,,,,,queria um botao para fechar esse arquivo.........

Esse arquivo esta abrindo dentro do flash

Obrigado
View Post



AMIGO VLW, MAIS ESSE SCRIPT NAO\DEU\CERTO.........
NAO FECHA O SWF EXTERNO.

TENTEI MAIS NAO FOI,,,,,,,,
ALGUM OUTRO MEIO.

EU TENHO QUE FECHAR ESSE SWF PARA APARECEER A TELA, PQ ELE FICA EM CIMA DE OUTRA TELA.....
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


Similar Topics Collapse

  Topic Forum Started By Stats Last Post Info
New Replies Criando uma playlist com Flash Communication Serve Tutoriais e Artigos lucasmarcal 
  • 0 Replies
  • 3781 Views
New Replies Criação de DVD em Flash - procura-se - Belo Horizonte Mercado / Vagas Pablo Reinhardt 
  • 1 Reply
  • 746 Views
New Replies Botões em flash, nao consigo linka-los Dreamweaver thiagoys 
  • 1 Reply
  • 770 Views
New Replies mural de racados em php e flash
alguem pode me ajudar?
PHP italo santos 
  • 0 Replies
  • 829 Views
Locked Topic Lista do primeiro Desafio de Flash
Confiram a lista
Desafio Carneirinho 
  • 9 Replies
  • 2230 Views
New Replies Botão Flash e iFRAME
Como fazer para que um botão em FLASH abra uma página em um iFRAME???
Web Standards gust4vo 
  • 1 Reply
  • 807 Views
New Replies Flash no indesign cs4
como fazê-lo
InDesign kalaudesign 
  • 3 Replies
  • 1396 Views
New Replies Pedido banner
e ajuda com photoshop e flash
Outros Z_SHAKA_Z 
  • 0 Replies
  • 567 Views

Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)