473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Controlling arrays of quicktime videos with .onmouseclick

1
hi there,

I am wondering how i can go about loading an array with quicktime videos then using js to dynamically embedd movies as they are needed into the webpage (if it is possible?)

I have a js file that loads information in an array for an image map as to what it should do when onmouseover and onmouseout. I then call that array when the mouse moves around.

however on onmouseclick, i'd like the image to turn the image into a quicktime movie. I can make this work the brut force way (by makeing another html page that has a quicktime movie embedded), but id like to do it in a more elegant way if possible.

here is a simplified/shortened version of my js so far if my explaination is unclear as to what im doing (which is likely:P). any sort of guidance would be greatly appreciated!

Expand|Select|Wrap|Line Numbers
  1.  
  2. var mouseOvers = new Array();
  3. var mouseOuts;
  4. var mouseIsClicked;
  5.  
  6. window.onload = function()
  7. {
  8.   loadAll(document.getElementById('map1'));
  9.   loadAll(document.getElementById('map2'));
  10. }
  11.  
  12. function loadAll(arrayLoading)
  13. {
  14.   var areas = arrayLoading.getElementsByTagName('area'); 
  15.  
  16.   for(var i=0;i<areas.length;i++) 
  17.   {
  18.     areas[i].onmouseover = mouseIsOver;
  19.     areas[i].onmouseout = mouseIsOut;
  20.     areas[i].onmouseclick = mouseIsClicked;
  21.     areas[i].number = i;
  22.  
  23.     mouseOvers[i] = new Image();                            
  24.     mouseOvers[i].number = i;
  25.  
  26.     switch(i)
  27.     {
  28.       case 0: mouseOvers[i].main = './pics/ortho/mortho_wd.jpg';
  29.                 //stuck here
  30.               //mouseIsClicked[i].movie = './quick/quick1.mov';
  31.         break;
  32.       default: alert('Oops! Make sure you have enough cases to match your number of areas!')
  33.         break;
  34.     }
  35.   }
  36.  
  37.  
  38.  
  39. }
  40.  
  41.  
  42.     function mouseIsOver()
  43. {
  44.  
  45.     var navigate = document.getElementById('map1');
  46.     var navImg = navigate.getElementsByTagName('img'); 
  47.  
  48.     navImg[0].src = mouseOvers[this.number].main;
  49.  
  50. }
  51.  
  52.     function mouseIsOut()
  53. {
  54.  
  55.     var navigate = document.getElementById('map1');
  56.     var navImg = navigate.getElementsByTagName('img'); 
  57.  
  58.     navImg[0].src = './pics/ortho/mortho.jpg';
  59. }
  60.  
  61.     function mouseIsClicked()
  62.  
  63. {
  64.     alert('im in the click')
  65.     //content.innerHTML= mouseOvers[this.number].txt
  66.  
  67. }
  68.  
  69.  
  70.  
  71.  
Nov 27 '06 #1
1 2182
acoder
16,027 Expert Mod 8TB
There's no onmouseclick, use onclick instead.

As for the videos, keep the srcs of the movies in an array. Either have the HTML movie code (object/embed) ready, but hidden at the same position as the image (probably the better option) and change the src, or dynamically create the Quicktime plugin each time and replace the image. This link may help.
May 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Stefan Tietke | last post by:
Hi all, for a realtime simulation of a video installation we want to use Quicktime to read video data from a file or stream and process the data in a realtime Gameblender model. We are trying...
7
by: Sean | last post by:
Hi I've written an HTML page that has a link to an MPG file, to be burned onto a "Demo CD". The MPG file is quite big - 500MB. On my computer, it works fine - clicking the link opens up Windows...
1
by: Danny | last post by:
I have this code below to do a rollover image. IT doesnt work with the onmouseclick event. But it wil lwork fine with the onmouseover so when the user hovers over the image, the main image...
10
by: comp.lang.php | last post by:
echo mime_content_type('/var/www/html/video/small.mov'); // 1.5mb Quicktime video returns "video/quicktime" echo mime_content_type('/var/www/html/video/huge.mov'); // 10.5mb Quicktime video...
2
by: Vanga Sasidhar | last post by:
Already posted the same message but the date and time of my machine was set back. and it was listed under the old date. Thats why I am posting the same message again. Please accept this. ...
15
by: Encapsulin | last post by:
Hello everybody. I'm trying to change src of quicktime embedded object with javascript: <html><body> <script language="JavaScript"> function Exchange() { document.qtvr.src = "sample2.pano";...
22
by: Michael Levin | last post by:
I have a very simple page, which shows 3 Quicktime movies in a table. I think I'm using just standard simple HTML. In Netscape or Safari on a Mac, they look fine. In Internet Explorer on a PC, the...
3
by: triplejump24 | last post by:
i LOVE doing c++ programming, but i never can get myself started! Once i figure it out, its fun but anyways here it goes... Im given a file c:\temp\hwk8input.txt, which contains the records of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.