views:

144

answers:

2

I have tried through another user's suggestion, to use the swfobject methos of embedding Flash. I however, must not be as smart.

Below is the monster I have come up with, but no movie plays, and I cannot even distinguish it as a Flash movie when I control+click (Mac)... as if it doesn't even exist.

Any direction on how I could fix this would be greatly appreciated!

<div id="audioPlayer">
<script type="text/javascript">

var flashvars = {
wimpyApp: "mp3s/wimpy.php",
wimpySkin: "mp3s/skins/skin_transparent.xml",
defaultVisualExt: "jpg"
theVolume: "75"
bufferAudio: "0"
infoDisplayTime: "3"
scrollInfoDisplay: "yes"
startPlayingOnload: "yes"
autoAdvance: "yes"
popUpHelp: "yes"
};
var params = {
embed src="mp3s/wimpy_button.swf"
quality="high"
menu: "false"
loop: "false"
quality: "high"
scale: "noscale"
salign: "lt"
bgcolor: "000000"
wmode: "transparent"
allowScriptAccess: "sameDomain"
};
var attributes = {
id: "myDynamicContent",
name: "myDynamicContent"
};

swfobject.embedSWF("mp3s/wimpy_button.swf", "movie", "250", "140",
"9.0.0","Scripts/expressInstall.swf", flashvars, params, attributes);

</script>
+3  A: 

You're missing a lot of commas in your objects:

var flashvars = {
wimpyApp: "mp3s/wimpy.php",
wimpySkin: "mp3s/skins/skin_transparent.xml",
defaultVisualExt: "jpg"
theVolume: "75"
bufferAudio: "0"
infoDisplayTime: "3"
scrollInfoDisplay: "yes"
startPlayingOnload: "yes"
autoAdvance: "yes"
popUpHelp: "yes"
};

should be

var flashvars = {
wimpyApp: "mp3s/wimpy.php",
wimpySkin: "mp3s/skins/skin_transparent.xml",
defaultVisualExt: "jpg",
theVolume: "75",
bufferAudio: "0",
infoDisplayTime: "3",
scrollInfoDisplay: "yes",
startPlayingOnload: "yes",
autoAdvance: "yes",
popUpHelp: "yes",
};

Also, you have a div named 'movie' right? Did you remember to include the swfobject.js?

<script type="text/javascript" src="_js/swfaddress.js"></script>
quoo
A: 

Thanks quoo,

I actually got it to work by downloading an updated wimpy.swf from their site and using that. Found it in a related posting here.

I am still using the "twice baked" method because hey, it was already there and now it works... BUT, I am still working on a copy and trying this swfobject method.

I placed the commas in the flash vars as you said, and actually my div is named "audioPlayer" so I changed all occurrences of "movie" to that.

I have the js file in the header as:

It resides in a "Scripts" folder.

Still not working though :(

I'm confused why this is an answer. Sounds like parts of this belong as an edit to the question, and other parts as a comment to other posts. Not trying to be mean, but stack overflow is more of a question answer site, rather than a message board or forum.
Kekoa
Well, I wanted to point out that I fixed it by reading another post, and gave my explanation. It's kind of a two-parter because quoo above gave me another suggestion, which didn't work for me. I still WANT it to work though. Didn't mean to offend... I understand this works as a ask question - get answer - explain answer site and that's why I love it :)
I probably should have commented instead of answered :) See, I learned something!
if it's not still working, I suspect one of your paths is off. Are you getting any javascript errors? Did you check it with charles to make sure it's finding everything it tries to load?
quoo