Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why You Should Disable External Link Outs In Flash Games

Hello Everyone,
Many of you have flash games sitting across your websites and the majority having links leading out to other portals, many years ago this was acceptable it was the norm however now due to many portals disappearing these links are now externally linking to bad rouge malware and virus infected websites which damages your websites SEO, Revenue, Reputation with users.

Although some may have simply altered the embed code to allowscriptaccess to never this is still in some cases not enough, luckily there is a full detailed post regarding this here that will prove useful.

Example Code:
<div id="container_div">
<object width="800" height="530" type="application/x-shockwave-flash" id="my_swf" style="position:absolute;"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>
<div id="internal_div" style="z-index: 3; position: absolute; width: 800px; height: 530px;" onclick="return false;"></div>

Note the following:
  • Both the swf object and internal div are wrapped in a container div.
  • Both the swf object and internal div are set to absolute position.
  • Both the swf object and internal div are sized to 800×530 pixels.
  • The internal div has a higher z-index than the swf object so it gets placed “on top” of the swf object.
  • The swf object has the wmode parameter set to “transparent” which allows other html elements to sit “on top” of the swf movie. Otherwise an swf is by nature “on top” of every other html element.
You might also be able to accomplish this technique similarly by using a transparent swf movie instead of the internal div.
Optionally, you might also be able to prevent external navigation by handling the browser’s “onbeforeunload” event with Javascript, which fires just before the browser navigates to the new URL. By intercepting and cancelling this event, you should be able to prevent external navigation. Example here.

[Image: pwnful-banner.fw.png]

Forum Jump:

Users browsing this thread:
1 Guest(s)

Sonic Games Theme © iAndrew 2016