Jump to content
Search Community

BENBOB

Members
  • Posts

    3
  • Joined

  • Last visited

BENBOB's Achievements

0

Reputation

  1. Thanks for the help Carl. In the end I had a bit of brainwave and modified the original code and added an if statement to determine what happened the first time it runs, and now seems to work fine Btw I checked out your website and subscribed to you on YouTube. Some interesting effects I might have to try out sometime Bit offtopic but does anyone happen to know if theres a similar type plugin for Adobe After Effects? Id like to try out all these super smooth bouncing type animations in there too!
  2. Thanks for the reply Jack. I tried your suggestion but unfortunately it still didnt work correctly - it just faded once through two images simultaneously then stopped. Since its so close to working with my modified code (it just messes up the first time it runs) I think its probably just missing something to set up the initial state?? In case the original code is putting people off, to explain it more clearly, all I want to do is simply fade between three images, referenced from an external xml file. For example: Display Image 1 for 5 seconds -> Fade to Image 2 -> Display Image 2 for 5 seconds -> Fade to Image 3 -> Display Image 3 for 5 seconds -> Fade to Image 1 and repeat indefinitely. Compared to the examples of what Greensock can do I would have thought this would be fairly simple! lol Anyone got any thoughts?
  3. Hi, I have a FLA doc which features a 'shuffle effect' between two images assigned in an external XML file. However, I would like to modify the code so that it just has a simple fading effect but between three images (tho needs to be easy to add more in future). My ActionScript knowledge is kinda lacking but I had a go at modifying some of the code. To my surprise it actually nearly works! It just messes up the first time it runs and skips one of the images, but after that works perfectly. So I guess its just missing an initial condition statement? Heres the code Ive got so far: /////////////////////////////////////////Shuffle Effect//////////////////////////////// function Shuffle():void { var anotherTimer:Timer= new Timer(5000); anotherTimer.addEventListener(TimerEvent.TIMER, changeAnotherPic) anotherTimer.start(); } function changeAnotherPic(e:TimerEvent) { var pic1 = another_group.getChildAt(another_group.numChildren-1); var pic2 = another_group.getChildAt(another_group.numChildren-2); TweenMax.to(pic1,0.5,{alpha:1,onComplete:resetImg1,onCompleteParams:[pic1]}); TweenMax.to(pic2,0.5,{alpha:0,onComplete:resetImg2,onCompleteParams:[pic2]}); } function resetImg1(img:MovieClip) { another_group.setChildIndex(img,0); TweenMax.to(img,0.5,{alpha:0,onCompleteParams:[img]}); } function resetImg2(img:MovieClip) { another_group.setChildIndex(img,another_group.numChildren-1); TweenMax.to(img,0.5,{alpha:1}); } function txt_Click(e:MouseEvent):void{ var txt_name = e.currentTarget.name; if(txt_name == "txt_girl") navigateToURL(new URLRequest(XMLList4.forHerTEXT.link),"_self"); else navigateToURL(new URLRequest(XMLList4.forHimTEXT.link),"_self"); } /////////////////////////////////////////////////////////////////////////////////////// Please help! Thanks, Ben.
×
×
  • Create New...