Results 1 to 2 of 2

Thread: controlling flash from a dhtml window

  1. #1
    Join Date
    Aug 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default controlling flash from a dhtml window

    1) Script Title: dhtml window widget (v 1.03)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) Describe problem:

    On my "base page" (the page where I put the code for the dhtml windows) I have a flash movie, and I would like to control that flash movie from the windows.

    So far for the control of flash movies I have been using a function in Dreamweaver as such:

    Code:
    <script type="text/javascript">
    <!--
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v4.0
      var obj=MM_findObj(objStr);
      if (obj && obj[1]) obj=obj[1];
      if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
    }
    //-->
    </script>
    and then call the function with following:

    Code:
    <input name="" type="button" value="GoTo" onclick="MM_controlShockwave('flashMovie','','GotoFrame','23')"  />
    However, how would I go about targeting the flashmovie on my "base page" from within a page in one of the dhtml windows.

    I have no idea where to begin.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm unfortunately Flash is basically foreign to me. Maybe someone with more Flash experience can help you out.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •