Help with making a seamless animation via looping.

  • TheGinger
  • Newbie
  • Newbie
  • TheGinger
  • Posts: 13

Post 3+ Months Ago

First off, I would like to start by thanking anybody that contributes within this thread; its much appreciated!

The scoop: I have been working on making a flash website that would have the background as falling rain, and thats what I need help with. I have made an animation, and I want it to repeat (loop) without the viewer being able to visibly tell it is looping (a seamless animation). My aproach was playing the animation fully once, then playing it halfway through in the timeline again (so it plays 1.5 times in the timeline) then uses a GotoandPlay function to jump back to the first animation, halfway through where it left off with the second to repeat infinitely and seamlessly till the end of time. Problem being? There is a visible gap, a glitch if you will, where the viewer can see there being a flaw with the animation.

Link to what I am talking about: http://www.kingsporeestates.com/flash/rain.swf


It goes something like this:
Start frame 1, play through animation, then second animation which is half of the first animation, and when it hits the end of the second animation (the end of the timeline), it hits the gotoandplay to send it to frame 50 to pick up on the first animation where the second animation left off. Then repeat.

I really dont know why there is a seam in this attempted-seamless animation. Has there been a known fluke with .swf's pausing because of it taking time to load and play the actionscript, then jump back into the timeline? Can it not do this without a pause for whatever reason? Or is it user error and what could I be doing wrong?

If I made absolutely no sense in what I wrote, let me know.
Using Flash CS4
Actionscript 3.0 (but this is moreso theory, and not technical help I think...)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

What browser are you testing it in?

I checked in the following browsers.

IE 8.0.6001 - perfectly seemless from the getgo. No pause.
Safari for Windows 3.2.3 - perfectly seemless from the getgo. No pause.
Opera 9.63 - perfectly seemless from the getgo. No pause.
Firefox 3.0.10 - pause between first two loops, then seemless
Flock 1.2.7 - horrible period. Never played smoothly.

I'm not sure the problem is with your loop, but rather what different browsers are doing with it.

//I also just installed Chrome 2 and tested your loop and in my opinion it actually played the best of all browsers.
  • TheGinger
  • Newbie
  • Newbie
  • TheGinger
  • Posts: 13

Post 3+ Months Ago

ATNO/TW wrote:
What browser are you testing it in?

I checked in the following browsers.

IE 8.0.6001 - perfectly seemless from the getgo. No pause.
Safari for Windows 3.2.3 - perfectly seemless from the getgo. No pause.
Opera 9.63 - perfectly seemless from the getgo. No pause.
Firefox 3.0.10 - pause between first two loops, then seemless
Flock 1.2.7 - horrible period. Never played smoothly.

I'm not sure the problem is with your loop, but rather what different browsers are doing with it.

//I also just installed Chrome 2 and tested your loop and in my opinion it actually played the best of all browsers.


Woah, I really got to start off by thanking you for going through so much effort to help me out. Its really appreciated!

But I was moreso thinking that there was a flaw in the flash file itself, and not the way the browser is playing it. Regardless, you more or less let me know that there isn't a pause like I was afraid of. Afterall, the pause, if any, lasts for a few milliseconds. Once again, its really appreciated and I can now go on with my website project. Kudos!
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

there's not supposed to be a fluke with flash that way but timeline animation (especially ones that loop) can cause memory problems in the flash player. I would assume that it has something to do with the amount of ram available to the browser at any given moment.

Typically I recommend that people do the absolute shortest loop possible and don't utilize any actionscipt like "gotoAndPlay".

So setup the frames so that the first and last frame of the animation are the exact same. Then remove the last frame making a seamless transition to frame one. Allow flash to follow its default action and automatically loop from the last frame to frame one.

In your case since the animation is pretty simple, you might want to look into scripted rain like this one. There are a bunch of similar tutorials that was just the first one I got from google.
  • TheGinger
  • Newbie
  • Newbie
  • TheGinger
  • Posts: 13

Post 3+ Months Ago

graphixboy wrote:
there's not supposed to be a fluke with flash that way but timeline animation (especially ones that loop) can cause memory problems in the flash player. I would assume that it has something to do with the amount of ram available to the browser at any given moment.

Typically I recommend that people do the absolute shortest loop possible and don't utilize any actionscipt like "gotoAndPlay".

So setup the frames so that the first and last frame of the animation are the exact same. Then remove the last frame making a seamless transition to frame one. Allow flash to follow its default action and automatically loop from the last frame to frame one.

In your case since the animation is pretty simple, you might want to look into scripted rain like this one. There are a bunch of similar tutorials that was just the first one I got from google.


Well, I pretty much did the looping the way you described it except for one thing. What I wanted was for the rain to start when the viewer visited the site, then just continue to fall. With your method, that wasn't possible. So I pretty much just added the falling animation before I did the looping just as you described. Well, the other difference was that I am not letting the flash movie naturally loop because then it would play the intro where the rain begins to fall again (when I wouldnt want that, I just want the rain to continue to falling to make it realistic) so I had to do the GotoandPlay as you advised against. Unfortunately, I don't see any other way if I want the rain to start when the viewer arrives at the site than a GotoandPlay.

Thanks for the link, I am thinking about remaking the entire animation and might utilize that.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.