www.insanecricket.com/EVisionbeta/index.htm

I would like to know how to activate the controls automatically on the right bar so it activates auto when page is loaded everytime. I know there are .js out there but i tried to make it work but it doesnt work.

Thanks
NPatel

Dani AI

Generated

The "Click to activate and use this control" box is an Internet Explorer/ActiveX behaviour, not a Flash-player bug. Static <object>/<embed> markup can trigger IE's activation step; dynamically inserting the player with JavaScript avoids that extra click. wants the controls active immediately and rightly pointed to embedding docs — the practical fix is to use the player’s JS embed or a small library that writes the SWF at runtime (for example SWFObject).

Steps to resolve:

  1. Use the player's JavaScript embed routine (or SWFObject) instead of a hard-coded object tag.
  2. Pass the video filename and autoplay/autostart via flashvars so the player initializes as soon as the SWF is created.
  3. If you need JS<->Flash communication, set the appropriate params (for example allowScriptAccess).
  4. Test in the target IE versions — dynamic insertion is the reliable cross-browser approach.

A minimal SWFObject call looks like this:

swfobject.embedSWF('player.swf','playerDiv','640','360','9.0.0',null,
  {file:'video.flv',autostart:true},
  {allowScriptAccess:'always'});

Use the player's supplied JS embed when available (it does the same thing). For background on dynamic vs static embedding and the HTML elements involved, see SWFObject and the HTML object documentation:

Recommended Answers

All 2 Replies

As found on JW website Embedding Flash

The code listed above uses only a couple of the available parameters. A complete list of them can be found at Adobe's website, but let's show the most interesting ones here:

  1. bgcolor (#rrggbb): set the SWF background color using a hexadecimal value.
  2. flashvars (variables): the variables placed here will be loaded in the SWF.
  3. menu (true, false): set this to false to hide most of the rightclick menu.
  4. wmode (opaque, transparent, window): set this to either transparent or opaque to fix z-index or flickering issues.

I want to use the menus too and the players only support .flv that is for swf

It is already embedded just need a script to auto activate it.

Thanks for reply.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.