JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 12th, 2008, 06:13 AM
o2pb o2pb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 58 o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 26 m 26 sec
Reputation Power: 6
Onmouseover slideshow (similar to RedTube)

I really like how on redtube.com (adult site) when you mouseover an image, it shows a slideshow of the video. I have the necessary images, but Im not too sure on the implementation of something similar.

Whats the best solution for this that requires the least amount of code.

Reply With Quote
  #2  
Old March 12th, 2008, 10:42 AM
vbrtrmn's Avatar
vbrtrmn vbrtrmn is offline
4:04 Time Not Found
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2004
Location: Northern Virginia
Posts: 2,273 vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level)vbrtrmn User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 22 h 10 m
Reputation Power: 333
Send a message via ICQ to vbrtrmn Send a message via AIM to vbrtrmn Send a message via MSN to vbrtrmn Send a message via Yahoo to vbrtrmn
The effect is non-trivial and you can't just convert a movie to a series of images with JavaScript.

My advice, hire a developer who is familiar with video processing.
__________________
I am so smart, I am so smart, S.M.R.T ... I mean S.M.A.R.T.

Stop Using Pop-Ups

Reply With Quote
  #3  
Old March 13th, 2008, 01:08 AM
o2pb o2pb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 58 o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 26 m 26 sec
Reputation Power: 6
I already have the sequences of images ready, Im very familiar with that part of programming. I know nothing about JS, and I simply need to turn the frames I already have into a looping sideshow on mouseover.
Comments on this post
vbrtrmn agrees: Most people who ask general questions like that one don't seem to know much. You're the one
exception

Reply With Quote
  #4  
Old March 13th, 2008, 03:01 AM
Joseph Taylor's Avatar
Joseph Taylor Joseph Taylor is offline
Text Ninja
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2005
Location: Vancouver, British Columbia, Canada
Posts: 647 Joseph Taylor User rank is First Lieutenant (10000 - 20000 Reputation Level)Joseph Taylor User rank is First Lieutenant (10000 - 20000 Reputation Level)Joseph Taylor User rank is First Lieutenant (10000 - 20000 Reputation Level)Joseph Taylor User rank is First Lieutenant (10000 - 20000 Reputation Level)Joseph Taylor User rank is First Lieutenant (10000 - 20000 Reputation Level)Joseph Taylor User rank is First Lieutenant (10000 - 20000 Reputation Level)Joseph Taylor User rank is First Lieutenant (10000 - 20000 Reputation Level)Joseph Taylor User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 20 h 42 m 54 sec
Reputation Power: 127
Send a message via Skype to Joseph Taylor Send a message via XFire to Joseph Taylor
What is the pattern you're using for the image names? Say we have a video located here: vids/redhead-lesbian-nurse-bukkake-34.flv. You'll need to save the slideshow images according to some rigidly defined pattern, like such: slides/redhead-lesbian-nurse-bukkake-34/1.jpg, slides/redhead-lesbian-nurse-bukkake-34v/2.jpg, slides/redhead-lesbian-nurse-bukkake-34/3.jpg. The number of screenshots per video must also remain constant.

Now, if you feel the need to invoke rule thirty four on an entire gallery of pictures in a div named "tgp-gallery", a bit of simple looping will go a long way:

