Hello.

Currently I am working on this site.
I am trying to display a flash animation on the header, but it actually only works for the frontpage.
Any idea about how to make it work for the rest of the site?
Moreover, I wanted to use an animation which depends on a txt file. That means that the file.swf and file.txt should be placed on the same folder. I tried that, but nothing was displayed.

Thank for your help.

Comments

marcvangend’s picture

It's hard to see why the flash header is not loading. How did you include it in the fromt page? I'd say, if you want the same header on every single page, the best place to put it in in page.tpl.php. If you place it there (make sure it's not within IF statements or other conditional code) it should show up on every page.

The txt file issue might be caused by a wrong url, so the swf can';t find the txt file. It can be hard sometimes to determine from which folder the swf tries to load external files. I use a firefox plugin called liveHTTPheaders (https://addons.mozilla.org/nl/firefox/addon/3829) to debug issues like this. It shows you exactly which files the swf tries to load.

Mariano.o’s picture

Ok. Thanks for your help marcvangend!
Actually I included the swf in page.tpl.php. Didn't actually see it was within an if statement. I changed that and now it displays nicely on every site. I'll try your suggested add-on for firefox and I'll let you know if I can solve the issue with the required text file.

Thanks again.

marcvangend’s picture

You're welcome. Thanks for the feedback, and please let us know when the txt issue is solved (or not).

bwv’s picture

Hi, I'm trying to find an if statement so that I can limit the appearance of some flash that is built into page.tpl.php just to the home page. Do you recall how you did this? thanks!
----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.

marcvangend’s picture

If want your swf only on the home page, I would not recommend to include it in page.tpl.php. You can never be 100% sure which changes you want to make later on, so I always try to build my sites as flexible as possible. (When you are building a page for a customer, or when others will have to maintain the site, this is even more important.)

My advice would be to create a block containing the swf and create a block region in your template. Then publish the block in that region and set it to appear on the homepage only. If the desired position of your swf is somewhere in the content area, together with other content, the panels module would be a good option.

fuquam’s picture

My Flash header isn't showing up at all. It shows up when I test it locally but not from the web server. I'm thinking there is something I'm missing. So here is a snippet from my page.tpl.php file. The SWF is called header-b.swf and is in a /pics directory located in the same directory as the page.tpl.php file. Thanks in advance.

 <td class="primary-links" width="100%" bgcolor="#FFFFFF" align="right" valign="middle">
      <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','688','height','117','src','pics/header-b','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','pics/header-b' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="688" height="117">
        <param name="movie" value="pics/header-b.swf" />
        <param name="quality" value="high" />
        <embed src="pics/header-b.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="688" height="117"></embed>
      </object></noscript></td>
marcvangend’s picture

Did you try an absolute path to the swf file? (like http://www.yoursite.com/themes/yourtheme/pics/header-b.swf)

fuquam’s picture

Yes I should have mentioned that in the post. I did try that. I also checked all css associated with the header in the template to make sure nothing was blocking it with anything crazy like a z-index or something.
Thanks for checking.

fuquam’s picture

My header graphic prior was just a jpg which was loaded from the css id. Is there a way to do the same with a SWF? I'd think there would be too much code involved. This is driving me crazy.

monstordh’s picture

I use SWFObject, rather than AC_FL_RunContent, so I don't know anything about it. Does it need to call an external .js file to work properly? I know if I don't have my swfobject.js file in my header it can cause this type of problem.

fuquam’s picture

Is that a module? I'm wondering if Drupal needs something special to recognize SWFs. Thanks for the tip.

fuquam’s picture

It seems to only be available for Drupal 4 and I'm using 5.

I tried installing SWFUpload hoping that might help but I get this error on my log.

SWFUpload Missing files
You must install the minimalistic SWFUpload library to modules/swfupload/swfupload.

The error links to http://swfupload.mammon.se/ which brings up this error:

Site Temporarily Unavailable
We apologize for the inconvenience. Please contact the webmaster/ tech support immediately to have them rectify this.

error id: "bad_httpd_conf"

I just want to embed a SWF in my page template.

monstordh’s picture

No, I don't use the module. I haven't even looked at it.

Do this...

  1. Go to: http://blog.deconcept.com/swfobject/
  2. Read up on swfobject
  3. put the swfobject.js (and your .swf file) file into your theme directory
  4. include a call to the swfobject.js in the <head> of your page.tpl.php using php to include the path to your theme (see http://agaricdesign.com/path-to-theme)
  5. add the code to include the .swf file where you want it (see below for a sample snippet of what i use - be sure to use the php code from the previous step for the path to your .swf file)

That should be it. It may seem complicated now, but it's really quite quick & easy once you get the hang of it. Here's the generic snippet for .swf inclusion to modify for your needs:

<!-- FLASH CONTENT begins -->
<div id="my_flash"> <!-- my_flash begins -->
		<!-- This is a placeholder in case javascript is disabled
			and will be replaced by the SWF if javascript is enabled -->
		<img src="images/flash.jpg" width="670" height="220" alt="Flash">
		</div> <!-- my_flash ends -->
		<script language="JavaScript" type="text/javascript">
var fo = new FlashObject("flash.swf", "my_flash", "670", "220", "6");
fo.addParam("quality", "high");
fo.addParam("WMode","transparent");
fo.write("my_flash");
        </script>
<!-- FLASH CONTENT ends -->
fuquam’s picture

I still don't have it working but I have my SWF and swfobject.js files in my theme directory. I have my call to the .js file in the page.tpl.php file like so

I added the code and modified it accordingly. I read the path to theme bit but my theme template, the SWF and swfobject.js file are all in the same directory. Maybe this is what I'm doing wrong?

Thanks a bunch for your response.

fuquam’s picture

I used absolute path again and coupled with everything else you just showed me it works great now. Thank you so much monstordh.

- Scott

monstordh’s picture

Glad to hear it's working.

FYI - your path to call the swfobject.js should look like this:

<script src="<?php echo base_path() . path_to_theme() . "/swfobject.js"; ?>"

and your call to your .swf file should look similar to this:

var fo = new FlashObject("<?php echo base_path() . path_to_theme() . "/my_flash.swf"; ?>", "blc_flash", "750", "300", "6");

you may have forgotten to include the leading "/" before your filename. These code snippets will ensure your paths are correct whether you keep your site at its current location or if it gets moved. Glad you got it working...

rolandk’s picture

monstordh, thanks for the code. I can't seem to get it to work

Can you please post 1 complete block of code including the call to swfobject.ds AND the call to the .swf file ?

My drupal is in a folder on my server called portal

How would I set the absolute drupal path to the swf header ?

fuquam’s picture

Your absolute path would be http://www.yoursite.com/portal/themes/yourtheme/pics/yourswf.swf) assuming the swf is in a folder called pics within your theme folder like mine is.

Also you wrote swfobject.ds . Make sure its swfobject.js as in javascript. That could be your problem.

Hope that helps.

monstordh’s picture

rolandk - I personally don't advise an absolute path, incase you move something. Let php do your work for you.

My call to the swfobject.js file is complete in the above post. Here is a complete call to the .swf file:

<!-- FLASH CONTENT begins -->

<div id="my_flash"> <!-- my_flash begins -->
</div> <!-- my_flash ends -->

<script language="JavaScript" type="text/javascript">
var fo = new FlashObject("<?php echo base_path() . path_to_theme() . "/my_flash.swf"; ?>", "my_flash", "750", "300", "6");
fo.addParam("quality", "high");
fo.addParam("WMode","transparent");
fo.write("my_flash");
        </script>
<!-- FLASH CONTENT ends -->
thebestcookingshowever’s picture

Is all this code being added to the file page.tpl.php within sites/all/themes/my_theme? you say to put the swf. where I want it - I am not exactly sure where that is?

thanks!

Anonymous’s picture

You can use the new swfobject v2 from http://code.google.com/p/swfobject/ .
All you have to do is include the script swfobject.js in your theme an then from a block do the following :

Write the following code and set the block filter to php :

<div id="my_flash"></div>
<script language="JavaScript" type="text/javascript">
swfobject.embedSWF("<?php print "path_to_your_flash"; ?>/yourflash.swf", "my_flash", "210", "222", "6");
</script>

I have my flash file in my theme directory you can put it even in the files directory if you want.
I use drupal 6 but I think that this works from D5 too.

Hope it works.

grooverider’s picture

hi there ppl :)
i use drupal 6 to and want to include flash in a block but having problems, anyhow was following the instructions added to the head of my page.tpl.php in the theme i'm using the following:

original "head" of page.tpl.php:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?></script>
</head>

line added to "head":

<script src="<?php echo base_path() . path_to_theme() . "/swfobject.js"; ?>"

final new head:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> 
 <script src="<?php echo base_path() . path_to_theme() . "/swfobject.js"; ?>"</script>
</head>

is that correct? then i went to my block, told it to use php filter and added the following:

<div id="my_flash"></div>
<script language="JavaScript" type="text/javascript">
swfobject.embedSWF("<?php print "path_to_your_flash"; ?>/flash.swf", "my_flash", "141", "191", "6");
</script>

I put my flash.swf and the swfobject.js in the theme directory where the page.tpl.php is located, in which i edited the head section.
One question though about the part i add to the block, the "path_to_your_flash" has to be what exactly, the absolute path like "http://mysite/themes/garland/flash.swf" so like this:

<div id="my_flash"></div>
<script language="JavaScript" type="text/javascript">
swfobject.embedSWF("<?php print "http://mysite/themes/garland/flashvortex.swf"; ?>/flash.swf", "my_flash", "141", "191", "6");
</script>

or somehow different? any tips what i'm doing wrong?
thx in advance :)

grooverider’s picture

ok got it working now, but only in firefox, in IE the display is not working, no flash and the block is somehow moved somewhere

original "head" of page.tpl.php:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?></script>
</head>

I tried 3 different changes, number 1:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  <script type="text/javascript" src="<?php echo base_path() . path_to_theme() . "/swfobject.js"; ?>"></script>
</head>

also tried, number 2:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?></script>
<script type="text/javascript" src="<?php echo base_path() . path_to_theme() . "/swfobject.js"; ?>"></script>
</head>

and this one, number 3:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
<script type="text/javascript" src="<?php echo base_path() . path_to_theme() . "/swfobject.js"; ?>"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> </script>
</head>

added this to block and turned on php filter:

<div align="center">
<div id="flash"></div>
<script language="JavaScript" type="text/javascript">
var flashvars = false;
var params = {
  WMode: "transparent"
};
var attributes = false;
swfobject.embedSWF("<?php print "http://mysite.com/themes/garland"; ?>/flash.swf", "flash", "141", "191", "6", "expressInstall.swf", flashvars, params, attributes);
</script>
</div>

all three versions of the changed page.tpl.php i get the same results, the flash in the block is displayed correctly and at the right place in firefox but in IE, flash is not displayed at all and the block is moved, how to get it displayed and working right in IE 6&7?
thx in advance

grooverider’s picture

ok took a different approach, which works now, first edit page.tpl.php which is at yoursite/themes/yourtheme/page.tpl.php
original "head" of page.tpl.php for my case ('site/themes/garland/page.tpl.php'):

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?></script>
</head>

new head:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
<script type="text/javascript" src="/themes/garland/foo.js"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> </script>
</head>

as we specified 'src="/themes/garland/foo.js"' we need to create a file called 'foo.js' and upload it to 'site/themes/garland/
the content of my 'foo.js'

function RunFoo()
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="141" height="191">\n');
   document.write('<param name="movie" value="flash.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="wmode" value="transparent" />\n');
   document.write('<embed src="/flash.swf" width="141" height="191" wmode="transparent"></embed>\n');
   document.write('</object>\n');
}
function RunFoonl()
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="141" height="191">\n');
   document.write('<param name="movie" value="NLflash.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="wmode" value="transparent" />\n');
   document.write('<embed src="/NLflash.swf" width="141" height="191" wmode="transparent"></embed>\n');
   document.write('</object>\n');
}
function RunFoopl()
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="141" height="191">\n');
   document.write('<param name="movie" value="PLflash.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="wmode" value="transparent" />\n');
   document.write('<embed src="/PLflash.swf" width="141" height="191" wmode="transparent"></embed>\n');
   document.write('</object>\n');
}

