473,396 Members | 1,815 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,396 software developers and data experts.

Can I remove a player and its controls using RemoveChild() ??

I am not a Javascript programmer, but know enough to be dangerous. (When I went to college we learned Fortran-2, COBOL was still an experiment).

From the code snippet below, I am using DIV to put two elements in the same space (separated by the Z-index). The top element is a video player with a transparent background. (A walk-on spokesperson).

This works fine, except that the client wants controls in the Flash video player, and when the video ends, the player controls remain on the page.

From what I've read, I may be able to accomplish this by using the RemoveChild() Javascript operator triggered by an event from the Flash player. But nothing I've tried works. Is my assumption wrong or is there a better way to remove the controls?

TIA
Steve


Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Z-Index Example - Working</title>
  6. <style type="text/css">
  7.  
  8. <!--
  9. body,td,th {
  10.     font-family: Georgia, Times New Roman, Times, serif;
  11. }
  12. div.box1 {
  13.     position: absolute;
  14.      top: 0px; left: 0px;
  15.      z-index: 10;}
  16. div.box2 {
  17.     position: absolute;
  18.      top: 0px; left: 0px;
  19.      z-index: 20;}
  20. -->
  21.  
  22. </style></head>
  23.  
  24. <body>
  25.  
  26. <!-- This is random text only to demonstrate that the video player is truly transparent. -->
  27.  
  28. <div class="box1">This is the lower layer because the z-index is lower than the z-index of the video.
  29.   <br>The English language is a tricky devil to wrap your head around sometimes. It's a hard language to
  30.   learn for non-native speakers, and it has more irregularities than an old-folks home. With that in mind,
  31. ... several lines of meaningless text deleted ...  
  32. <br>
  33. </div>
  34.  
  35.  
  36. <div class="box2">
  37.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="720" height="480">
  38.     <param name="movie" value="EnergyStar.swf">
  39.     <param name="quality" value="high">
  40.     <param name="allowScriptAccess" value="sameDomain" />
  41.     <param name="allowFullScreen" value="True" />
  42.     <param name="wmode" value="transparent">
  43.  
  44.     <embed src="EnergyStar.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="720" height="480" allowScriptAccess="sameDomain" allowFullScreen="True" wmode="transparent">
  45.     </embed>
  46.  
  47.   </object>
  48. </div>
  49.  
  50. </body>
  51. </html>
  52.  
  53.  
Mar 12 '10 #1
0 1145

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

Similar topics

9
by: Ken | last post by:
I am trying to create one image using JavaScript; then later in the script remove the image - not just remove the src. The following creates the image, but I have been unable to remove it. How...
6
by: Boobie | last post by:
Is there any other way to remove a node/element other than going into the Parent and do "removeChild" ? thanks (need to remove a div of id "foobar")
11
by: Stefan Finzel | last post by:
Hi trying to remove one or all elements of select options fails for Pocket Internet Explorer. Is there a way to do this? if is_PIE { // this does not work on Pocket IE while (opt.length) {...
8
by: Mikey | last post by:
I have an XML document as follows: <Menu> <Group> <Item Text="About Us" AccessRoles="All"> <Group> <Item Text="Option 1" AccessRoles="All" /> <Item Text="Option 2" AccessRoles="All" /> <Item...
5
by: JulioHM | last post by:
Hi all, I'm trying to use WMP in FireFox and I have the following tag to embed the player into the html page. <EMBED TYPE="application/x-mplayer2" ...
19
by: Tony | last post by:
I'm working on project that plays movies using Windows Media Player and I'm controlling everything with JavaScript. Per the client I only need to support IE 6 or greater which happens to make...
3
by: alice | last post by:
I've been trying for a long time to figure this out, to have a page with several MP3 clips, and each one having a custom start and stop button next to them to play the track. I finally found a bit...
2
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.