'How to auto click div over flash object with delay

I hope to be clear :)

I'm looking for a way to click automatic a flash object on page load after about 5 seconds.

I have try to put a blank div over the flash, when i click on the div it click also the flash object this is good but I want this do automatic with no user interaction just done by JavaScript on page load this is my code =>

 <!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
<title>
Newbie at work
</title>

<script>
$("#pipo").trigger("click");

 </script>
</head>
<body>

<div id="pipo">
<object width="280" height="280">
<param name="movie" value="http://www.newbies.com/media/swf/player/bobo.swf"></param>
<param name="allowFullScreen" value="true"></param>
<param name="wmode" value="opaque"></param>
<param name="allowscriptaccess" value="always">
<embed src="http://www.newbies.com/media/swf/player/bobo.swf" 
width="280" height="280" 
type="application/x-shockwave-flash" 
wmode="opaque" 
allowscriptaccess="always" 
allowfullscreen="true" 
movie="http://www.newbies.com/media/swf/player/bobo.swf" >
</embed></object>
</div>
</body>
 </html> 


Solution 1:[1]

If i correctly understand your question you need a time out

$(function(){
    setTimeout(
        function(){
            $("#pipo").trigger("click");
            //optional
            $("#pipo").click();
        }
    ,5000);
});

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1