If you are wanting to swap flash movies within the same dic, yuou can check out Philip's tutorial on the subject:
http://pipwerks.com/lab/swfobject/load-onclick/2.0/index.html (section "Using an 'onclick' event to replace a loaded SWF with another SWF") Cheers, Aran On Wed, Aug 12, 2009 at 9:32 PM, Vincent Polite < [email protected]> wrote: > SWFObject is a javascript object that allows people to embed .swf files in > their web pages. Among other things, there is a method called .embedSWF > that takes arguments and puts a specific .swf file that you specify, > swapping it for a designated div. There's nothing stopping you from calling > that function more than once. So depending on what you are using to trigger > the action, it would be code on the order of: > > if (action1) { > swfObject.embedSWF(...) > } else { > swfObject.embedSWF(...) > } > > I would just be sure you are including the right version of the > swfObject.js script (version 2.x) and that should do the trick. However, > the embed method depending on how you do it may reload the flash movie each > time (not cached), which might be laggy and undesirable. > > If I were doing something like this, I would define 2 divs in your HTML > page, one with an id="version1" and another with id="version2" > If I needed any of these divs on page, I would define my style sheet to > show it where it needed to be shown. If one or both of the divs need to be > hidden, then I would define the style on that div so that the x and y > coordinates are off screen (like using huge negative numbers). > > Then you write some script that would "move" the div onto the visible part > of the page where you want it. You can simulate a Flash swap that way. > > A lot depends on what you're trying to do. Using the method I described > works perfectly fine for 2 flash movies, but it might not work so well if > you had say 30... > > Hope this points you in the right direction. If you do some google > searching, there was a post a day or so ago that discussed swapping a Flash > movie using the technique I described. > > Vincent > On Wed, Aug 12, 2009 at 4:20 AM, jim holmes <[email protected]>wrote: > >> >> This is all I want to do - it seems ( like a lot of things ) a >> relatively simple task, but 2 hours later I'm no further forward. One >> site recommended swfobject to do this, but I can find no reference to >> doing this anyway on this site? >> Am I looking to do something that can't be done? >> >> cheers >> Jim >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
