A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How do I swap flash movies in dreamweaver in place of swap image?

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    11

    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.

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    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.

  3. #3
    Junior Member
    Join Date
    Jan 2002
    Posts
    11
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center