SWF Tools - swfobject.embedSWF() call is rendering into page text rather than source code. Why?

I'm trying to use SWF Tools to embed a swf of mine. My problem is that the swfobject code that is generated is being displayed as user-viewable text rather than ending up in the source code and operating as it should.

My swf is custom made so I'm not trying to use one of the players that SWF Tools is built to be able to use. I installed SWF Tools. I have Drupal 6. I enabled the swfobject 2 module and put the swfobject.js in the correct folder and uploaded it.

My php input source for my node looks like this:

<?php
$args
["params"]["width"] = '400';
$args["params"]["height"] = '400';

$args["flashvars"]["config"] = "config.xml";
$appPath = 'http://' . $_SERVER["SERVER_NAME"] . '/app/staffadmin/Main.swf';

print
swf($appPath, $args);
?>

And this is what is output on the page – note, the swfobject embed code really is output as user-readable text, I didn't mix up the way I'm posting this question:

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

swfobject.embedSWF(“http://mydomain.com/app/staffadmin/Main.swf”, “swfobject2-id-12541564101”, “400”, “400”, “7”, “”, { “config”: “config.xml”, “width”: “400”, “height”: “400” }, { “swliveconnect”: “default”, “play”: “true”, “loop”: “false”, “menu”: “false”, “quality”: “best”, “scale”: “showall”, “align”: “l”, “salign”: “tl”, “wmode”: “opaque”, “bgcolor”: “#FFFFFF”, “version”: “7”, “allowfullscreen”: “false”, “allowscriptaccess”: “sameDomain”, “width”: “400”, “height”: “400”, “base”: “http://mydomain.com/sites/default/files/”, “src”: “http://mydomain.com/app/staffadmin/Main.swf” }, { “id”: “swf12541564101” });

It looks like I'm getting close, any suggestions? I'm also wondering how I can make the Flash Player version 9.0.115? It looks like it's defaulting to "7"

Comments

Figured it out

The problem I had was that another input format was trying to format the PHP code. I created a new input format called PHP only, and only enabled PHP for it, not HTML, line breaks, Textile or anything else. That worked. I'm sure you could have another formatter, or change the order to also fix it but I'm not sure exactly which input format was the culprit and I only need PHP right now.

Flash player won't wrap swf/flv content

I'm getting this message and the following parameters when I try to embed a SWF via SWFObject2.

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

swfobject.embedSWF("http://localhost:8082/sites/default/files/Flvcsn.swf", "swfobject2-id-12901178711", "800", "570", "7", "", [ ], { "swliveconnect": "default", "play": "true", "loop": "true", "menu": "false", "quality": "autohigh", "scale": "showall", "align": "l", "salign": "tl", "wmode": "opaque", "bgcolor": "#FFFFFF", "version": "7", "allowfullscreen": "true", "allowscriptaccess": "sameDomain", "base": "http://localhost:8082/sites/default/files/", "src": "http://localhost:8082/sites/default/files/Flvcsn.swf", "height": 570, "width": 800 }, { "id": "swf12901178711" });

I have tried using many of the available players - FlowPlayer, Dashplayer, etc, but none of these are opening as they are supposed to. They don't open FLV files either. I have SWF Tools and jQuery Media installed and configured (correctly, as far as I can tell), along with the players I mentioned earlier.

If anyone knows what the problem could be, I'd sure appreciate the help! Thanks!!!

Object Embedding (Flash)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week