Jump to content
Search Community

First round playing fine but repeated playing not looking same

chrizzz test
Moderator Tag

Recommended Posts

Hi there!


I have created an quite simple animation with tweens and everything plays fine, but only in the first round. When the clip repeats, in the following rounds parts of the animation don't show anymore. I found out in the forum that it must be a conflict between the tweens but could not figure out what I'm doing wrong, it's driving me crazy for hours now...


Concrete problem description: In the repeat, parts of the animation (at the beginning of the clip, when the typewriting starts) are disappearing, it's around line 47 of the code.


Can someone have a look at my files please, I added a separate text file with the AS2 code I'm using inside the FLA so maybe someone sees the problem right away.


Many thanks for any help!





action as2.txt


Link to comment
Share on other sites

My guess is that you have all this code:


b1._alpha = 0;
b2._alpha = 0;
b3._alpha = 0;
b4._alpha = 0;
b5._alpha = 0;
b6._alpha = 0;
b7._alpha = 0;
b8._alpha = 0;
b9._alpha = 0;
b10._alpha = 0;
b11._alpha = 0;
b12._alpha = 0;
b13._alpha = 0;

typewriterfull._alpha = 0;

logo._alpha = 0;

postit._alpha = 0;

searchoff._alpha = 100;
searchon._alpha = 0;

searchresults._alpha = 0;

cursorarrow._alpha = 100;
cursorarrow._x = 183;
cursorarrow._y = 117;

cursor._alpha = 0;
cursor._x = 164;

That runs as soon as your swf loads BUT it doesn't run again when you repeat and call mouseIn() again.


Try putting all that code in its own function (that you call before mouseIn()), or dumping it into mouseIn()

Link to comment
Share on other sites

Hi Carl


Thanks for your input, but I've tried this already. The code above the first function must remain there since otherwise the elements that are hidden by this code show for a short instance at start.


I additionally put the code in a function as you suggest (even twice, at beginning and end), but as said it did not help.


When you watch the SWF, you can see that in the 2nd round everything is fine at the beginning but as soon as the typewriting starts, some parts of the animation disappear (not at the restart of the clip).

I have added the function in a new as2 file that I attach.


Any other suggestion?




action as2 b.txt

Link to comment
Share on other sites

Sorry that was my best guess. You didn't provide an fla so it makes it very difficult to read 20 functions that have code that refer to assets that I can't inspect.


If the typewriter effect is the only part that doesn't repeat properly it is best to take out everything (code and symbols) that are not necessary to replicate the problem. 


That way we can focus on the issue and not have to hunt around testing code that isn't related to the problem.


I'm sure if you can create a reduced test case (fla) the issue will be much easier to spot.




In addition I would verify that all assets are returned to their pre-tweened states (all properties) before doing the loop and that there is no overlap of multiple tweens on the same elements.


Also it is very important to verify that you are using the latest version of GSAP, so please download it by using the getGSAP button on the top of this page.


Again, a very simple fla (zipped) that replicates the problem will be of great help.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...