Onmouseover + display flash or java in a table column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Father_of_HereIsThePorn
    Confirmed User
    • Jun 2003
    • 110

    #1

    Onmouseover + display flash or java in a table column

    I know this might not be the best forum to post this thread, but I need help... and where can you find good programmers if not in the adult biz

    Anyway, I´m trying to design my site so that if I move the mousepointer over different images, two things will happen. Check out www dot doubleanalmovies dot com and you´ll hopefully understand my issue. (Just below the welcome-text)

    1. The image changes, that´s a piece of cake, so no problem with that.
    2. At the same time I want a certain javascript of flashscript to load in a table column which I´ve given an ID <h1 id="TitleText"></h1> (don´t know if this is the right way to do it though...)

    I´ve experimented a bit with this code, but so far with no success...

    The javascript looks like this:
    -------------------------------------------------------------------------------
    <script language="JavaScript">
    <!--
    // PRELOADING IMAGES
    if (document.images) {
    img0_on =new Image(); img0_on.src ="/images/image2.gif";
    img0_off=new Image(); img0_off.src="/images/image1.gif";

    img1_on =new Image(); img0_on.src "/images/anotherimage2.gif";
    img1_off=new Image(); img0_off.src="/images/anotherimage1.gif";
    }

    function movr(k) {
    if (document.images)
    eval('document.img'+k+'.src=img'+k+'_on.src');
    }

    function mout(k) {
    if (document.images)
    eval('document.img'+k+'.src=img'+k+'_off.src');
    }
    -------------------------------------------------------------------------------

    And the code in the HTML looks like this:
    -------------------------------------------------------------------------------
    <a href="#any_URL" onMouseOver="movr(0);java script:document.getElementById('TitleText').innerH TML='Something will happen here';return true;" onMouseOut="mout(0);java script:document.getElementById('TitleText').innerH TML='This is the main info I want to display';return true;" onClick="return false;">
    <img name=img0 width=153 height=18 border=0 alt="This image changes when you point at it!" src="/images/image1.gif" width="153" height="18" border="0" alt=""></a>
    -------------------------------------------------------------------------------

    This script works if I only want to display plain text, but how am I suppose to do if I want to display for example a news scroller on a flash script??

    Any help is appreciated!


    PS. I tried to put this code:
    -------------------------------------------------------------------------------
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='.../swflash.cab#version=7,0,0,0' width='400' height='160'>

    <param name='movie' value='vevscroll.swf?NewsFile=webnews472343.inf&dd d=1'>
    <param name='quality' value='high'>
    <param name='scale' value='noscale'>
    <param name='salign' value='lt'>
    <param name='bgcolor' value='#ffffff'>
    <embed src='vevscroll.swf?NewsFile=webnews472343.inf&ddd= 1' quality='high' scale='noscale' salign='lt' bgcolor='#ffffff' width='400' height='160' type='application/x-shockwave-flash' pluginspage='.../getflashplayer'>
    </object>
    -------------------------------------------------------------------------------

    within ...innerHTML='Something will happen here'...

    But it obviously don´t work...
  • Bird
    Confirmed User
    • Jan 2005
    • 4365

    #2
    I got that give me a sec.....
    ICQ:268731675

    Comment

    • Bird
      Confirmed User
      • Jan 2005
      • 4365

      #3
      $htmltext2 .= "<object classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" type=\"application/x-oleobject\" width=\"300\" height=\"210\">"
      . "<param name=\"URL\" value=".$pgitemfilenameuserpath.">"
      ."<param name=\"ShowControls\" value=\"1\">"
      ."<param name=\"autoStart\" value=\"0\">"
      ."<embed src=".$pgitemfilenameuserpath." width=\"300\" height=\"210\" autoStart=\"0\" type=\"application/x-mplayer2\"/></embed>"
      ."</object>";
      ICQ:268731675

      Comment

      • Bird
        Confirmed User
        • Jan 2005
        • 4365

        #4
        Also you need to H1 to DIV
        change <h1 id="TitleText"></h1>

        to

        <div id="IDNAME"></div>
        ICQ:268731675

        Comment

        • Father_of_HereIsThePorn
          Confirmed User
          • Jun 2003
          • 110

          #5
          Thanks a lot man! I´ll try to get it working! Hope you don´t mind if I´ll come back with questions...

          Comment

          • Father_of_HereIsThePorn
            Confirmed User
            • Jun 2003
            • 110

            #6
            Btw, do you know a site using this kind of onmouseover function? Would be nice to see whole code source...

            Comment

            • Nookster
              Confirmed IT Professional
              • Nov 2005
              • 3744

              #7
              What you should be using is Flex. Already has pre-built stuff for simple things like that.
              The Best Affiliate Software, Ever.

              Comment

              Working...