IAMDIX Posted November 2, 2011 Report Share Posted November 2, 2011 para testar por completo nosso site em Flash, serve usar o Publish em html do proprio programa ou precisa ter um servidor localhost tipo o wamp? Quote Link to comment Share on other sites More sharing options...
0 Anti-puff Posted November 18, 2011 Report Share Posted November 18, 2011 Se o swf carregar components ou variaveis de contexto será necessário rodar apartir de um servidor web, as versões prof. do windows tem o IIS para colocar numa pasta dentro do InetPub e acessa via http. Quote Link to comment Share on other sites More sharing options...
0 IAMDIX Posted November 18, 2011 Author Report Share Posted November 18, 2011 Se o swf carregar components ou variaveis de contexto será necessário rodar apartir de um servidor web, as versões prof. do windows tem o IIS para colocar numa pasta dentro do InetPub e acessa via http.nesse tempo testei o wamp aqui mas parece que as funções relativas ao swfaddress não estão funcionando Vou ver se tenho o iss no window xp-pro Quote Link to comment Share on other sites More sharing options...
0 IAMDIX Posted November 18, 2011 Author Report Share Posted November 18, 2011 então testei tambem no iss e não funciona aqui os codigos ....de repente fiz algo erradoHTML<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>TITULO DO SITE</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript" src="swfaddress.js"></script> <script type="text/javascript" src="swffit.js" /></script> <script type="text/javascript"> <!-- Adobe recommends that developers use SWFObject2 for Flash Player detection. --> <!-- For more information see the SWFObject page at Google code (http://code.google.com/p/swfobject/). --> <!-- Information is also available on the Adobe Developer Connection Under Detecting Flash Player versions and embedding SWF files with SWFObject 2" --> <!-- Set to minimum required Flash Player version or 0 for no version detection --> var swfVersionStr = "10.0.2"; <!-- xiSwfUrlStr can be used to define an express installer SWF. --> var xiSwfUrlStr = ""; var flashvars = {}; var params = {}; params.quality = "best"; params.bgcolor = "#000000"; params.play = "true"; params.loop = "true"; params.wmode = "window"; params.scale = "showall"; params.menu = "true"; params.devicefont = "false"; params.salign = ""; params.allowscriptaccess = "sameDomain"; params.allowFullScreen = "true"; var attributes = {}; attributes.id = "TITULO DO SITE"; attributes.name = "TITULO DO SITE"; attributes.align = "middle"; swfobject.createCSS("html", "height:100%; background-color: #000000;"); swfobject.createCSS("body", "margin:0; padding:0; overflow:hidden; height:100%;"); swfobject.embedSWF( "SITE.swf", "SITE", "100%", "100%", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes, "expressInstall.swf" ); swffit.fit("SITE.swf", 950, 600);//950 represents the minimum width and //600 represents the minimum height //which are the boundaries for triggering scrollbars - Use your own appropriate values. </script> </head> <body> <!-- SWFObject's dynamic embed method replaces this alternative HTML content for Flash content when enough JavaScript and Flash plug-in support is available. --> <div id="TITULO DO SITE"> <h1>EXPLICAÇÃO DO SITE</h1> <h2>centro</h2> <p>O <strong>TITULO DO SITE</strong> OUTRA EXPLICAÇÃO DO SITE <strong>ALGO MUITO RELEVANTE RELATIVO AO SITE</strong> OUTRA EXPLICAÇÃO DO SITE.<p> <a href="http://www.adobe.com/go/getflash"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a> <p>This page requires Flash Player version 10.0.2 or higher.</p> </div> </body> </html> AS3 //stop(); import app.*; import navigation.*; import swffit.*; import fl.transitions.Tween; import fl.transitions.easing.*; import flash.display.Stage; import flash.display.StageScaleMode; import flash.display.StageAlign; //*******CODIGO SWFAddress*********// import com.asual.*; SWFAddress.addEventListener(SWFAddressEvent.CHANGE, changeURL); function changeURL(e:SWFAddressEvent):void { if (e.value != "/") { SWFAddress.setTitle("TITULO DO SITE - " + e.value.substring(1)); } else { SWFAddress.setTitle("TITULO DO SITE - NOME DA HOMEPAGE"); } switch (e.value) { case "/home" : abre_home(null); break; case "/About" : abre_About(null); break; case "/Contato" : abre_Contato(null); break; case "/GoogleMap" : abre_GoogleMap(null); break; case "/" : abre_home(null); break; } } var carregarswf:Loader = new Loader();//utiliza o mesmo carregador pra todos os swf container_mc.addChild(carregarswf); //abre_home(null);//carrega primeiro a home.swf /********************* * EVENTS *********************/ //carregarswf.addEventListener(MouseEvent.CLICK, someImagem); b1_btn.addEventListener(MouseEvent.CLICK, abre_home); b2_btn.addEventListener(MouseEvent.CLICK, abre_About); b3_btn.addEventListener(MouseEvent.CLICK, abre_Contato); b4_btn.addEventListener(MouseEvent.CLICK, abre_GoogleMap); */********************* * FUNCTIONS *********************/ /* function someImagem(meuEvento:MouseEvent):void { carregarswf.unload();//descarrega conteudo do loader }*/ function abre_home(e:MouseEvent):void { carregarswf.load(new URLRequest("home.swf")); SWFAddress.setValue("home"); } function abre_About(e:MouseEvent):void { carregarswf.load(new URLRequest("About.swf")); SWFAddress.setValue("About"); } function abre_Contato(e:MouseEvent):void { carregarswf.load(new URLRequest("Contato.swf")); SWFAddress.setValue("Contato"); } function abre_GoogleMap(e:MouseEvent):void { carregarswf.load(new URLRequest("GoogleMap.swf")); SWFAddress.setValue("GoogleMap"); } Quote Link to comment Share on other sites More sharing options...
0 IAMDIX Posted December 7, 2011 Author Report Share Posted December 7, 2011 Consegui resolver e aqui vai a solução para historicoTem que entender como o SWFAddress funciona:1. The usuario clica no botão2. SWFAddress.setValue("home") para dizer ao navegador a palavra que queremos usar 3. SWFAddress.CHANGE event4. Ação dependendo do value//stop(); import app.*; import navigation.*; import swffit.*; import fl.transitions.Tween; import fl.transitions.easing.*; import flash.display.Stage; import flash.display.StageScaleMode; import flash.display.StageAlign; import com.asual.*; var carregarswf:Loader = new Loader();//utiliza o mesmo carregador pra todos os swf container_mc.addChild(carregarswf); abre_home(null);//carrega primeiro a home.swf /********************* * EVENTS *********************/ //carregarswf.addEventListener(MouseEvent.CLICK, someImagem); b1_btn.addEventListener(MouseEvent.CLICK, abre_home); b2_btn.addEventListener(MouseEvent.CLICK, abre_About); b3_btn.addEventListener(MouseEvent.CLICK, abre_Contato); b4_btn.addEventListener(MouseEvent.CLICK, abre_GoogleMap); */********************* * FUNCTIONS *********************/ /* function someImagem(meuEvento:MouseEvent):void { carregarswf.unload();//descarrega conteudo do loader }*/ function abre_home(e:MouseEvent):void { carregarswf.load(new URLRequest("home.swf")); SWFAddress.setValue("home"); } function abre_About(e:MouseEvent):void { carregarswf.load(new URLRequest("About.swf")); SWFAddress.setValue("About"); } function abre_Contato(e:MouseEvent):void { carregarswf.load(new URLRequest("Contato.swf")); SWFAddress.setValue("Contato"); } function abre_GoogleMap(e:MouseEvent):void { carregarswf.load(new URLRequest("GoogleMap.swf")); SWFAddress.setValue("GoogleMap"); } //*******SWFAddress*********// SWFAddress.addEventListener(SWFAddressEvent.CHANGE, changeURL); function changeURL(e:SWFAddressEvent):void { if (e.value != "/") { SWFAddress.setTitle("TITULO DO SITE - " + e.value.substring(1)); } else { SWFAddress.setTitle("TITULO DO SITE - NOME DA HOMEPAGE"); } switch (e.value) { case "/home" : abre_home(null); break; case "/About" : abre_About(null); break; case "/Contato" : abre_Contato(null); break; case "/GoogleMap" : abre_GoogleMap(null); break; case "/" : abre_home(null); break; } } Quote Link to comment Share on other sites More sharing options...
Question
IAMDIX
para testar por completo nosso site em Flash, serve usar o Publish em html do proprio programa ou precisa ter um servidor localhost tipo o wamp?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.