Heyall!
Hopefully this is a quick one.
I am trying to load multiple swf files in a div element on an HTML page. What I mean by this is I have a “gallery” type page where users can click on the work and see the results.
The div that displays the work is a sliding div that shows the selected work when a user clicks it and hides the work, returning to the “gallery” ready to select another piece.
Button 1: View Work
Button 2: Work 1
Button 3: Work 2
Button 1 will unload any work items currently loaded. Button 2 and Button 3 will load the selected piece into the div.
Any ideas?
I would load the multiple swfs into a container swf and then do the animation in actionscript.
That was one option but not really acceptable as I will eventually be building the page through ajax and MySQL.
I figured out a method:
<script language=“javascript”>
function loadFlash(file){
var so = new SWFObject(file, “myFlashFile”, “800”, “600”, “1”, “#ffffff”);
so.addParam(“wmode”, “transparent”);
so.write(“flashcontent”);
}
</script>
and then have a div with the id “flashcontent” and any ‘a’ element to have onClick=“javascript:loadFlash(’_swf/test_outter.swf’);”
This doesnt unload any flash but does load the new content.
Hope this helps someone.