RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2184 | Replies: 3
Reply
Join Date: Jun 2005
Posts: 7
Reputation: TedN is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
TedN TedN is offline Offline
Newbie Poster

Page Opening - Cache Problem?

  #1  
Sep 20th, 2005
I have a very large web page - over 7000 lines (which will not be going on the internet).

An introduction consisting of music and graphics starts when the page is opened. The graphics are synchronized with the music.

Problem
The introduction works fine each time the page opens except the very first time. Then the music lags the graphics by about one second. I assume this is something to do with stuff being loaded into the cache.

I can solve the problem by moving the Player object/params section from the BODY to the HEAD. However, when the Player is then required to show video/audio I only get audio.

It would be much appreciated if someone could show me how to get the Player pre-loaded (assuming that solves the problem) or how to get the Player to show video when it is located in the HEAD.

My browser is Explorer and I am using <body onLoad.....> to start the intro.
The Player is Windows Media Player and the params are as follows:
<OBJECT id = "Player" CLASSID = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="AutoStart" value="True">
<param name="uiMode" value="Invisible">
<param name="stretchToFit" value="True">
<param name="windowlessVideo" value="True">
<param name="Volume" value="100">
<param name="Player.enabled" value="True">
</OBJECT>

I use JavaScript to change the param values depending on what is required of the Player.

Appreciate any help.

TedN
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Location: Wales
Posts: 735
Reputation: DaveSW is on a distinguished road 
Rep Power: 6
Solved Threads: 17
DaveSW's Avatar
DaveSW DaveSW is offline Offline
Master Poster

Re: Page Opening - Cache Problem?

  #2  
Sep 21st, 2005
could you load the music on a splash screen before?
e.g. cache the music on the first screen, then tell the user to click to advance to the next page once the music starts?
Just linking to the music on the page before should be enough to cache it.
Reply With Quote  
Join Date: Jul 2005
Posts: 69
Reputation: bkendall is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
bkendall's Avatar
bkendall bkendall is offline Offline
Junior Poster in Training

Re: Page Opening - Cache Problem?

  #3  
Sep 22nd, 2005
I was thinking along those same lines as well, some sort of a preloading technique to load sections at a time. This was really popular in the days of glam intro movies and there probably still some good examples that you could get ideas from.
Reply With Quote  
Join Date: Jun 2005
Posts: 7
Reputation: TedN is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
TedN TedN is offline Offline
Newbie Poster

Re: Page Opening - Cache Problem?

  #4  
Sep 23rd, 2005
OK, I think I've solved it. Dave SW got me thinking about delaying the graphics until the the Player had started playing - rather than pre-loading the Player.

I now use <body onLoad> to start the Player. I then go to another function that keeps looping every 100 Msecs until the Player has started playing. Only then do I go to the function that starts the graphics.

I found on the following Microsoft site: (http://msdn.microsoft.com/library/de...rplaystate.asp) a means of determining what current state of the Player is.

I can now use:
if Player.playState == 3 (Player is playing)
start the graphics
else
go around the loop again after 100 Msecs
endif

Seems to work great.

Thanks DaveSW.

TedN
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:08 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC