Reputation: 41
When the embed is clicked on, I want it to redirect. For some reason, It's not possible.. I tried just adding href="" inside of the embed, but also didn't work.
<object>
<embed style="background: url(/web/css/transparent.png)" src="url.swf" type="application/x-shockwave-flash" wmode="transparent"/>
</object>
Upvotes: 0
Views: 36
Reputation: 223
You can use onmousedown
event to redirect to some url.
<!DOCTYPE html>
<html>
<body>
<div onmousedown="myFunction()">
<embed src="helloworld.swf" onclick="myFunction()">
</div>
<script>
function myFunction() {
window.open('url to open');
}
</script>
</body>
</html>
So when you click on the embed object, new url will be loaded.
Upvotes: 2