Jump to content
Search Community

timeline max brain scratcher

timaging test
Moderator Tag

Recommended Posts

greensock brain scratcher... check out the url below and let me know what you think. I've got a project with an intro. It then goes to a timelineMax section that advances a frame approximately every 10 seconds.

 

Then, if you click on one of those, we will move to another set of frames that have a timelineMAX on them of 30 seconds and if you don't click to see something else, you are sent back to the frames with the 10 second delay.

 

BUT what's happening is that if I click on one of the buttons, and leave my mouse over that button (especially service eligibility-not sure why that one), the timeline just starts randomly timing out and picking a new frame. If I do that with other buttons, I get the same thing but usually not as bad.

 

Any ideas on maybe how to get that button to not do that?

 

http://www.taylorimaging.com/clientArea ... ndex2.html

 

thanks,

Dave

Link to comment
Share on other sites

if I click on one of the buttons, and leave my mouse over that button (especially service eligibility-not sure why that one), the timeline just starts randomly timing out and picking a new frame. If I do that with other buttons, I get the same thing but usually not as bad.

I didn't see a "service eligibility" option - did you mean "product eligibility"?

 

It didn't look random at all - it looked like you had the timeline continuing to run even after a section was selected. Not sure, though - very difficult to troubleshoot without seeing any code or an FLA. It's always better to see a sample FLA rather than a snippet of code because there are often other things at play in the file that could be interfering. But I'd definitely recommend looking into the logic in your code that controls auto-advancing to the next section.

Link to comment
Share on other sites

ok here it is attached (I think... it just uploaded for a long time). You'll have to excuse my "long hand" but it's really the only way I can understand it.

 

and you are correct, it WILL play properly if you move the mouse away from the button, but if you just leave it there it starts acting erratic.

 

I can't reproduced this on my machine, but on an older PC running IE 8 with windows XP it's guaranteed. I know my client is running an older laptop, and I think the same machine specs.

Link to comment
Share on other sites

I can't reproduced this on my machine, but on an older PC running IE 8 with windows XP it's guaranteed. I know my client is running an older laptop, and I think the same machine specs.

What version of the Flash Player was on the machine that reliably reproduced the issue?

 

Unfortunately I don't have time to analyze the thousands of lines of code that you have in your FLA and track the problem down - could you create a separate, much more simplified FLA that reproduces the issue and send it to me? That's usually a good habit to get into anyway for you to track issues down on your own - start super-simple and build up until it breaks. Not that you have to build your entire project again from the ground up, but you just start with the general concepts like create a basic TimelineMax that does something similar and then introduce 2 buttons and see if you can get the click/rollover to interfere, etc.

 

I wonder if maybe the problem you ran into with the old computer was that it had a stale version of the Flash Player that preceded the one you're targeting in your publish settings. Just a stab in the dark.

Link to comment
Share on other sites

I wonder if maybe the problem you ran into with the old computer was that it had a stale version of the Flash Player that preceded the one you're targeting in your publish settings. Just a stab in the dark.

 

this could be the case, but it's also the player that the client uses... corporate policy I guess.

 

I've looked at that code for hours and can't figure it out-what bugs me the most is that I can see it running fine on my machine. All kinds of crazy timing problems when I use IE9 on XP.

 

I'll see if the player makes a difference here, but it won't make a difference for the client that has to use the player that they have.

Link to comment
Share on other sites

I wouldn't even know where to begin to do that. This was as simple as I could figure to do it.

A 37+MB FLA with several thousands of lines of code is as simple as you could attempt? :) Yikes!

 

Again, my apologies - I just don't have time to look through all of that anytime soon.

 

I noticed that your publish settings are set to target Flash Player 10. Odds are very strong that a really old computer running XP doesn't have Flash Player 10. Maybe 9. But just for future reference, you should always nail down what version of the Flash Player your client is comfortable requiring for visitors BEFORE you even write a line of code or start an FLA. This will be a nightmare if you did all this work and then your client says you need to target Flash Player 8 which would mean rewriting it all in AS2 (gulp).

Link to comment
Share on other sites

oh, I know. I just did a bunch of banner ads for american express and had to convert to AS2 even though they told be before I started that I could use AS3.

 

the reason: clickTAG.

 

 

BUT with that said, I don't know if frame 19 has too much going on, but I'll bet whatever it is could be found there.

 

 

ALSO just checked my PC and it's running flash play 10,0,12,36 so that's not it.

Link to comment
Share on other sites

hey timaging,

 