javascript Code:
Original - javascript Code
  1. onload = function() {
  2.   var secondsBetweenSlides = 0.5;
  3.   var slidesPerImage = 5;
  4.   var gallery = document.getElementById("tgp-gallery"); // grab the container div
  5.   var pornLinksInGallery = gallery.getElementsByTagName("a");
  6.   for (var i = pornLinksInGallery.length - 1; i >= 0; i--) {
  7.     (function() {
  8.       var img = pornLinksInGallery[i].firstChild;
  9.       if (img && img.tagName && img.tagName.toLowerCase() == "img") {
  10.         var match = null;
  11.         if (match = img.href.match(/^(slides\/.*)\//)) {
  12.           var cycleImage = function(n) {
  13.             if (typeof n != "number") {
  14.               img.currentImage = img.currentImage || 0;
  15.               img.currentImage++;
  16.             } else {
  17.               img.currentImage = n;
  18.             }
  19.             img.currentImage = img.currentImage % slidesPerImage;
  20.             img.src = match + "/" + (img.currentImage + 1) + ".jpg";
  21.           }
  22.           img.onmouseover = function() {
  23.             img.interval = setInterval(cycleImage, secondsPerSlide * 1000);
  24.           };
  25.           img.onmouseout = function() {
  26.             if (img.interval) {
  27.               clearInterval(img.interval);
  28.               cycleImage(0);
  29.             }
  30.           };
  31.         }
  32.       }
  33.     })();
  34.   }
  35. }


html4strict Code:
Original - html4strict Code
  1.  
  2. <div id="tgp-gallery">
  3.   <ul>
  4.     <li><a href="vids/interracial-moneyshot-yummy-4245.flv"><img src="slides/interracial-moneyshot-yummy-4245/1.jpg" /></a></li>
  5.     <li><a href="vids/blonde-redhead-licking-3472.flv"><img src="slides/blonde-redhead-licking-3472/1.jpg" /></a></li>
  6.     <li><a href="vids/toys-star-hard-and-fast-5512.flv"><img src="slides/toys-star-hard-and-fast-5512/1.jpg" /></a></li>
  7.     <li><a href="vids/licking-milf-brunette-273.flv"><img src="slides/licking-milf-brunette-273/1.jpg" /></a></li>
  8.     <li><a href="vids/fist-mouth-lesbian-4877.flv"><img src="slides/fist-mouth-lesbian-4877/1.jpg" /></a></li>
  9.     <li><a href="vids/behind-sofa-blowing-1001.flv"><img src="slides/behind-sofa-blowing-1001/1.jpg" /></a></li>
  10.   </ul>
  11. </div>


Now, I haven't tested any of the above code, and you'll probably want to preload the images and change the naming/markup structure (and, by association, the logic of the loop)... But I hope it's enough to give you some clues and a place to begin. Good luck.
Comments on this post
Winters agrees: lol

Reply With Quote
  #5  
Old March 13th, 2008, 06:35 PM
Arty Effem's Avatar
Arty Effem Arty Effem is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2006
Location: England
Posts: 321 Arty Effem User rank is Sergeant Major (2000 - 5000 Reputation Level)Arty Effem User rank is Sergeant Major (2000 - 5000 Reputation Level)Arty Effem User rank is Sergeant Major (2000 - 5000 Reputation Level)Arty Effem User rank is Sergeant Major (2000 - 5000 Reputation Level)Arty Effem User rank is Sergeant Major (2000 - 5000 Reputation Level)Arty Effem User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 6 Days 11 h 28 m 35 sec
Reputation Power: 48
Quote:
Originally Posted by o2pb
I already have the sequences of images ready, Im very familiar with that part of programming. I know nothing about JS, and I simply need to turn the frames I already have into a looping sideshow on mouseover.
Someone asked for effectively the same thing recently, and this is what I threw together:
http://scripterlative.com/test/multiswap.htm

source file:
http://scripterlative.com/test/multiswap.js
Comments on this post
vbrtrmn agrees: nice
Joseph Taylor agrees!
__________________
No it's not 'awesome' - it's just code.

Scripterlative

Reply With Quote
  #6  
Old March 14th, 2008, 05:45 AM
o2pb o2pb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 58 o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level)o2pb User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 26 m 26 sec
Reputation Power: 6
Quote:
Originally Posted by Arty Effem
Someone asked for effectively the same thing recently, and this is what I threw together:
http://scripterlative.com/test/multiswap.htm

source file:
http://scripterlative.com/test/multiswap.js


Thats perfect! Thanks!

Joseph Taylor, thanks for the effort as well.

One thing thou, does this example pre-load the images?

Last edited by o2pb : March 14th, 2008 at 10:57 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Onmouseover slideshow (similar to RedTube)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
Stay green...Green IT