[Tweener] Weird loopingproblem...
Niklas Hallgren / Wide Circle
niklas at widecircle.se
Mon Aug 13 01:27:40 PDT 2007
Hi guys!
Sorry for my late answer.
Now I have removed the tweens using Zeh's suggestion & it seems to be
working. I've tried to force the error with no luck.
My navigation is using SWFAdress for deeplinking and browser's back &
forward functionality.
I don't now how much you guys now about SWFAdress but this is what I did:
I created a global function:
_global.resetHem = function(section){
Tweener.removeTweens(container.contentMC.imgContainer.imgContent1);
Tweener.removeTweens(container.contentMC.imgContainer.imgContent2);
};
I know - the paths became quite long... :-)
Then I have SWFAddress.setValue("whatever section name"); on the onRelease
of the navigation btns. The setValue takes me to different frames depending
on the sectiont & here I call resetHem(); & loads the new section swf. It
seems to be enough to remove the tweens without a need for resetting the
x-values.
Go here if you guys have the time and see if there are any problems:
http://widecircle.se/husan/hus.html
Also - use the browser's back & forward btns to see if there are any
problems with that as well...
Mvh, Niklas Hallgren
Wide Circle
Tel: +46 - (0)73 - 255 86 25
www.widecircle.se
-----Ursprungligt meddelande-----
Från: tweener-bounces at lists.caurinauebi.com
[mailto:tweener-bounces at lists.caurinauebi.com] För Niklas Hallgren / Wide
Circle
Skickat: den 8 augusti 2007 17:06
Till: 'Zeh Fernando'
Kopia: tweener at lists.caurinauebi.com
Ämne: Re: [Tweener] Weird loopingproblem...
Thanks guys for such quick replies..!
Zeh - I will look into your suggestions right away.
Ernesto I use Firefox 2.0 as well and I get the problem.
I thought that since I'm loading external swfs into the same container it
would clear out everything...
Niklas Hallgren
Wide Circle
www.widecircle.se
-----Ursprungligt meddelande-----
Från: Zeh Fernando [mailto:zehfernando at zeh.com.br]
Skickat: den 8 augusti 2007 16:39
Till: Niklas Hallgren / Wide Circle
Kopia: tweener at lists.caurinauebi.com
Ämne: Re: [Tweener] Weird loopingproblem...
Hello, Niklas, Ernesto,
On this case, the problem seem to revolve around the fact that you're
telling the animation to keep looping and never remove it. When you move
to another section, then go back to the original section, a new
animation is started, even if the old one already existed; so two
distinct animation chains are taking place at the same time. Usually,
they'd overwrite each other, but since they may be so far apart (~27
seconds), there's a few moments when two of them would coexist;
tweenings are only overwritten if their animation times overlap.
I'd have to know a lot more about the way your movie is setup to be sure
of this. But if my theory is correct, you just need to remove the
animations from your images after exiting the section (or before showing
it again). Something as such:
Tweener.removeTweens(imgContent1);
Tweener.removeTweens(imgContent2);
I'd like to ask you to try that and see if that solves the problem.
Adding some kind of _x reset would also be nice, that way you won't risk
removing an animation that is halfway through and having to deal with
images outside of their original area (since you're doing relative
tweenings only).
Again, *if* I'm correct, it's more of a matter of at *which* moment you
revisited the area than which browser you used when doing so. If you
manage to visit the area at the very right moment, the animations would
successfully overwrite each other and you wouldn't see that problem.
Zeh
Niklas Hallgren / Wide Circle wrote:
> Hi there!
>
> I have a strange loopingproblem. I have two imgs that are beeing
> animated as a loop inside a mask.
>
> The thing is that this animation is falling apart when I visit another
> section of the site and then goes back to the section containing the
> animation.
>
> This is the code that I have for the loop (this code is located inside a
> MC):
>
>
>
> //-----Import Tweener Class---------\\
>
> import caurina.transitions.Tweener;
>
> //-----End Import Class-------------\\
>
>
>
> Tweener.addTween(imgContent1, {_x:imgContent1._x+287, time:0.5,
> delay:1.3, transition:"easeOutQuart"});
>
> Tweener.addTween(imgContent1, {_x:imgContent1._x+574, time:0.5,
> delay:12, transition:"easeOutQuart" });
>
> Tweener.addTween(imgContent1, {_x:imgContent1._x+0, delay:12.5,
> onComplete:looping});
>
>
>
> function looping():Void {
>
>
>
> Tweener.addTween(imgContent2, {_x:imgContent2._x+287, time:0.5,
> transition:"easeOutQuart"});
>
> Tweener.addTween(imgContent2, {_x:imgContent2._x+574, time:0.5,
> delay:14, transition:"easeOutQuart" });
>
> Tweener.addTween(imgContent2, {_x:imgContent2._x+0, delay:15});
>
>
>
> Tweener.addTween(imgContent1, {_x:imgContent1._x+287, time:0.5,
> delay:14.5, transition:"easeOutQuart"});
>
> Tweener.addTween(imgContent1, {_x:imgContent1._x+574, time:0.5,
> delay:27, transition:"easeOutQuart"});
>
> Tweener.addTween(imgContent1, {_x:imgContent1._x+0, delay:27.5,
> onComplete:looping});
>
> }
>
>
>
> You guys can see what I mean here:
>
> http://widecircle.se/husan/hus.html
>
>
>
> Only the first two sections (HEM & TJÄNSTER) have content.
> The first time the site loads the animation to the left containing the
> imgs is just fine.
> But if you visit TJÄNSTER & revisit HEM the timing of the animation of
> the imgs is completely off...
> I just dont understand why this is happening since the two sections are
> loading two diffferent external swfs.
> I had problems with the animated bkgs (brown and yellow rectangles) as
> well but solved that by giving them different instance names eventhough
> they are located in different swfs it solved the problem. It seems to me
> that somehow flash seems to remember previous animations eventhough
> different external swfs are beeing loaded with the different animations
> in them.
> The above code is located on frame 2 inside a MC. The animation is
> triggered with gotoAndPlay(2); and that in turn is located inside an
> _global function.
>
>
>
> Niklas Hallgren
>
> Wide Circle
>
> www.widecircle.se
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
_______________________________________________
Tweener mailing list
Tweener at lists.caurinauebi.com
http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
More information about the Tweener
mailing list