i did download your file. i don't have CS5 so I couldn't open it. I regret that if it was a bit much for GreenSock to have the time to decipher I don't think I'll have any better luck:( I have to strongly echo his advice about starting with something small and make it bigger til it breaks... or if you have something big... cut it down until it works.

 

the time it could take to make a small version that works will be much shorter than working with a huge monster. your animation is really smooth and you obviously have the ability to do great stuff.

 

As for the original issue, I could not replicate the button hover oddity but if I click erratically / quickly the slide show will get into a very funky and sporadic series of transitions.

 

are you sure you are killing your autoAdvance function whenever a button is clicked? like Jack said there seems to be a rogue timeline running.

 

Carl

 

ps also to make testing easier... kill those 10 and 30 second timers and make them 2 and 3 seconds... if you can make it bullet-proof at short intervals it will work with longer intervals.

Link to comment
Share on other sites

I've noticed on other projects that Flash can have problems with naming things sequentially too, so my first step will be to rename all my functions and variables. Hopefully as I go through each frame, I will also find and clean up any unnecessary code, but I've already done that twice.

 

Sometimes it almost seems too that if you comment something out, it still works. I question the purity of my published files sometimes.

 

Dave

Link to comment
Share on other sites

I've noticed on other projects that Flash can have problems with naming things sequentially too, so my first step will be to rename all my functions and variables. Hopefully as I go through each frame, I will also find and clean up any unnecessary code, but I've already done that twice.

 

Sometimes it almost seems too that if you comment something out, it still works. I question the purity of my published files sometimes.

Oh, I think that's almost impossible - I wouldn't worry about Flash putting stuff in there that you commented out. However, it is entirely possible that the source of your problem has to do with reusing the same variable and/or function names on multiple frames in your FLA. All variables and functions are basically properties of the MovieClip whose frame they reside on. For example, let's say you have this on frame 1:

 

function myRollOver():void {
   trace("rollover 1");
}

 

And then on frame 2, you have:

 

function myRollOver():void {
   trace("rollover 2");
}

 

Then, let's say it plays frame 1, then 2, then on frame 3 you have:

 

myRollOver(); //traces "rollover 2"

 

But then if you gotoAndStop(1), it will run frame 1 of course which resets myRollOver() to a different function, so now if you gotoAndPlay(3) (remember, we're skipping frame 2 here), you'd get:

 

myRollOver(); //traces "rollover 1"

 

So in this scenario, the code that runs on frame 3 acts completely different based on what frame(s) had run previously. Be very careful about using the same function/variable names on different frames.

Link to comment
Share on other sites

in regard to commenting something and having it remain. I know on macs with cs4 and possibly other versions this can APPEAR to happen.

 

if you export your swf

then CLICK back on FLASH APP without closing the swf (hides swf behind Flash app)

make a code change

do a control>test movie (cmd>return)

swf comes up... but your code change is not evident.

 

if you do not properly close the swf, it is NOT re-compiled and you will be seeing the old version making you think it is ignoring your latest revision.

 

so just as a tip, make sure you always close your swfs when doing a control > test movie.

that oddity aside, as Jack said, the flash player isn't known to choose which comments to ignore.

 

hope things are going better for you today.

 

Carl

Link to comment
Share on other sites

today is tear down and rebuild, and simply review all the code. I can't offhand tell what's wrong, but it's not the timeline per se, it's the combination of the button wanting to do something at the same time that the timelineMAX is doing something.

Link to comment
Share on other sites

ok, so I've gone through and renamed all my variables and functions. Nothing has a chance of being duplicated any more, so that doesn't appear to be the issue.

 

It's almost as if the timeline from the frame I'm leaving doesn't stop and somehow remains running.

 

I do however have a stop in each button to tell the associated timeline to stop, and these too are uniquely named:

 

function fl_ClickToGoToScene0516(event:MouseEvent):void
{
 timelineOverview01Out.stop();
 MovieClip(this.root).gotoAndPlay(16);
}

 

then after a while the timeline itself even goes in to a different timing of around 3 seconds when I have it set to 10.

 

absolutely baffled.

Link to comment
Share on other sites

I'm not sure if this makes a difference, but I only import this information on frame 2, so if I'm stopping the timeline, would I in fact need to have this at the top of every frame?


import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
import com.greensock.OverwriteManager;
TweenPlugin.activate([VolumePlugin, MotionBlurPlugin, TintPlugin, BlurFilterPlugin, EndArrayPlugin, ColorMatrixFilterPlugin]);
import flash.media.Sound;
import flash.media.SoundChannel;

OverwriteManager.init(OverwriteManager.AUTO);

Link to comment
Share on other sites

ok, so I did just a bit more renaming, and change the end of any variable name to not have a number. In addition to that, I've added replay:0 to all timelineMax setups.

 

CURRENTLY it appears to be working, but I'm passing it off to the client for further review.

 

Fingers Crossed-

 

Dave

Link to comment
Share on other sites

I'm not sure if this makes a difference, but I only import this information on frame 2, so if I'm stopping the timeline, would I in fact need to have this at the top of every frame?


import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
import com.greensock.OverwriteManager;
TweenPlugin.activate([VolumePlugin, MotionBlurPlugin, TintPlugin, BlurFilterPlugin, EndArrayPlugin, ColorMatrixFilterPlugin]);
import flash.media.Sound;
import flash.media.SoundChannel;

OverwriteManager.init(OverwriteManager.AUTO);

No, you don't need to run that on every frame. You do, however, need to have the import statements on any frame on which you reference one of those classes (like TweenLite or TimelineLite). That's just a Flash thing and is not unique to GreenSock stuff.

 

I just tried using PREEXISTING for the Overwrite Manager and now I'm getting a stack overflow, but it doesn't tell me how to fix it, and it crashes IE on my PC. I get a runtime error.

 

Could you send me an example FLA that reproduces the stack overflow? Or a blurb of code that I can run? I just need to be able to see it to know what's going on. I tried setting the default OverwriteManager mode to PREEXISTING and it worked great - no stack overflows but maybe I'm missing something.

 

ok, so I did just a bit more renaming, and change the end of any variable name to not have a number. In addition to that, I've added replay:0 to all timelineMax setups.

 

CURRENTLY it appears to be working, but I'm passing it off to the client for further review.

 

These changes should make absolutely no difference whatsoever. You can have numbers at the end of your variable names (you just cannot START a variable name with a number). And adding replay:0 to the vars parameters of all your TimelineMax instances does nothing. That's not even a valid special property (although it won't break anything). So I don't think these changes altered the behavior at all. If they did, I'd love to see a with/without example that shows the difference.

 

Gosh, it sounds like you've had a super rough weekend. I can only imagine how frustrating the experience must have been :(

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...