Integrating swf file in java script

Integrating swf file in java script

We implemented one concept in Flex and now would like to integrate with JavaScript. Earlier we integrated an Applet code but now, we developed the concept in Flex, however, I am unable to integrate the concept in java script.

Can anyone help me out with the procedure to integrate flex swf file in java script ?

Here is my earlier java script code :

var file=gup('query');
//document.write(file);
var prevFile=gup('prevFileName');
//document.write(prevFile);
document.write("<table align=\"center\"><tr><td><applet code=\"DELO/MyApplet.class\" archive=\"Visual.jar\" width=1000 height=500>");

document.write("</applet></td></tr></table>");
function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

Add Comment

Put code snippets inside language tags:
[language] [/language]

Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]

See here for supported languages.

Javascript must be enabled to submit anonymous comments - or you can login.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.