Jump to content

Trying To Sinc 3 Different Components; Javascript, Animation And Audeo


mrmagoo8870

Recommended Posts

I've created a website that is supposed to offer info about a online game I play. The index page is supposed to show a animation of a character from the game casting a spell, have a sound effect go off and the header text fade in using a javascript ran opacity. I can get any 2 of them to sinc up nicely, but when I try runing all 3 at once, the sound effect goes off after the other two. Realm Odyssey is the site I'm testing everything on. I'd post all the code here but it's kinda extensive. the CSS doc i use is main.css and the javascript file is at fade.js. I also have a preload javascript at preload.htm. Right now I can't recall why I put it in an .htm file, instead of a .js file .... but I believe it works still ... lol ... I hope it worksl :)Any assistence sincrinizing these components would be greatly apreciated.Thanks all for your help.

Link to comment
Share on other sites

For those kind of effects, Flash is much better. Javascript animations can run slow.About preload.htm, change its extension back to .js and remove the HTML comments, they aren't needed because the file is external.These:<!--//-->aren't needed

Link to comment
Share on other sites

okay, I'll fix that preload file 1st thing. thanks for that bit. The character animation is not ran by JS, it's a .gif animation.Now, should I make a new post over in the flash area to ask this question? I have no clue whatsoever how to do flash and I've been told by several people to avoid making flash components for my site. Not sure exactly, they say flash can lag the browsing pleasure and that some browsers won't load right if i use flash ... Anyone know more about it?

Link to comment
Share on other sites

okay, I'll fix that preload file 1st thing. thanks for that bit. The character animation is not ran by JS, it's a .gif animation.Now, should I make a new post over in the flash area to ask this question? I have no clue whatsoever how to do flash and I've been told by several people to avoid making flash components for my site. Not sure exactly, they say flash can lag the browsing pleasure and that some browsers won't load right if i use flash ... Anyone know more about it?
Javascript has a lot more probability of lagging the browser when using animation, and especially when trying to load sounds. It's difficult to get a sound to play in all browsers using HTML or Javascript, and timing a sound with Javascript is nearly impossible.Basically all browsers today are compatible with Flash, if they are not, they simply will not load the file and everything else will behave normally. While it's not good to overuse flash (using it for menus and fancy buttons), this is the kind of purpose it was made for: animations and interactive content (especially when sound is involved).
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...