When I used an flv player for my website www.amvizone.com, the main problem I faced was the external embedding. So I provided the iframe embedddng method instead of embedded object like youtube. The problem was the embedded flash player only worked with the my domain (where the player.swf is placed). When I put the same embedded code with src points to http://www.amvizone.com/player.swf from another domain, the player did not work.

FLV Player

Recently My Friend Rahul (He is the master in flash and action scripts) gave me a solution for this. That is, you have to add cross-domain policy to your server to server the swf file to other domains.

When a Flash document attempts to access data from another domain, Flash Player automatically attempts to load a policy file from that domain. If the domain of the Flash document that is attempting to access the data is included in the policy file, the data is automatically accessible.

You have to create a file, crossdomain.xml and place in the root folder or any other folder where content is placed. The data in the crossdomain.xml file is shown below:

<?xml version="1.0"?><!-- http://www.foo.com/crossdomain.xml -->

<cross-domain-policy>

<allow-access-from domain="www.friendOfFoo.com" />

<allow-access-from domain="*.foo.com" />

<allow-access-from domain="105.216.0.40" />
</cross-domain-policy>

The above configuration allow any subdomains of foo.com or a particular ip 105.216.0.40 or www.friendOfFoo.com

If you need to provide access to all domains , you can use the following xml:

<?xml version="1.0"?>

<!-- http://www.foo.com/crossdomain.xml -->

<cross-domain-policy>

  <allow-access-from domain="*" />

</cross-domain-policy>

Courtesy: Adobe.com

And special thanks to Rahul for sharing the information

For details: click here

Regards

Sajith M.R

Tags: , , , , , , , ,

· · · ◊ ◊ ◊ · · ·

Cross Browser Cookies

04 Apr 2008

A normal html / web developer must be femilered with cookies and sessions. In normal case the cookie set by one browser cannot be access through another browser. Each browsers have its own space to store the cookie value. Thats why when you login your email account from one browser, if you go another browser , non of your preference will be available. This is the case of normal cookies.

HTTP cookies, or more commonly referred to as Web cookies, tracking cookies or just cookies, are parcels of text sent by a server to a web browser and then sent back unchanged by the browser each time it accesses that server. HTTP cookies are used for authenticating, tracking, and maintaining specific information about users, such as site preferences or the contents of their electronic shopping carts. The term “cookie” is derived from “magic cookie,” a well-known concept in UNIX computing which inspired both the idea and the name of HTTP cookies – Wikipedia

But what will do if you want to set a cookie which is to be accessed from different browsers , ie mozilla, safari, opera ,internet explorer share same cookie ??

Come back to the case of shock wave flie (swf ) or flash files. They also have privillages to set cookies in browser. Like html, it also have all the features in client side. Consider the cookie setting mechanism of a flash file. It is not on different places for different browsers. It is on a common file on your computer and no matter what the browser.

Think this thing also javascript can access flash object via normal javascript functions if swf provides provision for that. Then when rethink the whole stuff, if you set a cookie through flash , you can access it from any browser.

Cross browser cookies

See this post: http://www.nuff-respec.com/technology/cross-browser-cookies-with-flash

In this post Mr. Daniel Bulli explains it detaily. He is the big man here.

also see this link: http://www.ts0.com/crosscookie/example.html

A live example for cross browser cookie. Both of the sites provide source code of their implementation.

I also uploaded the source code as a backup. Download it from here: OpenID Integration PHP

Tags: , , ,

· · · ◊ ◊ ◊ · · ·

وظائف 2011 تحويل العملات برامج برنامج تسريع التحميل برنامج الفلاش برنامج محول الصوتيات عربي hotel 2011 زيادة رواتب العساكر 1431