ie attachEvent issue...


hello,

 

the event added flash object (videoplayer) or container (player) responds expected in browsers except ie , chrome. trtied possibly think of , still can't work in ie @ least. event works in ie "onactivate".

 

--> tested ie8 compat view / ie7 standards

 

 

your appreciated,

 

niusaul

 

 

 

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
    <title>player testing...</title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
        body{
            margin:0;
            padding:0;
        }
        object{
            outline:none;
        }
        #container-player{
            float:left;
            width:100%;
            background-color:#eee;
            padding-top:15px;
        }
        #dim-bg{
            width:100%;
            height:100%;
            background-color:#000;
            opacity:0.5;
            filter:alpha(opacity=50);
            z-index:1;
            position:fixed;
            top:0;
            left:0;
            display:none;
        }
        #player{
            width:432px;
            height:315px;
            background-color:#ddd;
            margin:50px auto;
            position:relative;
            /*z-index:3;
            top:0;
            left:0;*/
        }
        #test{
            width:200px;
            height:200px;
            background-color:#ffcc00;
            z-index:4;
            position:absolute;
            top:30px;
            left:0px;
        }
        #content{
            background-color:#dd0000;
            z-index:3;
        }
    </style>
</head>
<body>
<div id="container-player">
    <div id="test">z-index 4</div>
    <div id="dim-bg">z-index 1</div>
    <div id="player">
        <!--[if ie]>
        <object id='videoplayer' data='fla/player.swf' width='100%' height='100%' type='application/x-shockwave-flash'>
            <param name='movie' value='fla/player.swf' />
            <param name='wmode' value='opaque' />
            <param name='allowfullscreen' value='true' />
            <param name='play' value='true' />
            <param name='menu' value='true' />
            <param name='quality' value='high' />
            <param name='flashvars' value=''/>
        </object>
        <![endif-->
        <!--[if !ie]><-->
        <embed
            id='videoplayer'
            name='videoplayer'
            src='fla/player.swf'
            wmode='opaque'
            allowfullscreen='true'
            play='true'
            mennu='true'
            quality='high'
            flashvars=''
            width='100%'
            height='100%'
            type='application/x-shockwave-flash'
            pluginspage='http://www.macromedia.com/go/getflashplayer'>
        </embed>
        <!--> <![endif]-->
        <div id="forclick"></div>
    </div>

    <script type="text/javascript">

        var theobj = document.getelementbyid("player");
        //var theobj = window.videoplayer || document.videoplayer;
       
        if(window.addeventlistener)
            theobj.addeventlistener("click", function(){alert("addeventlistener");}, false);
        else if(window.attachevent)
        {
            //theobj.attachevent("onactivate", function(){alert("attachevent - onactivate");return false;});
            theobj.attachevent("onclick", function(){alert("attachevent - onclick");return false;});
            theobj.attachevent("onmousedown", function(){alert("attachevent - onmousedown");return false;});
            theobj.attachevent("onmouseup", function(){alert("attachevent - onmouseup");return false;});
        }   
        else
            theobj.onclick = function(){alert("other");};
    </script>
</div>
<div id="content">lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis @ vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.

</div>

</body>

 

</html>

the issue resolved "onlosecapture" event (non-standard event m

icrosoft)

 

thx all,

n



More discussions in Using Flash Player


adobe

Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい