View Full Version : flashvars problem
nojo191
07-02-2007, 03:19 AM
Anyone have an idea how to put this:
<embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="301" height="280" src="http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf" flashvars="autoPlay=yes&thePlayerURL=http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf&fileIds=&plURL=http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/?cachePL=true"></embed>
into the new macromedia guidlines (http://www.adobe.com/devnet/activecontent/articles/devletter.html) for not having a border show up around your flash? :confused: (I'm mostly confused about the "flashvars" part)
_Aerospace_Eng_
07-02-2007, 08:22 PM
You should use SWFObject (http://blog.deconcept.com/swfobject/) to get around the border on your flash. Don't say "But that looks to confusing to me". Just read the documentation on that site and check out the examples.
If you are unable to use javascript then you are stuck with the border.
nojo191
07-03-2007, 05:19 AM
I'm having a problem getting it to work... I put the src attribute in the new code the same as you would normally, but then there is another part (plURL) where it links to some songs the player is supposed to play. The problem is that it shows (http://www.freewebs.com/nojo191/index3.htm) everything but the songs. :( Any ideas?
_Aerospace_Eng_
07-03-2007, 06:43 AM
Seems to work fine for me. I see the songs and everything. I'm using Firefox 2.0.0.4
nojo191
07-03-2007, 08:12 PM
Yes, but that's with the border (unmodified).
_Aerospace_Eng_
07-03-2007, 09:45 PM
Then update your code to reflect the modified version.
nojo191
07-03-2007, 10:40 PM
Thanks for your continued help... I have put the modified version on this page (http://www.freewebs.com/nojo191/testpage.htm) to show you what it looks like. The music player then shows only the player, not the songs.
My old code:
<embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="301" height="280" src="http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf" flashvars="autoPlay=yes&thePlayerURL=http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf&fileIds=&plURL=http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/?cachePL=true"></embed>
My new code:
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
<embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="301" height="280" src="http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf" flashvars="autoPlay=yes&thePlayerURL=http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf&fileIds=&plURL=http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/?cachePL=true"></embed>
</div>
<script type="text/javascript">
var so = new SWFObject("http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf", "music", "301", "280", "8");
so.write("flashcontent");
</script>
I think the problem lies in how the script reads/displays the flashvars part.
justinbird
07-03-2007, 11:46 PM
You're not sending your flashvars with the swfobject call.
Remember, everything within the 'flashcontent' div is going to get replaced with the swfobject stuff.
you can do this:
<script type="text/javascript">
var so = new SWFObject("http:/..swf", "music", "301", "280", "8");
so.addVariable('autoPlay','yes');
so.addVariable('thePlayerURL','http://...');
so.addVariable('plURL','http://www.esnips.com//...');
so.addVariable('cachePL',true');
so.write("flashcontent");
</script>
nojo191
07-04-2007, 12:06 AM
Good idea, yes, but then where does the flashvars part come in? That is the content of the tag, but where does it say "flashvars"?
Wouldn't I need to put something like this in:
<script type="text/javascript">
var so = new SWFObject("http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf", "music", "301", "280", "8");
so.write("flashvars", "autoPlay=yes&thePlayerURL=http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf&fileIds=&plURL=http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/?cachePL=true");
</script>
nojo191
07-04-2007, 12:44 AM
urg... Now esnips is down (my playlist host). So I can't really test it for now.
nojo191
07-04-2007, 03:30 AM
Ok, good news. Esnips is back up, but the border is still there (http://www.freewebs.com/nojo191/testpage.htm). Here's my code:
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
<embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="301" height="280" src="http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf" flashvars="autoPlay=yes&thePlayerURL=http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf&fileIds=&plURL=http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/?cachePL=true"></embed>
</div>
<script type="text/javascript">
var so = new SWFObject("http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf", "music", "301", "280", "8");
so.addVariable('autoPlay','yes');
so.addVariable('thePlayerURL','http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf');
so.addVariable('plURL','http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/');
so.addVariable('cachePL',true');
so.write("flashcontent");
</script>
justinbird
07-05-2007, 07:01 AM
try losing the embed tag....you don't need it:
<div id="flashcontent"> </div>
_Aerospace_Eng_
07-06-2007, 05:22 AM
Post your actionscript if you have it.
StupidRalph
07-06-2007, 12:13 PM
Good idea, yes, but then where does the flashvars part come in? That is the content of the tag, but where does it say "flashvars"?
If you're using swfObject you don't need to worry about explicitly writing "flashvars". You are affectively doing so by using the following code. so.addVariable(variable name,"value");
You might want to go to might want to check the documentation for the understanding on that.
_Aerospace_Eng_
07-06-2007, 07:01 PM
If you're using swfObject you don't need to worry about explicitly writing "flashvars". You are affectively doing so by using the following code. so.addVariable(variable name,"value");
You might want to go to might want to check the documentation for the understanding on that.
Usually flash vars are loaded in a different method. Appending to the url of the flash file requires a different method for reading the query string. To give the OP a better answer we need to see the actionscript they are using.
StupidRalph
07-07-2007, 01:42 AM
I stand corrected...
nojo191
07-07-2007, 05:56 AM
However stupid I may seem, I'm not familiar with what actionscript really is. If you are refering to code within the flash movie, I don't know what the code is. My flash applet is a music player hosted by esnips.com, and they just gave me the html to use. By the way, justinbird, if I remove the embed tag, the entire applet dissappears.
The current html I am using (http://www.freewebs.com/nojo191/testpage.htm) is (the border's still there):
<div id="flashcontent">
<embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="301" height="280" src="http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf" flashvars="autoPlay=yes&thePlayerURL=http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf&fileIds=&plURL=http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/?cachePL=true"></embed>
</div>
<script type="text/javascript">
var so = new SWFObject("http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf", "music", "301", "280", "8");
so.addVariable('autoPlay','yes');
so.addVariable('thePlayerURL','http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf');
so.addVariable('plURL','http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/');
so.addVariable('cachePL',true');
so.write("flashcontent");
</script>
_Aerospace_Eng_
07-07-2007, 07:01 AM
I'm not seeing a border in Firefox. Post a screenshot of what you are seeing and please describe exactly WHAT border it is that you are talking about.
nojo191
07-08-2007, 05:53 AM
I'm using IE 7.0
(see attachment)
nojo191
07-08-2007, 06:04 AM
Hmm... I just downloaded Firefox myself, (by the way, I love it) and I don't see a border either. Is it still possible to fix the problem though?
_Aerospace_Eng_
07-08-2007, 06:41 AM
There are some javascript errors on your page causing swfobject not to work which is why you see the border.
You are missing a quote in this code
<script type="text/javascript">
var so = new SWFObject("http://www.esnips.com/escentral/images/widgets/flash/white_player_list.swf", "music", "301", "280", "8");
so.addVariable('autoPlay','yes');
so.addVariable('thePlayerURL','http://www.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf');
so.addVariable('plURL','http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/');
so.addVariable('cachePL',true');
so.write("flashcontent");
</script>
Its in one of your addVariable calls.
nojo191
07-17-2007, 02:08 AM
I'm sorry for my tardy response. I've been vacationing in Washington, DC for the past week. Fixing the quote had no influence on whether the songs were displayed within the player or not. This is becoming more of a problem then I thought it would be. :(
_Aerospace_Eng_
07-17-2007, 02:32 AM
One of your other scripts is throwing an error. I suggest you start removing them one by one. Because the script throws an error all JS on the page will stop loading which is why you still see the border.
nojo191
07-17-2007, 07:25 PM
I am irritated to say that I've basically stripped the page (http://www.freewebs.com/nojo191/testpage.htm) of all other content, and it still isn't displaying the songs.
_Aerospace_Eng_
07-18-2007, 03:37 AM
Whoa wait when did the songs become an issue. First it was the border. One step at a time.
Omnis
07-18-2007, 04:32 AM
Theres an extra forward slash in your URL
http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/
should be
http://www.esnips.com/plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/
I've tested the page in IE6 and theres no border, heres a screen
nojo191
07-19-2007, 06:02 PM
Ok. here's the deal. I fixed the slash, and that didn't make a difference. The border has now been fixed, but there are songs that are supposed to display in the flash aren't there. I have an account with Esnips (http://www.esnips.com/), and they gave me this code to use for a music player:
<table><tr><td><embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="301" height="280" src="http://cdn0.esnips.com/escentral/images/widgets/flash/white_player_list.swf" flashvars="autoPlay=no&thePlayerURL=http://cdn0.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf&fileIds=&plURL=http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/?cachePL=true"></embed></td></tr><tr><td> Powered by <a href="http://www.esnips.com/" target="_blank" style="color: #FF8000">eSnips.com</a></td></tr></table>
I stripped away the table elements, leaving only the flash. Now it appears they are using "cdn0" in front of their website, so I fixed that in my code too. By the way, the extra slash was supposed to be there (see above code). Nothing I changed made a difference.
So now it looks like getting the songs to display is the only problem left.
Omnis
07-20-2007, 09:01 AM
My bad, your right :thumbsup: the extra forward slash is meant to be there, nonetheless I will investigate its reason for being there.
You have forgotten to add one variable, your music player will work if you add this after the playerURL variable:
so.addVariable("fileIds","");
So it should all look like this:
<script type="text/javascript">
var so = new SWFObject("http://cdn0.esnips.com/escentral/images/widgets/flash/white_player_list.swf", "music", "301", "280", "8");
so.addVariable("autoPlay","yes");
so.addVariable("thePlayerURL","http://cdn0.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf");
so.addVariable("fileIds","");
so.addVariable("plURL","http://www.esnips.com//plxml/ba19667e-7fb9-45a6-905a-4445e142a4db/");
so.addVariable("cachePL","true");
so.write("flashcontent");
</script>
btw you should place this script tag below the title tag in between the head tags instead of in the body tags
<head>
<title>Test Page</title>
<script type="text/javascript" src="swfobject.js"></script>
</head>
nojo191
07-21-2007, 10:21 PM
Success! Due to Omnis's suggestion, and everyone else on Codingforums, my player now works. Thank you all for helping with (possibly) the longest thread in the flash section. The last thing I changed was adding the fileids variable! :thumbsup: I can't thank you all enough.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.