|
-
How do I swap flash movies in dreamweaver in place of swap image?
In Dreamweaver you can swap images on a mouseover event using behaviors.
Instead of swapping images, I want to swap flash movies.
Example:
Build a table
place and play a flash movie in a cell
on a mouseover, replace that flash movie with another flash movie.
Can it be done? It apparently can't be done directly - Dreamweaver won't see flash files as swappable. Perhaps there's a workaround.
-
Senior Member
You could try this,
make sure your object tag has an id attribute and the embed tag for the movie has a name attribute (the same as the id for the object tag)
then in between the head tags of the page add this function,
Code:
<script type="text/javascript">
function flipMovie(id, file) {
var movie = window.document[id];
movie.LoadMovie(0, file);
}
</script>
then on a link,
<a href="javascript:;" onmouseover="flipMovie('movie_id', 'over.swf');" onmouseout="flipMovie('movie_id', 'out.swf');">flip!</a>
where movie_id is the name/id used in the object and embed tags for the movie you want to flip on rollover.
-
Fantastic! Thanks! I'll give it a try.
(P.S. - hint to macromedia development team: this would be a nifty thing to add to flash/dreamweaver.)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|