So when you first do a replacement, your <div> is replaced with an <object>. You need to do some trickery to replace the same element again.
Have a read here: http://www.pipwerks.com/lab/swfobject/load-onclick/2.0/index.html (look at the "Using an 'onclick' event to replace a loaded SWF with another SWF" section) Cheers, Aran -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of FlashDev2008 Sent: Thursday, 16 October 2008 10:00 PM To: SWFObject Subject: Refresh Flash with Ajax Hello, I am using swfObject to write flash to a div which works as expected. I want to refresh that div, essentially reloading the flash again. I have an alert which pops up so I know the function which writes the flash is being called, but the flash never refreshes, here is the method that I call. function addRange() { //document.getElementById("directentrydropdown").style.visibility = 'hidden'; var randomnumber=Math.floor(Math.random()*999) var file ="range.swf?"+randomnumber; var flashvars = {}; flashvars.contentxml = "xml/content.xml"; flashvars.launchbuttonlabel = "Launch the Range Experience " + randomnumber; flashvars.directentrygroup = document.myform.dropdown.value; var params = {}; params.allowfullscreen = true; params.scale = "noscale" var attributes = {}; attributes.id = "template"; swfobject.embedSWF(file, "myAlternativeContent", "188", "105", "9.0.28.0", false, flashvars, params, attributes); } Does anyone have any idea what would stop the div from being overwritten again? Thanks Neil --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
