So Philip's (pipwerks) example is a good way to achieve swapping from one
swf to a different one, as you need to replace the original swf <object> tag
with a new <div> before you can invoke a new swfobject replacement.

http://pipwerks.com/lab/swfobject/load-onclick/2.0/index.html (the section
titled Using an 'onclick' event to replace a loaded SWF with another SWF)


There is a working example here:
http://pipwerks.com/lab/swfobject/load-onclick/2.0/onclick2.html


If you are not able to modify this complete working example to suit a your
needs, then I am unsure what someone on the list can do to help. The 3
functions used and comments in the code are pretty self-explanatory. You
don't need Ajax if all you are doing is swapping between 3 files as you can
just keep variables on your page to store the 3 locations (you don't need to
send a request to a server to get data back into the page which is what Ajax
does).

In fact if you are just swapping xml files, then this could all be achieved
with Flash and ExternalInterface to just pass in the new XML file location
to Flash. You would need to be comfortable coding this in ActionScript
however.

There is obviously a learning curve / expected knowledge level when dealing
with js / Flash development, and if this is all a bit over your head, then
the easiest way would be for you just to have 3 HTML page you swap based on
user click.


Aran





-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of theX
Sent: Thursday, 27 November 2008 11:10 PM
To: SWFObject
Subject: load swf object emeded flash with ajax


Hi,

i have a site of mine which is using a slideshow banner. below the the
banner i have links for different categories which when  clicked
should change the flash slideshow without refreshing the page.

I have customized a slideshow found on the net
http://www.emanueleferonato.com/2007/05/13/xml-driven-flash-slideshow-improv
ed/"]http://www.emanueleferonato.com/2007/05/13/xml-driven-flash-slideshow-i
mproved/whereby
the xml data for the slideshow is passed by a variable.

Now the question is how to replace the initial flash embedded with
swfobject with another one along with a different xml value based on
the category selected. I have so far created 3 html files where i have
defined 3 separate xml values.

Can Anyone help me or give tips to replace the swfobject embedded swf
where a variable has been defined with another swf with a different
variable value without refreshing the page. I know this can be
achieved via ajax but cant get it to work. i had come across some
working example here but i couldnt get it to work.
http://pipwerks.com/lab/swfobject/"]http://pipwerks.com/lab/swfobject/

you can find the test file from here
http://www.yousendit.com/download/TTZsTXRRNDRmVFpFQlE9PQ
. All help is appreciated. Thanks





--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to