![]() |
Need help resolving conflict between Proto and Uize
I know it's probably a lousy idea but I have both prototype and uize referenced in the <head> of my document:
Code:
<script type="text/javascript" src="js/Uize.js"></script>The function is: Code:
<script>Code:
<BODY onload="setMovie('Quicktimes/mov1.mov', 'Suzuki : "Fence" 1 of 12')">And everything is fine... EXCEPT that about 10 or 15 seconds into the first movie it skips back to the beginning and starts playing again. Once it's done that everything works fine until a page reload - and then it plays and skips back. I've tried changing the order of the script references in the <head> section... but that breaks the uize framework. Is it possible there's some way to recode the function with absolutes? Thanks! |
whoa there cowboy...
where is the conflict? what does uize actually handle? what is happening 10-15 seconds in to trigger the second load? Quote:
|
What would I do without you...! :D
The Uize framework handles a horizontal thumbnail scroller... I thought that there might be a conflict in the shorthand of the two frameworks that could be resolved by going back to 'longhand' of one of them, as it were. The weird thing is that if I reference the prototype.js script before the uize.js script then the movie restart glitch goes away (but it breaks the scroller). The only thing I can think of that is triggering 10-15s in is Quicktime plugin's 'fast start' ability means that a quicktime only starts playing (on download from a server anyway) once a certain percentage of the movie is cached on the users computer... maybe there's something there. But why does referencing the prototype.js script first fix it?! Actually I've been playing with a slightly different approach - recommended by Apple: Code:
<script language="JavaScript" type="text/javascript"><!-- |
Quote:
Code:
<script language="JavaScript" type="text/javascript"><!--you could also pass what movie with your url string via get or something i suppose if that's useful http://www.idealog.us/2006/06/javascript_to_p.html |
For some reason I can't get this to work... I've adjusted it (a little) to:
Code:
<script language="JavaScript" type="text/javascript"><!--Code:
<a href="#" class="thumbnail" onClick="setMovie('Quicktimes/mov1.mov');"> |
it probably doesn't help that you have stuff commented out... you have the closing // --> twice, not sure if that'll screw stuff up
also, i don't know how much QT cares about the format it receives args in. it might be pissed off that url doesn't have single quotes around it for all i know. i wouldn't think so, but i don't know QT throw some alerts in and see how car it's making it |
Okay... I'll clean it up and try various adjustments - thanks! I'll post back here...
|
Okay... I love the idea of this script:
Code:
<script language="JavaScript" type="text/javascript">Possibly buried in it is the answer to how to pass variables such as src url to the QT_WriteObject function, but my rudimentary scripting skills just aren't up to the task... If there are any insights - they would be much appreciated... sorry about the homework! :P Code:
/* |
well, i don't really know how this works i guess
function QT_WriteOBJECT() takes no arguments... but calls _QTGenerate that does. everything makes sense to me except how the arguments make it in there for the code generation. where are you getting your examples? |
Mostly I'm getting my examples from:
http://developer.apple.com/documenta...ript%20QT.html But I scatter about looking for code snippets as well... I always test them in un-hacked state to verify that they perform as promised... then keep adjusting til I break them, then step backwards. Currently I'm looking at: Code:
<a href="javascript:document.movie1.SetURL('new url');">... but no playlist :D |
you running firebug to see why it's failing?
|
okay.. I've cracked the 'on click' event - with the AC_Quicktime.js (from Apple dev) referenced in the head then:
Code:
<a href="javascript:document.movie1.SetURL(new url)Code:
'obj#ID', 'Movie1'So now I'm working on the dynamic titles - will post back the whole solution if I ever figure it out ;) |
just call a second function in your onclick to set the title
|
Umm... that works, of course, when the user actually clicks on a thumbnail to choose a particular movie.
But... the quicktimes are daisychained - either by calling the next in a string through the qtnext parameter or by an href call from the final frame of the movie. That means if there are, say, five movies to choose from (and therefore five thumbnails), then if the user were to click NO thumbnails all five movies would play in order. The user could then jump forward to movie #3, say, and then #4 and #5 would play on automatically when #3 finished. This, of course, means that there may not be an onclick event... yet the movie will still change... .. and therefore the title should somehow also change. |
good point...
can you add an arg to SetURL(new url)? like SetURL(new_url, new_title)? if not, you need a place to drop an attribute in that would contain the title. then from within SetURL(new url) or one of those functions have it read that attribute and set the title not seeing what you're working with now i really can't be any more specific i guess |
| All times are GMT +1. The time now is 07:20 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.