basically there are three functions in the 'foo.js' because i have three flash files, which i use as menus, and i have three languages, so i wanted the right flash menu loaded according to the language, i added as parameters to be high quality and transparent background, u can add what u want of course...
then u only need to include the following code in your block body and enable full html filter:

<div align="center">
<script type="text/javascript">RunFoo();</script>
</div>

the '<div align="center">' is there because i wanted the flash menu to be displayed in the middle of the block
for more information take a look at:
http://www.adobe.com/devnet/activecontent/articles/devletter.html
anyhow would be nice to know why the other stuff i posted didn't work, if some1 knows how and why please respond, thx in advance :)

jeff-drew’s picture

In the last post (grooverider - April 25, 2008 - 05:25),
then u only need to include the following code in your block body and enable full html filter:
I don't know by that does it mean put the code >> in the block.tpl.php << or >> drupal site/admin/build/block & create a block?

Someone please go into a little more with specifics.

ALSO, does anybody have working examples of these page / block / node.tpl.php that we can look at and share the working code.

Please post links or an addendum to grooverider's pretty complete post.

Thank you.

grooverider’s picture

In the last post (grooverider - April 25, 2008 - 05:25),
then u only need to include the following code in your block body and enable full html filter:
I don't know by that does it mean put the code >> in the block.tpl.php << or >> drupal site/admin/build/block & create a block?

