It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

How do I hide/get rid of a flash animation after it ends?

How do I hide/get rid of a flash animation after it ends?

Postby navand on Mon Jul 13, 2009 7:44 pm

Hello, I'm navand.

I'm cooperating with some friends on making the design for a website. I'll be handling all the flash stuff. I'm very good with Actionscript, flash's scripting language.

What I'm trying to do is this: in the Home page, I want to add a big flash animation, that goes on top of the normal content (as in a higher layer). The animation will end after some point, after which I want to get rid of it, sort of like a welcome animation, that vanishes off after it ends. This way when someone accesses the website, they'll be greeted to a small non-annoying animation that overlaps the rest of the page, and then they'll be left with the Home.

The problem is this: I don't know how to do it. I don't know javascript. I do know that actionscript is based in javascript. I've been fooling around on some javascript tutorial pages and indeed they are pretty similar, so I'm not entirely helpless.

But I can't find what I'm looking for. After a set amount of time, how do I get rid of the flash in the document? Can I eliminate it, make it invisible, unvalidate it or whatever?

I thought that instead of having the animation in another page that redirects to the Home, this would be a great opportunity to finally learn how to integrate flash with websites. After all, I've been meaning to learn javascript for some time now.

Anyway, please help me in this, and thank you in advance.
navand
 
Posts: 2
Joined: Mon Jul 13, 2009 7:39 pm

Re: How do I hide/get rid of a flash animation after it ends?

Postby navand on Tue Jul 14, 2009 5:48 pm

Wow... thanks for the help. :(

Nevermind though, I've managed to make it work. It's beautiful.

I've learned how to make functions in javascript and how to call them from a flash, among other things. I can do all kinds of things with this knowledge.

But when searching more on javascript, I stumbled upon something:

document.getElementById("flashy").style.visibility="hidden";
document.getElementById('flashy').style.display = 'none';

I've used these two at different times, and both seem to have the same effect. My question then is: what are the differences between visibility and display, and which should I use?

...
On a side note, does it matter if I use "" or ''? It doesn't seem to change anything. Are both equal or should I prefer one of them?
navand
 
Posts: 2
Joined: Mon Jul 13, 2009 7:39 pm

Re: How do I hide/get rid of a flash animation after it ends?

Postby evy on Sun Sep 06, 2009 1:41 am

I'm working on a similar issue right now. Don't know the diff between the two but will experiment and let you know if I find the answer. I'm fairly new to both AS and javascript.
evy
 
Posts: 1
Joined: Sun Sep 06, 2009 1:36 am

Re: How do I hide/get rid of a flash animation after it ends?

Postby tubedeejay on Sun Sep 13, 2009 6:22 am

probably the best way to remove something intensive like flash is using the dom: http://en.wikipedia.org/wiki/Document_Object_Model

i occasionally code in javascript, the dom is still a thing i'm avoiding just because it's like learning a new language itself. that said, it would probably give me the benefits of learning a new language itself too, and i doubt anyone that uses it would disagree.
User avatar
tubedeejay
 
Posts: 5
Joined: Tue Aug 25, 2009 7:13 pm


Who is online

Users browsing this forum: No registered users and 7 guests