Category Archives: Flash Builder 4
Flash Builder 4 Development
Hijacking, Bypassing, Defeating and Beating the Same Origin Policy
The same origin policy was created as a permission scheme for communication of websites on same/different servers using browser side languages, like Javascript.
You might have ran into a problem trying to access properties of an Iframe of an external server, for example getting an element by point x & y, which I was trying to achieve when working on the flash click tracker (link).
I then had to create an entirely new script, but still using virtually the same flash object and a PHP proxy that will allow me to control the iframe object to my needs. In my case, it will allow me to track the link click and get the actual link for processing (in case of advertisement, visiting the link).
This is the basic idea I had:
You can view an actual demo here (make sure your ad blocker is off) and if it doesn’t work refresh.
Demo
[wpdm_file id=8]
Flash Link Tracker Using Javascript and Jquery
The flash object then calls back a javascript function, also customizable, when a click event occurs on that object.
The only drawback is that the user must “double click” on the flash object. Since the first click is when the flash object is hidden.
[wpdm_file id=10]
Flash Link Hider
You can view the flash object by clicking here.
The link contains sample implementation in PHP and a working demo to see how it works.