FORUMS: list search recent posts

Replace flash anim with standard text when complete?

COW Forums : Web Design

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrew CooperReplace flash anim with standard text when complete?
by on Mar 18, 2002 at 10:44:01 pm


I've created a flash anim which sits in a table cell. Once the flash has finished, I want standard html text to replace it in the table cell. Sounds straightforward, but unfortunately I'm new to web authoring!

A friend suggested starting a javascript timer when the flash loads and then making the div layer visible when the timer reaches 4 seconds (the duration of the animation). Is this a good solution and how do I actually do it?

Thanks in advance for any help


Return to posts index

Daniel WattsRe: Replace flash anim with standard text when complete?
by on Mar 19, 2002 at 2:24:35 am

That is a good solution, if that is how long it actually DOES take the animation to load, then play, and finish. You have to remember that not all computers are the same, and that some are more dominent than others. Of course for college kids on their T1, it would be perfect. But for most of the population not in college, it most likely won't work.

This may sound like a long winded approach, and Curtis will more than likely come and put me to shame =] but...

Why not use a php function? (if you have the capability).

Are you familiar? Yeah... I'm still eating it up, but learning quick. Anyways, have it check to see if a variable has been loaded... of course it hasn't yet, so you wait for your flash movie to play. Once you the flash movie is over, in flash you can use the getUrl function to grab a designated .php file, which will include that variable. In that .php file, it will reload the Current page you just loaded, and check for that variable. It is now there, so then you can load your site as is.

Ok.. So that's one long way, and just reading what I wrote, and looking over your question once more, I've come to realize that you can just use the javascript code directly in flash to accomplish what I just said! All you do, is have your javascript function at the end of your animation, so no matter how long it takes to play (4-40 seconds) at the end of it, it will call that function up!

Like I said... Curtis will come along and out do me... that's ok....

My day will come, and he will pay... for his large fry and medium coke when he comes through the drive through. =/

Ahh... The fun just keeps on comin!

Danno~ =D

Return to posts index

Andrew CooperRe: Replace flash anim with standard text when complete?
by on Mar 19, 2002 at 10:54:28 am

Thanks for the tip, but I've certainly never used php before - I can lay things out in Dreamweaver, but don't really understand the code it generates!! :-)

I think my friend's suggestion was to start the javascript timer once the flash has loaded, so connection speed shouldn't matter.

Return to posts index

Daniel WattsRe: Replace flash anim with standard text when complete?
by on Mar 19, 2002 at 6:18:45 pm

Good! Then yes, that would work. As soon as the animation is over, not when it has started you should put your timer. I mis-understood you.

Danno~ =D

Return to posts index

Curtis ThompsonRe: Replace flash anim with standard text when complete?
by on Mar 19, 2002 at 7:09:56 pm


your idea about including the redirect at the end of the flash movie itself seems like the best way to me - then it's not relying on any load time calculations that would be present if you used some sort of javascript onload functionality...

i assume that the the js timer after the onload was to cover for the play time of the movie itself...if your movie was pretty simple and something that should play on older systems as it does on newer systems (i.e. no fancy audio, rasterized artwork or big transitions that tend to slow down the older boxes trying to play flash), then you should be ok with that solution as well...that would also redirect people who didn't have the flash player going. if you did the code in the flash movie itself, then only flash users would get the redirect. but if you know your audience will have the player, then you should be go...

either way, it sounds like you've resolved your issue, but let us know if you have any additional questions!

and you are _far_ too hard on youself and also too kind to me, danno...good advice all the way around! :-)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved