Jump to content
Search Community

raccoon

Members
  • Posts

    19
  • Joined

  • Last visited

raccoon's Achievements

0

Reputation

  1. Thank you for your answers, problem solved, it was a timeline problem
  2. Thank you for your answer, what should i do?
  3. Hello i made a simple menu with TimelineMMax, but is not working fine, this is the code: stop(); import com.greensock.*; import com.greensock.easing.*; import flash.events.MouseEvent; var timeline:TimelineMax= new TimelineMax({paused:true}); var timeline2:TimelineMax= new TimelineMax({paused:true}); timeline.append(TweenMax.to(container, 3, {x:0, y:-1000, rotation:0, scaleX:1, scaleY:1})); timeline.append(TweenMax.to((container.nos.fondo), 5, {alpha:.6})); timeline2.append(TweenMax.to(container, 3, {x:1550, y:-1000, rotation:90, scaleX:1, scaleY:1})); timeline2.append(TweenMax.to((container.des.fondo), 5, {alpha:.6})); nos.addEventListener(MouseEvent.CLICK, go); function go(e:MouseEvent):void { timeline2.reverse(); timeline.play(); } des.addEventListener(MouseEvent.CLICK, go2); function go2(e:MouseEvent):void { timeline.reverse(); timeline2.play(); } sample into the file Thanks...
  4. Hello, i want to make a menu like this: http://www.jeanmalek.com/ how can i reverse the present movie clip and when clicked another button play another movie clip? Thank you
  5. this is i want to do, but, using the if statement or applying to a for loop: stop(); import com.greensock.*; import com.greensock.easing.*; import flash.events.MouseEvent; var timeline:TimelineMax= new TimelineMax({paused:true, onComplete:prueba2}); var timeline2:TimelineMax= new TimelineMax(); timeline.append(new TweenMax(alfa,3, {x:5, ease:Elastic.easeInOut})); timeline.append(TweenMax.to((alfa.beta),3, {x:5, ease:Elastic.easeInOut})); timeline.append(TweenMax.to((alfa.beta.teta),3, {x:5, alpha:1, ease:Elastic.easeInOut})); boton.addEventListener(MouseEvent.CLICK, prueba); function prueba(e:MouseEvent):void{ timeline.play(); } boton2.addEventListener(MouseEvent.CLICK, prueba2); function prueba2():void{ timeline.reverse(); timeline2.append(new TweenMax(alfa,3, {x:20, ease:Elastic.easeInOut})); }
  6. thank you for your help, i want to reverse a movie clip when clicked another button, then play another movie clip
  7. Hello, I'm trying to control the tween max timeline, i want to reverse a movie clip when clicked another button, write a for loop but i don't know how to finish it. Thanks for your help stop(); import com.greensock.*; import com.greensock.easing.*; import flash.events.MouseEvent; import flash.events.Event; TweenMax.to(olas,3, {x:5, repeat:-1, yoyo:true, blurFilter:{blurX:5}, ease:Back.easeInOut}); //botones var menu=[nos,des,atl,buc,pla,gal,con]; for each (var botones in menu) { botones.addEventListener(MouseEvent.CLICK, clickmouse); } var timeline:TimelineMax= new TimelineMax({paused:true}); //event listener botones function clickmouse(e:MouseEvent):void { // gotoAndStop(e.target.name); for each (var botones in menu) { if (e.target==botones) { botones.enabled=false; botones.gotoAndStop( "disabled" ); timeline.play(); } else { botones.enabled=true; botones.gotoAndStop( "_up" ) } } } nos.addEventListener(MouseEvent.CLICK, go); function go(e:MouseEvent):void { timeline.append(TweenMax.to(container, 3, {x:0, y:-1000, rotation:360, scaleX:1, scaleY:1, /*blurFilter:{blurY:3, remove:true},*/ ease:Elastic.easeInOut})); timeline.append(TweenMax.to((container.nos.fondo), 2, {alpha:.6})); } des.addEventListener(MouseEvent.CLICK, go2); function go2(e:MouseEvent):void { timeline.append(TweenLite.to(container, 3, {x:1550, y:-1000, rotation:-270, scaleX:1, scaleY:1, /*blurFilter:{blurY:10, remove:true},*/ ease:Elastic.easeInOut})); timeline.append(TweenMax.to((container.des.fondo), 2, {alpha:.6})); }
  8. Thanks for your help I'll appreciated.
  9. thanks for your answer change for onCompleteAll but the function goTo does not work yet.
  10. thank for your answer again, but, i'm stuck with this preloader, i change the code again and i can't finished yet, the code works well in all browser until i want to load the next frame, my intention is not to bother you, but, i really need help, here's the new code and function in red is causing the problem. Thanks for your help. stop(); import com.greensock.*; import com.greensock.easing.*; import com.greensock.TimelineMax; var total:Number; var loaded:Number; //calls the event listener to listen for the loading function loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler); //Building the loading function function progressHandler(e:ProgressEvent):void{ total = this.stage.loaderInfo.bytesTotal; loaded = this.stage.loaderInfo.bytesLoaded; var loadedPercentage:Number = (loaded/total) * 100; //If over 20% is loaded, tween the first circle. if (loadedPercentage > 20) { //Tween the circle TweenMax.to(c1, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If over 40% is loaded, tween the second circle. if (loadedPercentage > 40) { //Tween the circle TweenMax.to(c2, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If over 60% is loaded, tween the third circle. if (loadedPercentage > 60) { //Tween the circle TweenMax.to(c3, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If over 80% is loaded, tween the fourth circle. if (loadedPercentage > 80) { //Tween the circle TweenMax.to(c4, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If 100% is loaded, tween the fifth circle. if (loadedPercentage == 100) { //Tween the circle TweenMax.to(c5, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); if (total==loaded){ TweenMax.allTo([c1,c2,c3,c4,c5], 1, {x: -200, alpha: 0, onComplete:goTo}, .1); trace("done"); } } } function goTo():void{ nextFrame(); trace("done2"); }
  11. Thank you for your answer again, you're very kind, the line works, but the fifth tween does not run, how can i add a gap to this tween to be completed? //If 100% is loaded, tween the fifth circle. if (loadedPercentage == 100) { //Tween the circles myTimeline.append(TweenMax.to(c5, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}})); TweenMax.allTo([c1,c2,c3,c4,c5], .5, {x: -200, alpha:0}, .1, nextFrame); //tells the movie if everything is loaded to remove the loading function and play the next frame if (total == loaded){ this.removeEventListener(Event.ENTER_FRAME, loading); } } }
  12. Thank you for your answer, i followed your advise, improved the code, now it works but, it can't play the next frame after the time line is finished, used onComplete property, and does not work, what I'm i doing wrong. thank you again. here's the code: stop(); import com.greensock.*; import com.greensock.easing.*; import com.greensock.TimelineMax; //calls the event listener to listen for the loading function this.addEventListener(Event.ENTER_FRAME, loading); //Building the loading function function loading(e:Event):void{ var total:Number = this.stage.loaderInfo.bytesTotal; var loaded:Number = this.stage.loaderInfo.bytesLoaded; var loadedPercentage:Number = (loaded/total) * 100; var myTimeline:TimelineMax=new TimelineMax(); //If over 20% is loaded, tween the first circle. if (loadedPercentage > 20) { //Tween the hex TweenMax.to(c1, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If over 40% is loaded, tween the second circle. if (loadedPercentage > 40) { //Tween the hex myTimeline.append(TweenMax.to(c2, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}})); } //If over 60% is loaded, tween the third circle. if (loadedPercentage > 60) { //Tween the hex myTimeline.append(TweenMax.to(c3, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}})); } //If over 80% is loaded, tween the fourth circle. if (loadedPercentage > 80) { //Tween the hex myTimeline.append(TweenMax.to(c4, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}})); } //If 100% is loaded, tween the fifth circle. if (loadedPercentage == 100) { //Tween the circles myTimeline.append(TweenMax.to(c5, 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}})); myTimeline.appendMultiple(TweenMax.allTo([c1,c2,c3,c4,c5], 0.5, {x: -200, alpha:0, onComplete:nextframe},.1)); } function nextframe():void { //tells the movie if everything is loaded to remove the loading function and play the next frame if (total == loaded){ play(); this.removeEventListener(Event.ENTER_FRAME, loading);} } }
  13. Hello im testing testing a new web site http://www.deepvfx.com/test I've created a preloader into the about section with the tweening platform 11 and the preloader works in Firefox And Chrome but in IE8 does not, then, created a basic preloader with plain as3 and it works, posting the code hoping to find a solution. Thanks for your help stop(); import com.greensock.*; import com.greensock.easing.*; import com.greensock.TimelineMax; //This array will contain all the preloader circles var circles:Array = [c1,c2,c3,c4,c5]; //Listen for the loading progress loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler); //This function is called as the loading progresses function progressHandler(e:ProgressEvent):void { //Check how much has been loaded (in percentages) var loadedPercentage:Number = (e.bytesLoaded * 100 / e.bytesTotal); //If over 20% is loaded, tween the first circle if it hasn't been tweened yet. if (loadedPercentage>20&&! circles[0].tweened) { //Tween the circle TweenMax.to(circles[0], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If over 40% is loaded, tween the second circle if it hasn't been tweened yet. if (loadedPercentage>40&&! circles[1].tweened) { //Tween the circle TweenMax.to(circles[1], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If over 60% is loaded, tween the third circle if it hasn't been tweened yet. if (loadedPercentage>60&&! circles[2].tweened) { //Tween the circle TweenMax.to(circles[2], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If over 80% is loaded, tween the fourth circle if it hasn't been tweened yet. if (loadedPercentage>80&&! circles[3].tweened) { //Tween the circle TweenMax.to(circles[3], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}}); } //If 100% is loaded, tween the fifth circle if it hasnn't been tweened yet. if (loadedPercentage==100&&! circles[4].tweened) { //Tween the circle and call the function circlesTweened() when the tween is complete (this is the last circle). TweenMax.to(circles[4], 1, {tint:0xff0000, glowFilter:{color:0xff0000, alpha:1, blurX:10, blurY:10}, onComplete: circlesTweened}); } } //This function is called when the cirlces have been tweened (the image is loaded) function circlesTweened():void { //Loop through the circles for (var i = 0; i < circles.length; i++) { //Tween the circles to the left side of the stage. //Call the function circleLeft() when the tween is finished TweenMax.to(circles[i], 0.5, {delay: i * 0.1, x: -200, alpha: 0, onComplete: circleLeft, onCompleteParams: [circles[i]]}); } } //This function is called when a circle is animated to the left side. function circleLeft(circle:Circulo):void { //Check if the circle is the last one (most right) if (circle==circles[4]) { nextFrame(); } }
  14. Hello i'm working with this code, how can I improve the code especially with the TimelineLite class thank you import com.greensock.*; import com.greensock.easing.*; import com.greensock.TimelineLite; var menuItems:Array = [menu_mc2, menu_mc3, menu_mc4, menu_mc5, menu_mc6, menu_mc7, menu_mc8, menu_mc9]; var menuTimeline:TimelineLite = new TimelineLite({paused:true}); menuTimeline.appendMultiple( TweenMax.allTo(menuItems, 0.2, {y:"35", ease:Linear.easeNone}) ); var menu1:Array = menuItems.slice(1); var menuTimeline1:TimelineLite = new TimelineLite({paused:true}); menuTimeline1.appendMultiple( TweenMax.allTo(menu1, 0.2, {y:"70", ease:Linear.easeNone}) ); //button1 menu_mc1.addEventListener(MouseEvent.ROLL_OVER,showMenu); menu_mc1.addEventListener(MouseEvent.ROLL_OUT,hideMenu); function showMenu(event:MouseEvent) :void{ menuTimeline.timeScale = 1; menuTimeline.play(); } function hideMenu(event:MouseEvent):void { menuTimeline.timeScale = 0.5; //makes it go half as fast menuTimeline.reverse(); } menu_mc2.addEventListener(MouseEvent.ROLL_OVER,showMenu2); menu_mc2.addEventListener(MouseEvent.ROLL_OUT,hideMenu2); function showMenu2(event:MouseEvent) :void{ menuTimeline1.timeScale = 1; menuTimeline1.play(); } function hideMenu2(event:MouseEvent):void { menuTimeline1.timeScale = 0.5; //makes it go half as fast menuTimeline1.reverse(); }
×
×
  • Create New...