Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Need help resolving conflict between Proto and Uize frameworks
Old 06-17-2009, 12:17 PM Need help resolving conflict between Proto and Uize frameworks
Novice Talker

Posts: 8
Trades: 0
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>
    <script  type="text/javascript" src="javascript/prototype.js"></script>
The only time I use a prototype function in the <body> of the document is to create a function that plays a movie when a thumbnail is clicked.

The function is:

Code:
<script>
function setMovie( url, title )
{
 $('movieHost').innerHTML = '';
 var elEmbed = document.createElement( 'embed' );
 elEmbed.src = url;
 elEmbed.setAttribute("width", "100%");
 elEmbed.setAttribute("height","100%");
 elEmbed.setAttribute("scale","aspect");
 elEmbed.setAttribute("bgcolor","black");

 $('movieHost').appendChild( elEmbed );

 $('nowPlaying').innerHTML = title;
}

new Ajax.Request( '', { 
  method: 'get',
  onSuccess: function( transport ) {
    var bFirst = true;
    for( var b = 0; b < movieTags.length; b++ ) {

      if ( bFirst )
      {
        setMovie( url, title );
        bFirst = false;
      }
        var html = '<a href="javascript:void setMovie(\''+url+'\',\''+title+'\');">';
      html += title+'</a><br/>';
    }
  }
} );
</script>
The only problem I'm having is that I call the function at body onload:

Code:
<BODY onload="setMovie('Quicktimes/mov1.mov', 'Suzuki :  &quot;Fence&quot;  1 of 12')">
In order that the first movie starts playing right away...

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 there some way to recode the function with absolutes?... or some other way to resolve this?

Thanks!
piers2009 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Need help resolving conflict between Proto and Uize frameworks
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.08579 seconds with 12 queries