Amazon mp3 widget by ASIN
I want to embed this Amazon mp3 widget into a page.
https://widgets.amazon.com/Amazon-MP3-Clips-Widget/
But the thing is, the page loads songs dynamically, s开发者_如何学运维o I'd like to give the widget a list of ASIN (Amazon Standard Identification Number) when I generate the page. The code that Amazon gives me to copy/paste doesn't (as far as I can tell) have any ASIN in it. Is it possible to load the widget by giving it a list of ASIN?
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_6211089e-a28e-4805-b63c-45fd4ca199d5" WIDTH="336px" HEIGHT="280px">
<PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fwidgetsamazon-20%2F8014%2F6211089e-a28e-4805-b63c-45fd4ca199d5&Operation=GetDisplayTemplate">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#FFFFFF">
<PARAM NAME="allowscriptaccess" VALUE="always">
<embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fwidgetsamazon-20%2F8014%2F6211089e-a28e-4805-b63c-45fd4ca199d5&Operation=GetDisplayTemplate" id="Player_6211089e-a28e-4805-b63c-45fd4ca199d5" quality="high" bgcolor="#ffffff" name="Player_6211089e-a28e-4805-b63c-45fd4ca199d5" allowscriptaccess="always" type="application/x-shockwave-flash" align="middle" height="280px" width="336px">
</embed>
</OBJECT>
<NOSCRIPT>
<A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fwidgetsamazon-20%2F8014%2F6211089e-a28e-4805-b63c-45fd4ca199d5&Operation=NoScript">
Amazon.com Widgets</A>
</NOSCRIPT>
To answer my own question, I found the following code. It allows any number of about 20 ASIN.
<script type="text/javascript"> var amzn_wdgt={widget:"MP3Clips"}; amzn_wdgt.tag=""; amzn_wdgt.title="my title"; amzn_wdgt.widgetType="ASINList"; amzn_wdgt.ASIN="B000XNXMG8,B001KPK6QC,B001KPK6QC,B002TU3JQQ" amzn_wdgt.width="250"; amzn_wdgt.height="250"; amzn_wdgt.shuffleTracks="True"; </script> <script type="text/javascript" src="http://wms.assoc-amazon.com/20070822/US/js/swfobject_1_5.js"> </script>
You can change the width and height as well, though it only works for certain combinations (336x280, 120x300, 160x300, 125x125, 120x90, 234x60). The default width and height is 250px by 250px.
精彩评论