Groups | Blog | Home
all groups > flash (macromedia) > november 2003 >

flash (macromedia) : Switching a Flash movies src with Javascript - possible?


nothofagus
11/5/2003 11:01:53 PM
I'm looking to switch the src of a Flash movie embedded in a webpage using Javascript and something akin to the method used to switch image objects (document.imageName.src = "myImage.gif") - which doesn't work obviously. Is this possible or do I have rocks in my head.

Any suggestions will be greatly appreciated.

Cheers,

Terry...

Dr Terry Judd
Lecturer in Educational Technology (Design)
Biomedical Multimedia Unit
The University of Melbourne
urami_
11/6/2003 8:58:58 AM

[quoted text, click to view]

It is pretty much possible and in fact there is even build in Template.

In your flash movie go to file - Publish Setting - FORMATS
Check the GIF/JPG box , in order to use this template we need to check it
otherwise it might export and prompt error.
Now go to HTML tab in the Publish setting and choose from TEMPLATE drop down menu
Detect For Flash 6 .

When you hit the publish button the movie will export for your main timeline as gif/jpg ,
swf and HTML with all the code .

You can later replace that gif or JPG with your own , as long as you make the
image same name and size as the one define in your html code of that published
nothofagus
11/6/2003 9:52:04 AM
Thanks but I'm actually looking to replace the existing swf with another swf not a bitmap image. I'm particularly looking for a solution that will work on either IE 5+ or Safari on the Mac (I have a PC solution) but the document.getElementById("someFlashMovie").setAttribute("src", "someOtherFlashMovie.swf") method doesn't work.

Cheers,

Terry...

[quoted text, click to view]

It is pretty much possible and in fact there is even build in Template.

In your flash movie go to file - Publish Setting - FORMATS
Check the GIF/JPG box , in order to use this template we need to check it
otherwise it might export and prompt error.
Now go to HTML tab in the Publish setting and choose from TEMPLATE drop down menu
Detect For Flash 6 .

When you hit the publish button the movie will export for your main timeline as gif/jpg ,
swf and HTML with all the code .

You can later replace that gif or JPG with your own , as long as you make the
image same name and size as the one define in your html code of that published
document.

Dr Terry Judd
Lecturer in Educational Technology (Design)
Biomedical Multimedia Unit
The University of Melbourne
AddThis Social Bookmark Button