n3wt 0 Denunciar post Postado Junho 5, 2009 Estou trabalhando com um arquivo no Flash CS4 utilizando o AS3, o problema é o seguinte... tive q converter o arquivo p/ cs3 p/ poder usá-lo no trabalho mas quando mando ele testar, ele da o report de erros que está tendo erros na linha 65 e 89 e não entendo como não está funcionando bem sendo que em casa o arquivo funciona lindo e liso. Alguém pode me dar uma ajuda?! segue abaixo o AS utilizado. /* Developed by n3wt */ package Classes { /* Import required classes for animation */ import fl.transitions.Tween; import fl.transitions.TweenEvent; import fl.transitions.easing.Strong; /* Import required classes */ import flash.display.*; import flash.utils.Timer; import flash.events.*; public class Flip extends Sprite { /* Declare variables to use outside the main function (flip), they get it's value from constructor function, self explaining names */ private var firstView:DisplayObject; private var secondView:DisplayObject; private var initFromSide:String; private var duration:int; private var flipTween:Tween; private var addSecondView:Boolean; private var added:Boolean = false; private var timer:Timer = new Timer(1); /* Flip starter function */ public function Flip(frontObject:DisplayObject, backObject:DisplayObject, timeInSeconds:int, flipFromSide:String, secondViewIsInLibrary:Boolean):void { firstView = frontObject; secondView = backObject; duration = timeInSeconds; initFromSide = flipFromSide; addSecondView = secondViewIsInLibrary; animateFirstView(); timer.addEventListener(TimerEvent.TIMER, checkFlip); } private function animateFirstView():void { flipTween = new Tween(firstView,"scaleX",Strong.easeIn,1,0.5,duration/2,true); flipTween = new Tween(firstView,"scaleY",Strong.easeIn,1,0.5,duration/2,true); if (initFromSide == "left") { flipTween = new Tween(firstView,"rotationY",Strong.easeIn,0,90,duration / 2,true); timer.start(); } else if (initFromSide == "right") { flipTween = new Tween(firstView,"rotationY",Strong.easeIn,0,-90,duration / 2,true); timer.start(); } } private function checkFlip(e:TimerEvent):void { if (initFromSide == "right" && firstView.rotationY >= 90) { timer.stop(); firstView.visible = false; if (addSecondView && ! added) { secondView.x = firstView.x; secondView.y = firstView.y; addChild(secondView); added = true; } else { /* If second view is in stage */ secondView.x = firstView.x; secondView.y = firstView.y; } animateSecondView(); } else if (initFromSide == "left" && firstView.rotationY <= -90) { timer.stop(); firstView.visible = false; if (addSecondView && ! added) { secondView.x = firstView.x; secondView.y = firstView.y; addChild(secondView); added = true; } else { /* If second view is in stage */ secondView.x = firstView.x; secondView.y = firstView.y; } animateSecondView(); } } private function animateSecondView():void { flipTween = new Tween(secondView,"scaleX",Strong.easeOut,0.5,1,duration/2,true); flipTween = new Tween(secondView,"scaleY",Strong.easeOut,0.5,1,duration/2,true); if (initFromSide == "left") { flipTween = new Tween(secondView,"rotationY",Strong.easeOut,-90,0,duration / 2,true); firstView.visible = true; } else if (initFromSide == "right") { flipTween = new Tween(secondView,"rotationY",Strong.easeOut,90,0,duration / 2,true); firstView.visible = true; } } } } Compartilhar este post Link para o post Compartilhar em outros sites
Eder Fortunato 15 Denunciar post Postado Junho 5, 2009 as duas linhas que você citou tem a mesma propriedade "rotationY" pelo que pesquisei aqui elas foram inseridas no flashPlayer 10, então só funcionam se compilar no flash CS4 []´s Compartilhar este post Link para o post Compartilhar em outros sites