View Full Version : Swapping Flash Objects

05-22-2006, 02:06 PM
By using flash objects embedded into your web page, is there a method of swapping these objects when clicking on buttons with in the page itself?

The idea is to have a page load once, and by clicking on the buttons load other flash movies with out reloading the page. If you can do it with images with a mouse over script and it be done with flash objects?

05-23-2006, 07:02 AM
Who knows try doing it with DHTML. Once I remember I saw a similar thing which swapped sounds(embedded in flash) with javascript. But let me remember which it was .... umm.... DHTML ... yea http://dhtmlnirvana.com/index_back.html
Yep that's it contact the person called Eddie Traversa and may be you can find the answer??
Try it anyways.:p

05-23-2006, 07:04 AM
Well... not sure how, but javascript can basically rewrite the html....

name the embed tag...

Then refer to that in the javascript:

something like

embedname.src = "nexthing.swf"


this is a total shot in the dark, but with the right syntax and commands, it should work.

Just put that in a function.

<img onmouseover="function()">
And that's it. Assuming you're using an image mouseover.

the function can be used other ways as well, obviously.

05-23-2006, 09:19 AM
yea maybe it is possible as with images. document.imagename.src = 'image.ext'
try doing sth like document.objectname.src = 'objectname.ext'
May be it works, I have never tried it so I am not so sure about it.

05-24-2006, 01:12 AM
Thanks for you help everyone, i'll give it a try and let you know what happens..