Welcome, Guest
  • Author Topic: JS “Play” function for flash movie  (Read 2802 times)

    Rumor

    • Server what's that
    • *
    • Posts: 17
      • View Profile
    JS “Play” function for flash movie
    « on: 04/25/06, 03:44 »
    Hi.
    Here is my issue:
    I have the following frameset (I quote it so that the “name” and “id” values can be viewed)

    <frameset rows="0,*" frameborder="NO" border="0" framespacing="0">
      <frame src="html/sound.htm" name="topFrame" id="topFrame" scrolling="NO" noresize />
      <frame src="html/index-gr.htm" name="mainFrame" id="mainFrame" />
    </frameset>


    The first frame (topFrame) includes the html document containing a flash movie (a sound loop).
    The other one (mainFrame) displays my pages that have a flash button to control (play) the flash movie of “topFrame”
    This is done by using a getURL function on the flash button…

    on(press){
       getURL('javascript:startFlash()')
    }


    …that calls the JavaScript function of the same html document containing the flash button:

    <script language="JavaScript" type="text/javascript">
    function startFlash() {
       parent.topFrame.soundmovie.Play();
    }
    </script>


    The problem is that it only works with internet explorer.
    Note that the “startFlash” function is called in all the other browsers I checked (as I tested it with an alert) but the flash movie (sound loop) can’t be handled in any one of those.
    Finally, note that I have tested it without a frameset as well but again only internet explorer plays the movie.

    I can’t think of any other -simple for me- way to play my movie in other browsers.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: JS “Play” function for flash movie
    « Reply #1 on: 04/26/06, 02:31 »
    Try using LocalConnection class

    Jorge

    Rumor

    • Server what's that
    • *
    • Posts: 17
      • View Profile
    Re: JS “Play” function for flash movie
    « Reply #2 on: 04/26/06, 07:42 »
    Very useful, thanks a lot.