Mittitier 0 Denunciar post Postado Outubro 23, 2008 Oi pessoal, sou novo aqui no fórum como membro registrado, mais entro digamos, todos os dias pra ver e tentar decifrar as dúvidas e tudo mais... mais surgiu uma dúvida minha agora a respeito do PageFlip... Aqui no meu estágio eu consigo visualizar normalmente o pageFlip pelo mozilla, nos complementos do mozilla tem o Shockwave 8.0 r22, e lá em casa por exemplo é o mozzila com Shockwave 10.0 r17 e não executa o pageFlip, ele dá como se eu tivesse que baixar o plugin, sendo que eu ja o tenho... Alguma solução simples pra isso ? Como Sean citou em seu .fla eu publiquei como Flash player 6.0 e nada.. já mudei pra 7.0, com as devidas modificações de 'case' e não funcionou... Tentem visualizar o mesmo : http://www.clubeararaquarense.com.br/index2.html Ele está na parte: O Clube/Fotos Preciso de alguma informação possível pra ser visualizados por todos e em qualquer navegador, obrigado. :) vmittitier@hotmail.com [msn] viniciusmittitier@uol.com.br [e-mail] Compartilhar este post Link para o post Compartilhar em outros sites
Mittitier 0 Denunciar post Postado Outubro 24, 2008 nenhuma ajuda? =c Compartilhar este post Link para o post Compartilhar em outros sites
Antoniosp 2 Denunciar post Postado Outubro 24, 2008 Ãh... calma cara! Não deu nem uma hora entre a postagem e a insistência :P Então, comigo também não abriu não. Deve ser a restrição feita no próprio pageflip mesmo, mas como está o código da restrição? Compartilhar este post Link para o post Compartilhar em outros sites
Mittitier 0 Denunciar post Postado Outubro 24, 2008 Desculpa amigo, eu sou meio novo aqui... hehehe Eu sou calmo sem problemas! :) Sou novo no Flash também... mais quanto a algum código de restrição... eu não alterei nada no PageFlip do Sean, apenas adicionei páginas e tudo mais.. requiredVersion = 6; version = getVersion(); flash_ver = version.split(" "); if (flash_ver[1].charAt(0)-0>=requiredVersion) { gotoAndPlay(4); }Este código é o que verifica a versao do plugin SWF... A única diferença que vi foi no browser aqui do Clube onde trabalho foi a versão 8.0 r20 e a minha em casa 10.0 r17... mais por eu ter exportado o .swf como flash player 6.0 acredito eu que deveria rodar em qualquer versão do plugin superior não ? Luzes ? :rolleyes: Compartilhar este post Link para o post Compartilhar em outros sites
Eder Fortunato 15 Denunciar post Postado Outubro 24, 2008 o problema não é a versão que você publica, e sim a versão de quem esta visualizando mas tente simplesmente deletar essa esse código ai.... []´s Compartilhar este post Link para o post Compartilhar em outros sites
Mittitier 0 Denunciar post Postado Outubro 27, 2008 E aii amigo.. Eu simplesmente deletei o código, mais ai não faz nenhuma check version, e pede pra instalar o plugin de forma erronia... Acredito que mais pessoas tem utilizado este pageflip e mesmo em outro navegador eu já vi funcionando, no meu por exemplo. Por isso tenho esperanças... vou postar todos os códigos aqui...: requiredVersion = 6; version = getVersion(); flash_ver = version.split(" "); if (flash_ver[1].charAt(0)-0>=requiredVersion) { gotoAndPlay(4); } stop(); E tem um outro stop();no frame 14 // // P i X E L W i T . C O M // stop(); // // // // // //________________________C O M M E N T S // // Thought to self: // Try naming functions according to the events which preclude them // // // A page flip involves 3 pieces of paper // 2 bottom static pages (which lay flat at all times) // and 1 active flipping page (which has 2 sides) // Four pages total, 2 static/stationary and 2 flipping // The flipping page can be on the left or right side // The top image on the flipping page doesn't actually move // // // // // //_________________________V A R I A B L E S // // Store a constant reference to this clip on the main timeline so // clip can be referenced from any other timeline as _level0.pagesAbs _level0.pagesAbs = this; // Set page dimensions var pageWi = 286.0; var pageHi = 390.0; var pageWIhi = pageWi+pageHi; var pivotY = pageHi/2+pageWi; var pageColor = 0xFF9900; // "dir" equals either 1 or -1 and determines if you // are flipping forward or backward through the book var dir = 1; // "flipPage" is the # "between" the two flipping page #'s var flipPage = 1.5; // "curPage" is the # between the two currently viewed page #'s var curPage = .5; // "maxPages" should be an even number var maxPages = 10; // "autoStep" percentage of page width determining step size when auto-closing var autoStep = .05; // "dragging" is true if you are dragging the page var dragging = false // // // // // //________________________________R U N O N C E // // Place Left and Right page flip Buttons this.attachMovie ("cornerButton", "RButton", 11); with (RButton) { _x = pageWi; _y = -pageWi; } this.attachMovie ("cornerButton", "LButton", 12); with (LButton) { _x = -pageWi; _y = -pageWi; _xscale = -100; } // // // Build pages for first time pageInit (flipPage, dir); // Drop down to appear centered _y+=pivotY; // // // // // // _____________________B U I L D F U N C T I O N S // // Create a left-aligned page-sized solid fill raised one pagewidth function makePage (targ, xQuadrant) { with (targ) { beginFill(pageColor, 100); moveto(0, -pageWi); lineto(0, -pageWIhi); lineto(xQuadrant*pageWi, -pageWIhi); lineto(xQuadrant*pageWi, -pageWi); endFill(); } } // // // Create a left-aligned page-sized shadow gradient raised one pagewidth // Shade is used to add depth to stationary pages function makeShade (targ, xQuadrant) { with (targ) { // Defines gradient used as shadow overlay var colors = [0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000]; var alphas = [ 40, 25, 15, 5, 0, 1, 6]; var ratios = [ 0, 1, 17, 51, 89, 132, 255]; var matrix = { matrixType:"box", x:0, y:pageWi, w:xQuadrant*pageWi, h:pageHi, r:0}; beginGradientFill( "linear", colors, alphas, ratios, matrix ); moveto(0, -pageWi); lineto(0, -pageWIhi); lineto(xQuadrant*pageWi, -pageWIhi); lineto(xQuadrant*pageWi, -pageWi); endFill(); } } // // // create a bottom-left aligned shadow gradient // for animated shadows function makeShadow (targ, xQuadrant) { with (targ) { // Defines gradient used as shadow overlay var colors = [0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000]; var alphas = [ 40, 25, 15, 5, 0, 1, 6]; var ratios = [ 0, 1, 17, 51, 89, 132, 255]; var maxLength = Math.sqrt((pageWi*pageWi)+(pageWIhi*pageWIhi)); var matrix = { matrixType:"box", x:0, y:-maxLength, w:xQuadrant*pageWi, h:maxLength-pageWi, r:0}; beginGradientFill( "linear", colors, alphas, ratios, matrix ); moveto(0, -pageWi); lineto(0, -maxLength); lineto(xQuadrant*pageWi, -maxLength); lineto(xQuadrant*pageWi, -pageWi); endFill(); } } // // // Place Stationary Pages function setStationary() { // Place the "S"tationary "L"eft "P"age createEmptyMovieClip("SLPage", 1); if (flipPage!=1.5) { makePage (SLPage, -1) SLPage.attachMovie("print"+(flipPage-1.5), "Print", 1); with (SLPage.Print) { _x = -pageWi/2; _y = -pivotY; } } // Place the "S"tationary "R"ight "P"age createEmptyMovieClip("SRPage", 2); if (flipPage!=maxPages-.5){ makePage (SRPage, 1) SRPage.attachMovie("print"+(flipPage+1.5), "Print", 1); with (SRPage.Print) { _x = pageWi/2; _y = -pivotY; } } // Place shade on page not being revealed var targ = dir>0 ? SLPage : SRPage; targ.createEmptyMovieClip("Shade", 2); makeShade(targ.Shade, -dir); } // // // Place the Flipping Pages function setFlipping() { var targ; // Place the "F"lipping "T"op "P"age createEmptyMovieClip("FTPage", 3); makePage (FTPage, dir) with (FTPage) { attachMovie("print"+(flipPage-dir*.5), "Print", 1); with (Print) { _x = dir*pageWi/2; _y = -pivotY; } } FTPage.createEmptyMovieClip("Shade", 2); makeShade(FTPage.Shade, dir); // Place the "F"lipping "B"ottom "P"age createEmptyMovieClip("FBPage", 4); makePage (FBPage, -dir) FBPage.attachMovie("print"+(flipPage+dir*.5), "Print", 1); with (FBPage.Print) { _x = -dir*pageWi/2; _y = -pivotY; } FBPage._rotation = dir*90; } // // // Creates Shadows which follow edge of transition function setShadows() { var targ; // Place shadow on the "F"lipping page this.createEmptyMovieClip("FShadow", 5); makeShadow(FShadow, -dir); FShadow._rotation = dir*45; // Place shadow on the "S"tationary page this.createEmptyMovieClip("SShadow", 6); makeShadow(SShadow, dir); SShadow._rotation = dir*45; } // // // Create Masks to hide everything function makeMasks() { // Create mask for Flipping Bottom Page Mask this.createEmptyMovieClip("FBPageMask", 7); with (FBPageMask) { beginFill(0x008800, 100); lineto(pageWIhi, -PageWiHi); curveto(0, -2*PageWiHi, -pageWIhi, -pageWIhi); endFill(); } // Create mask for Flipping Top Page FBPageMask.duplicateMovieClip("FTPageMask", 8); // Create mask for Shadow on the Flipping Page this.createEmptyMovieClip("FShadowMask", 9); makePage (FShadowMask, -dir); FShadowMask._rotation = dir*90; // Create mask for Shadow on Stationary Page this.createEmptyMovieClip("SShadowMask", 10); makePage(SShadowMask, dir); FBPage.setMask(FBPageMask); FTPage.setMask(FTPageMask); FShadow.setMask(FShadowMask); SShadow.setMask(SShadowMask); } // // // Hide pages before page1 and after Last Page function limitBook () { if (flipPage==1.5) { SLPage._visible = 0; LButton._visible = 0; SShadow._visible = 0; if (dir==1) { FTPage.Shade._alpha = 67; SShadow._visible = 1; }else { FShadow._alpha = 67; } } else if (flipPage==maxPages-.5) { SRPage._visible = 0; RButton._visible = 0; SShadow._visible = 0; if (dir==-1) { FTPage.Shade._alpha = 67; SShadow._visible = 1; } else { FShadow._alpha = 67; } } } // // // How to position all pages needed for a page flip // calls all functions listed above function pageInit (cp, d) { flipPage = cp; dir = d; //trace ("flip page = "+flipPage+" dir = "+dir); setStationary(); setFlipping(); setShadows(); makeMasks(); limitBook (); } // // // // // //__________________F L I P P I N G F U N C T I O N S // // How to adjust position of flipping page // based on a value between 0 and 1 function flip(curVal) { var rot = dir*45*curVal; FBPageMask._rotation = FTPageMask._rotation = -rot; FBPage._rotation = FShadowMask._rotation = (dir*90)-rot*2; FShadow._rotation = SShadow._rotation=(dir*45)-rot; } // // // how to determine position of flipping page // returns a value between 0 and 1 // zero being no-flip and one being full-flip function getPageRatio () { if (dragging) { // if dragging page position is determined by mouse position // the 20 helps advance the turning page when the button is pressed pageRatio = -dir*(_xmouse-startX-dir*20)/(2*pageWi); } else { // if not dragging; auto increment page towards final position pageRatio>2/3 ? pageRatio += autoStep : pageRatio -= autoStep; } // if out of bounds if (pageRatio<=0) { pageRatio = 0; if (!dragging) { flipDone(); } } else if (pageRatio>=1) { pageRatio = 1; if (!dragging) { flipDone(); } } return (pageRatio); } // // // // // //_____________C O N T R O L I N G F U N C T I O N S // // What to do when you press a page flipping button function startFlip (dir) { pageInit (curPage+dir, dir); startX = dir*pageWi; dragging = true; RButton._alpha=0; Lbutton._alpha=0; this.onEnterFrame = function () { flip(getPageRatio()); } } // // // what to do when page is released function flipRelease () { dragging = false; if (pageRatio>2/3) { curPage+=2*dir; } } // // // What to do when pages are done flipping function flipDone () { this.onEnterFrame = null; RButton._alpha = 100; LButton._alpha = 100; if (curPage!=.5){ LButton._visible = 1; } if (curPage!=maxPages+.5){ RButton._visible = 1; } // Delete hidden pages to save resources if (pageRatio==0) { FShadow.removeMovieClip(); FShadowMask.removeMovieClip(); SShadow.removeMovieClip(); SShadowMask.removeMovieClip(); FBPage.removeMovieClip(); FBPageMask.removeMovieClip(); if (dir==1) { SRPage.removeMovieClip(); } else { SLPage.removeMovieClip(); } } else { FTPage.removeMovieClip(); if (dir==-1) { SRPage.removeMovieClip(); } else { SLPage.removeMovieClip(); } } FTPageMask.removeMovieClip(); } // // // assign functions to button events LButton.onPress = function() { startFlip (-1); } LButton.onReleaseOutside = function () { flipRelease(); } LButton.onRelease = function () { flipRelease(); } RButton.onPress = function() { startFlip (1); } RButton.onReleaseOutside = function () { flipRelease(); } RButton.onRelease = function () { flipRelease(); } // // // // // Estes são todos os códigos que achei no aplicativo. []'s Compartilhar este post Link para o post Compartilhar em outros sites
Antoniosp 2 Denunciar post Postado Outubro 27, 2008 Well... troque o código de restrição (aquele q você tinha deletado) por: gotoAndPlay(4); Compartilhar este post Link para o post Compartilhar em outros sites
Mittitier 0 Denunciar post Postado Outubro 28, 2008 Olá Antonino! Bom eu disponibilizei o novo arquivo .swf no site que eu citei nos post de cima... se possível faça a gentileza, vai lá na seção O Clube > Fotos tente visualizar e me diga se funcionou, vou tentar em casa também... quando publiquei no FLash com o gotoAndPlay(4); ele passou direto, como se não houvesse problemas...vamos ver nos navegadores do pessoal. Compartilhar este post Link para o post Compartilhar em outros sites
Antoniosp 2 Denunciar post Postado Outubro 28, 2008 Aqui foi ok. Compartilhar este post Link para o post Compartilhar em outros sites
Mittitier 0 Denunciar post Postado Outubro 29, 2008 Ae Antonino!! Hahaha Em casa deu também..e eu pedi pra algum amigos tb visualizarem e foi tudo bem!! euréca :) Resolvido! Obrigado! Não sei se a dúvida foi muito tola, mais é que eu sempre quis mexer com Flash...sempre aprendi fazer motion tween..ahhaha...e agora quando eu menos esperava...fiz um site todo em Flash...então dá um desconto :P Abração http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gif Compartilhar este post Link para o post Compartilhar em outros sites