Disable autoplay or switch divs?


if in wrong section please forgive noobishness , feel free move needs be.

 

i working on website , client has asked me include swf animation on new website. not made me, nor have .fla file.

while easy enough display file, problem has asked me disable autoplaying.

 

i wondering if @ possible editing javascript file? wondering if possible call "playagain" div first, leaving "webvideo" div hidden untill button clicked.

 

please tell me if of possible. not know javascript, @ loss. thank you.

here javascript calling in html page..

 

if (typeof video == 'undefined') {

          video = new object();

}

video.params = {

          width:280,

          height:360,

          left:"6px",

          right:"auto",

          autoplay:"false",

          top:"auto",

          bottom:"0px",

          vidlink:"",

          openin:"_blank",

          flv:"video",

          xmlpath:"data1.xml"

};

video.drawvideo= function(){

          var markup = '';

          markup += '<style type="text/css">';

          markup += '#webvideo {position:fixed;width:'+video.params.width+'px;height:'+video.params.height+'px;left:'+vi deo.params.left+';right:'+video.params.right+';top:'+video.params.top+';bottom:'+video.par ams.bottom+';z-index:500;}';

          markup += '#playagain {position:fixed;left:1px;right:auto;top:auto;bottom:2px;z-index:2;visibility:hidden}';

          markup += '</style>';

          markup += '<div id="webvideo">';

          markup += '  <object id="objvideo" style="outline:none;" type="application/x-shockwave-flash" width="280" height="360" wmode="transparent" data="videopresenter.swf">';

          markup += '    <param name="movie" value="videopresenter.swf" />';

          markup += '    <param name="quality" value="high" />';

          markup += '    <param name="flashvars" value="vurl='+video.params.flv+'.flv&amp;vwidth='+video.params.width+'&amp;vheight='+vide o.params.height+'&amp;vlink='+video.params.vidlink+'&amp;openin='+video.params.openin+'&am p;xmlpath='+video.params.xmlpath+'" />';

          markup += '    <param name="wmode" value="transparent" />';

          markup += '    <param name="allowscriptaccess" value="always" />';

          markup += '    <param name="swfversion" value="9.0.45.0" />';

          markup += '  </object>';

          markup += '</div>';

          markup += '<div id="playagain">';

          markup += '<a href="javascript:showdiv()"><img src="videopresenter/images/playbtn.gif" width="82" height="32" border="0"/></a>';

          markup += '</div>';

          document.write(markup);

}

function thismovie(moviename) {

    if (navigator.appname.indexof("microsoft") != -1) {

        return window[moviename]

    }

    else {

        return document[moviename]

    }

}

function closediv(){

          document.getelementbyid('webvideo').style.visibility = 'hidden';

}

function showplayagainbutton(){

          document.getelementbyid('webvideo').style.zindex='-100';

          document.getelementbyid('playagain').style.visibility = 'visible';

}

function showdiv(){

          thismovie("objvideo").showplayer();

          document.getelementbyid('webvideo').style.zindex='1';

          document.getelementbyid('webvideo').style.visibility = 'visible';

          document.getelementbyid('playagain').style.visibility = 'hidden';

}

function lightsoff () {

            $("div#mainbody").animate({opacity: 0.3},500);

            return false;

}

function lightson() {

               $("div#mainbody").animate({opacity: 100},500);

               return false;

}

video.drawvideo();

try:

 

 

 

if (typeof video == 'undefined') {

          video = new object();

}

video.params = {

          width:280,

          height:360,

          left:"6px",

          right:"auto",

          autoplay:"false",

          top:"auto",

          bottom:"0px",

          vidlink:"",

          openin:"_blank",

          flv:"video",

          xmlpath:"data1.xml"

};

video.drawvideo= function(){

          var markup = '';

          markup += '<style type="text/css">';

          markup += '#webvideo {position:fixed;width:'+video.params.width+'px;height:'+video.params. height+'px;left:'+video.params.left+';right:'+video.params.right+';top :'+video.params.top+';bottom:'+video.params.bottom+';z-index:500;}';

          markup += '#playagain {position:fixed;left:1px;right:auto;top:auto;bottom:2px;z-index:2;vis ibility:hidden}';

          markup += '</style>';

          markup += '<div id="webvideo">';

          markup += '  <object id="objvideo" style="outline:none;" type="application/x-shockwave-flash" width="280" height="360" wmode="transparent" data="videopresenter.swf">';

          markup += '    <param name="movie" value="videopresenter.swf" />';

          markup += '    <param name="quality" value="high" />';

          markup += '    <param name="flashvars" value="vurl='+video.params.flv+'.flv&amp;vwidth='+video.params.width+ '&amp;vheight='+video.params.height+'&amp;vlink='+video.params.vidlink +'&amp;openin='+video.params.openin+'&amp;xmlpath='+video.params.xmlpa th+'" />';

          markup += '    <param name="wmode" value="transparent" />';

          markup += '    <param name="allowscriptaccess" value="always" />';

          markup += '    <param name="swfversion" value="9.0.45.0" />';

          markup += '    <param name="play" value="false" />';

          markup += '  </object>';

          markup += '</div>';

          markup += '<div id="playagain">';

          markup += '<a href="javascript:showdiv()"><img src="videopresenter/images/playbtn.gif" width="82" height="32" border="0"/></a>';

          markup += '</div>';

          document.write(markup);

}

function thismovie(moviename) {

    if (navigator.appname.indexof("microsoft") != -1) {

        return window[moviename]

    }

    else {

        return document[moviename]

    }

}

function closediv(){

          document.getelementbyid('webvideo').style.visibility = 'hidden';

}

function showplayagainbutton(){

          document.getelementbyid('webvideo').style.zindex='-100';

          document.getelementbyid('playagain').style.visibility = 'visible';

}

function showdiv(){

          thismovie("objvideo").showplayer();

          document.getelementbyid('webvideo').style.zindex='1';

          document.getelementbyid('webvideo').style.visibility = 'visible';

          document.getelementbyid('playagain').style.visibility = 'hidden';

}

function lightsoff () {

            $("div#mainbody").animate({opacity: 0.3},500);

            return false;

}

function lightson() {

               $("div#mainbody").animate({opacity: 100},500);

               return false;

}

video.drawvideo();



More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support