[flash][javascript] Controle werkt niet

Pagina: 1
Acties:

  • Vinzzz243
  • Registratie: Februari 2001
  • Laatst online: 22-01-2025
ik heb de volgende code, en kom er maar niet uit waarom hij niet werkt zoals k dat wil. Als er geen flash is, zou hij een plaatje moeten laten zien. Dit doet hij echter niet (ook geen kruisje), hij laat gewoon de flashplayer niet zien maar alleen de achtergrond van de cell waarin hij stond.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
CODEBASE="http://active.macromedia.com/flash/cabs/swflash.cab#version=3,0,0,11"

WIDTH="445" HEIGHT="60" NAME="sw" ID="sw">
<PARAM NAME="Movie" VALUE="flash/banner_nl.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="Loop" VALUE="true">
<PARAM NAME="play" VALUE="true">

<!-- begin the JavaScript -->
<SCRIPT LANGUAGE="JavaScript">
<!-- hiding contents from old browsers  -->

//If this browser understands the mimeTypes property and recognizes the 
//MIME Type //"application/x-shockwave-flash"...
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]){

   //...write out the following <EMBED> tag into the document.
   document.write('<EMBED SRC="flash/banner_nl.swf" WIDTH="445" HEIGHT="60" LOOP="true" QUALITY="high">');
}

//Otherwise,...
else {

   //...write out the following <IMG> tag into the document. The image need
   //not be the same size as the Flash Player movie, but it may help you lay out the
   //page if you can predict the size of the object reliably.
   document.write('[img]"flash/banner_nl.jpg"[/img]');
}

//Done hiding from old browsers. --> 
</SCRIPT>

<!-- Close the OBJECT tag. --> 
</OBJECT>

[ Voor 32% gewijzigd door Vinzzz243 op 19-03-2004 09:51 ]


  • André
  • Registratie: Maart 2002
  • Laatst online: 26-05 00:33

André

Analytics dude

Omdat alles binnen de <object> tag staat?
Ik gebruik altijd deze:

Visual Basic:
1
2
3
4
5
6
7
8
9
<script language="vbscript">
  Flash = false
  on error resume next
  Flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))
</script>
<script language="javascript">
  if (Flash) { document.write ("<object width='30' height='30' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'><param name='movie' value='test.swf'><param name='quality' value='best'><param name='menu' value='false'><param name='bgcolor' value='#86C2C2'></object>"); }
  else { /* Plaats hier de gewenste actie als er geen Flash is */ }
</script>

  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

Als je het plaatje gewoon zonder javascript binnen de object-tag zet zou het ook moeten werken, hoor.
A user agent must interpret an OBJECT element according to the following precedence rules:

1. The user agent must first try to render the object. It should not render the element's contents, but it must examine them in case the element contains any direct children that are PARAM elements (see object initialization) or MAP elements (see client-side image maps).
2. If the user agent is not able to render the object for whatever reason (configured not to, lack of resources, wrong architecture, etc.), it must try to render its contents.

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


  • Vinzzz243
  • Registratie: Februari 2001
  • Laatst online: 22-01-2025
prima, bedankt, ik ga dit vanavond testen!