I meant the second part drupal site/admin/build/block & create a block and enable full html filter there, nothing in the block.tpl.php, you do not need to do any changes in any *tpl.php except the page.tpl.php

i have implemented this in this site http://jj-consulting.org

grooverider’s picture

this worked out better for me, anyone else tried something and had success?
create new block:
adminster-->block-->add block-->block body:

<div align="center">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','141','height','191','wmode','transparent','src', 'http://yoursite.com/themes/garland/flashvlu','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://yoursite.com/themes/garland/flashvlu' ); //end AC code
</script></div>

Adjust the parameters according your need in the example above width, height etc... my swf file is called flashvlu.swf, I use absolute paths to give its locations as you can see in the example above src','http://yoursite.com/themes/garland/flashvlu' and 'movie','http://jj-consulting.org/themes/ifeeldirty/flashvlu', but you do not include the extension as you can see above. You can put the *.swf file anywhere just adjust the path accordingly and make sure it is accessible through the web.
Also don't forget to set the "input format" to "full html" when creating the block in the admin menu.
Next, we need to adjust the page.tpl.php, but only the head section, we have to upload an "AC_RunActiveContent.js" and an "AC_ActiveX.js" to your webspace. Their content is given at the bottom and can simply be copied and pasted (taken from adobe.com). You can upload them anywhere on you webserver, just adjust the path to them accordingly in the "page.tpl.php"

original head of page.tpl.php:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
<script type="text/javascript" ><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> </script>
</head>

modified head of page.tpl.php:

<head>
  <title><?php print $head_title; ?></title>
  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
<script type="text/javascript" ><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> </script>
<script src="http://yoursite.com/themes/garland/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="http://yoursite.com/themes/garland/AC_ActiveX.js" type="text/javascript"></script>
</head>

below you can find the content of the AC_RunActiveContent.js and the AC_ActiveX.js these are just a matter of copy and paste into file and put it somewhere accessible on your webserver
content of AC_ActiveX.js:

//v1.1
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AX_RunContent(){
  var ret = AC_AX_GetArgs(arguments);
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_AX_GetArgs(args){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "pluginspage":
      case "type":
      case "src":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "data":
      case "codebase":
      case "classid":
      case "id":
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  return ret;
}

content of AC_RunActiveContent.js:

//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
vitalsols’s picture

Thanks alot