This is something you will have to work out with spry (if that is still what you will use). Asking the question on a Spry user list would be a good place to start.
Looking through the spry API very quickly, you should be able to use something like the foreach element selector to modify your id's (foreach allows you to call a function. Your function could hold a counter and increment the number and re-write the dom id (Morceau1, Morceau2 etc) and then call embedSWF() with the unique id) http://labs.adobe.com/technologies/spry/articles/data_api/apis/element_selector.html <http://labs.adobe.com/technologies/spry/articles/data_api/apis/element_selector.html>Anyhow, all this is outside of the scope of this particular list, as it is not a SWFObject problem per se. You really just want to ensure that all your dom stuff is done 1st, THEN call your swfobject methods when the items are actually available. Aran On Wed, Sep 8, 2010 at 1:07 PM, Erik van Dyck <[email protected] > wrote: > Hi Aran, > > > > I understand, I think at least J, what you’re saying, yet don’t know how > to implement this. How to call the DOM id differently for every pass through > the loop? Should I copy the JS-code in the head section and just name each > occurrence of it differently? That seems so contrary to the concept of a > loop… > > > > This being the code in the <body>-block: > > <div id="UlrikeMediaSound"> > > <table> > > <tr > id="repeatRow"> > > > <td style="padding-bottom:.2em"><strong>{Compositeur_prenom} <span > class="smallcaps">{Compositeur_nom}</span>: <span class="u">{OEuvre}</span>: > <em>{Titre}</em></strong><br /> > > > enregistré {Enregistrement}<br /> > > > <div id="Morceau"> > > > <p>Pour écouter ce fragment, téléchargez <a href=" > http://get.adobe.com/fr/flashplayer/">la dernière version de > Flash.</a></p> > > > </div> > > > <a href="sound/{MP3}" rel="external"><span > style="vertical-align:top"> Téléchargez-moi</span></a><hr > /></td> > > </tr> > > </table> > > </div> > > And this being the one in the <head>-section: > > <script type="text/javascript"> > > var flashvars = { > > mp3: "Sound/{MP3}" > > }; > > var params = { > > wmode: "transparent" > > }; > > swfobject.embedSWF("scriptLibrary/dewplayer.swf", "Morceau", > "200", "20", "10","scriptLibrary/swfobject/expressInstall.swf", flashvars, > params); > > </script> > > > > How should I change it? > > > > Cordially. > > > > Erik > ------------------------------ > > *De :* [email protected] [mailto:[email protected]] *De > la part de* Aran Rhee > *Envoyé :* mardi 7 septembre 2010 18:18 > *À :* [email protected] > *Objet :* Re: [SWFObject] Conflit entre mootools et swfobject ? > > > > Sorry, I don;t speak French. I hope you understand English :) > > > > > > So when you are running your repeater, you need to ensure that you are > giving each player object a unique DOM id. They cannot all be called > "Morceau". > > > > When I run developer tools in IE, I can see that the objects are created, > but the flashvars are empty. > > > > > > The order in which things should happen on the page are: > > > > - run code to create all required dom nodes for mp3 players based onj your > XML structure > > - run swfobject embedSWF() calls for each required player and pass required > flashvars etc. (make a util function you can call passing dom id and mp3 > location?) > > > > > > Cheers, > > Aran > > > > > > 2010/9/7 EVD46 <[email protected]> > > Bonjour, > Sur la page http://www.ulrike-van-cotthem.com/Media.asp j'utilise le > dewplayer en combinaison avec swfobject, que j'appelle de dans une > boucle que je crée avec un spry. > En FF3 cela fonctionne à merveille, en IE le dewplayer me signale "no > mp3 file". > POURQUOI et surtout comment y remédier? > Merci d'avance. > Erik > > -- > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.851 / Virus Database: 271.1.1/3118 - Release Date: 09/06/10 > 20:34:00 > > -- > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > -- You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
