<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Programming Ideas, Logics, Tips and Tricks &#187; flash</title>
	<atom:link href="http://www.sajithmr.me/tag/flash/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sajithmr.me</link>
	<description></description>
	<lastBuildDate>Sat, 07 Apr 2012 16:30:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Audio recording using Flash</title>
		<link>http://www.sajithmr.me/audio-recording-using-flash</link>
		<comments>http://www.sajithmr.me/audio-recording-using-flash#comments</comments>
		<pubDate>Fri, 08 Jul 2011 10:46:19 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[media server]]></category>
		<category><![CDATA[recording]]></category>
		<category><![CDATA[red5]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/audio-recording-using-flash/</guid>
		<description><![CDATA[Audio recording using Flash ====================== To Record voice from web we need the following thing: 1) A flash media server (eg: Adobe Media Server [paid] or Red 5 [free]) 2) Java6 3) Webserver (eg, Apache, PHP) 4) A flash client app to record voice The one I used ========= We used Red 5 Server, because [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both;"><strong>Audio recording using Flash</strong><br />
======================</p>
<p style="clear: both;">To Record voice from web we need the following thing:</p>
<p style="clear: both;">1) A flash media server (eg: Adobe Media Server [paid] or Red 5 [free])</p>
<p style="clear: both;">2) Java6</p>
<p style="clear: both;">3) Webserver (eg, Apache, PHP)</p>
<p style="clear: both;">4) A flash client app to record voice</p>
<p style="clear: both;"><strong>The one I used</strong><br />
=========</p>
<p style="clear: both;">We used Red 5 Server, because it is FREE and Open Source</p>
<p style="clear: both;">We can proceed with our Apache + PHP</p>
<p style="clear: both;">Flash Recorder APP from AVChat (They have Free Trial recorder for 30 days and the Full version costs around £50)</p>
<p style="clear: both;"><strong>Installation</strong><br />
=======</p>
<p style="clear: both;">Install Java 6 (find the correct build based on 64 bit or 32 bit processor)</p>
<p style="clear: both;">install RED 5 (Download from http://code.google.com/p/red5/)</p>
<p style="clear: both;">Run RED 5 and test the installation</p>
<p style="clear: both;">Open a browser and type: http://127.0.0.1:5080/</p>
<p style="clear: both;">If the installation is success, you can see the RED5 page</p>
<p style="clear: both;">Try to install some demo app and try those demos</p>
<p style="clear: both;">You need a Browser with Flash support to test the demos (Allow the security options)</p>
<p style="clear: both;"><strong>Voice Recorder Client App</strong><br />
=================<br />
You can many FREE recording app over internet. Even you can get the Action Script for Voice recording and you can create your-own Flash recorder if you know Flash</p>
<p style="clear: both;">A better voice recorder app can be found at http://flvar.com/ which has PHP and ASP support where you can save/manipulate the recorded file</p>
<p style="clear: both;"><strong>The AVChat App</strong><br />
===========</p>
<p style="clear: both;">Download the chat app from the site http://flvar.com/</p>
<p style="clear: both;">There are two sets of folders, on for red5 and one for web server.</p>
<p style="clear: both;">Put the red5 projects in your webapps folder of RED5 server root</p>
<p style="clear: both;">When you download the app, you&#8217;ll get a license key. Enter this key to the property file inside the red5 server app.</p>
<p style="clear: both;">Put the web server folder in your apache web root</p>
<p style="clear: both;">Open avc_settings.php and update the path of RED5 with your RED5 server path (see the example in the document)</p>
<p style="clear: both;">Try accessing this project with your web browser, if you can see the flash player , it means your web app works fine</p>
<p style="clear: both;">Try start recording, and if you can record, which means your RED5 server configuration is fine</p>
<p style="clear: both;">Stop recording and click &#8220;Save&#8221;</p>
<p style="clear: both;">Check for the recorded flv file in the RED5 stream folder.</p>
<p style="clear: both;">This &#8220;Save&#8221; action trigger save_audio_to_db.php where we get details of the recorded stream and we can use PHP to manipulate that.</p>
<p style="clear: both;">For example, to move the flv file into webserver root, or use FFMPEG to convert the FLV format to WAV or MP3 etc</p>
<p style="clear: both;">Enjoy Voice Recording <img src='http://www.sajithmr.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="clear: both;">&#8211; Sajith</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/audio-recording-using-flash/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>JBar &#8211; Jquery Bar</title>
		<link>http://www.sajithmr.me/jbar-jquery-bar</link>
		<comments>http://www.sajithmr.me/jbar-jquery-bar#comments</comments>
		<pubDate>Sun, 27 Dec 2009 11:47:33 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webworld]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[jbar]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=545</guid>
		<description><![CDATA[Flash messages or notification messages are very essential part of every update/edit or delete operations. We either use ajax update messages like &#8220;You account has been updated&#8221; or &#8220;Your photo has been successfully deleted&#8221; Here, a new plugin of jQuery can be used to display the flash messages like twitter. (see twitter&#8217;s settings page) I [...]]]></description>
			<content:encoded><![CDATA[<p>Flash messages or notification messages are very essential part of every update/edit or delete operations. We either use ajax update messages like &#8220;You account has been updated&#8221; or &#8220;Your photo has been successfully deleted&#8221;</p>
<p>Here, a new plugin of jQuery can be used to display the flash messages like twitter. (see twitter&#8217;s settings page)</p>
<p>I added some more functions to this plugin to display the notification in different context, say information, warning or error message. The function show_flash(&#8216;message here&#8217;); can be used for this purpose. Second parameter is the type of message. For example, show_flash(&#8216;Error in deleting file&#8217;, &#8216;error&#8217;) OR  show_flash(&#8216;Email address entered is invalid&#8217;, &#8216;warning&#8217;)</p>
<p>If you use sessions to save flash message , for example in codeigniter $this-&gt;session-&gt;set_flashdata(&#8216;message&#8217;,'hello&#8217;); you can use this plugin to display them by adding a php code in the footer  (or header) of every page</p>
<p>&lt;?php if($this-&gt;session-&gt;flashdata(&#8216;message&#8217;) != &#8221; )  : ?&gt;</p>
<p>&lt;script&gt;show_flash(&#8216;&lt;?= $this-&gt;session-&gt;flashdata(&#8216;message&#8217;) ?&gt;&#8217;)&lt;/script&gt;</p>
<p>&lt;?php endif; ?&gt;</p>
<p>Here you can download the full source code:  <a href="http://www.sajithmr.me/downloads/jbar.zip">http://www.sajithmr.me/downloads/jbar.zip</a></p>
<p><img class="alignnone size-large wp-image-566" title="Screen shot 2009-12-27 at 11.30.12" src="http://www.sajithmr.me/wp-content/uploads/2009/12/Screen-shot-2009-12-27-at-11.30.12-1024x182.png" alt="Screen shot 2009-12-27 at 11.30.12" width="717" height="127" /></p>
<p>Thanks</p>
<p>Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/jbar-jquery-bar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Gmail Video Chat Works ?</title>
		<link>http://www.sajithmr.me/how-gmail-video-chat-works</link>
		<comments>http://www.sajithmr.me/how-gmail-video-chat-works#comments</comments>
		<pubDate>Tue, 18 Nov 2008 10:16:29 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[webworld]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[behind]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[gear]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[rtp]]></category>
		<category><![CDATA[toolbar]]></category>
		<category><![CDATA[udp]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/?p=368</guid>
		<description><![CDATA[Recently Gmail Introduced Video Chat. For a platform, to support the video chat you need to install the flash activex plugin. You can get the plugin from http://mail.google.com/videochat But when you click on Install voice and video chat button, Some of you see the page which shows &#8220;The installer should complete in seconds.   If you [...]]]></description>
			<content:encoded><![CDATA[<p>Recently Gmail Introduced Video Chat. For a platform, to support the video chat you need to install the flash activex plugin.</p>
<p>You can get the plugin from http://mail.google.com/videochat</p>
<p>But when you click on Install voice and video chat button, Some of you see the page which shows</p>
<p><strong><em>&#8220;The installer should complete in seconds.</em></strong></p>
<p><em> </em></p>
<p> </p>
<p><strong><em>If you are having trouble with the download, click here. &#8220; </em></strong></p>
<p>But some other see a auto installer page which downloads the Setup.exe file and automatically start installation and prompts you to restart the browser.</p>
<p><a href="http://www.sajithmr.com/wp-content/uploads/2008/11/downloading-the-chat.jpg"><img class="alignnone size-full wp-image-369" title="downloading-the-chat" src="http://www.sajithmr.com/wp-content/uploads/2008/11/downloading-the-chat.jpg" alt="" width="500" height="346" /></a></p>
<p>Who did this installation without any security problem or violation and we saw a different window which shows the progress bar of the installation. This happens only when , if you have<strong> google tool bar</strong> installed on your browser , or <strong>google desktop</strong>, or<strong> google gears</strong>. For those browsers if the above three is not present, the previous message gets result , and which provide the direct link of the GoogleVoiceAndVideoSetup.exe</p>
<p>It is<a href="http://dl.google.com/googletalk/googletalkplugin/GoogleVoiceAndVideoSetup.exe" target="_blank"> http://dl.google.com/googletalk/googletalkplugin/GoogleVoiceAndVideoSetup.exe</a></p>
<p>My Chrome browser does not support automatic installation. Because it is a new guest for my OS and the google additional plugin installation happend before its arrival. So Only Download and manual installation works in that case.</p>
<p> </p>
<p>Then what the script exectued behind is </p>
<p> </p>
<p class="MsoNormal"><span><strong><span style="color: #ff6600;">window.google.update.oneclick.install (install via click) </span></strong></span></p>
<p class="MsoNormal">and </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span><strong><span style="color: #ff6600;">location.href =</span></strong><span><strong><span style="color: #ff6600;">  </span></strong></span><strong><span style="color: #ff6600;">http://dl.google.com/googletalk/googletalkplugin/GoogleVoiceAndVideoSetup.exe</span></strong> (install manually )</span></p>
<p class="MsoNormal">Note the first bit of script window.google , A new object for google, which is created as the result of any one of the above mentioned google services. My Chrome Browser (Since he is a new member) does not know about the window.google (he knows the default methods like window.location, window.document)</p>
<p class="MsoNormal">Thats allabout the installation part. </p>
<p class="MsoNormal">Now About the Video Chat. Obviously it is a flash based video chat mechanism , but the difference is it uses rtcp and udp protocol for video /audio chatting. Did you check the speed of your video chat ? Amaze  rite ?</p>
<p> </p>
<p> </p>
<p>Then lets check about the video chat request.</p>
<p>When you request someone for a video chat, google ajax posts the following data</p>
<p> </p>
<p class="MsoNormal"><span><span style="color: #3366ff;">req4_jid</span><span><span style="color: #3366ff;"> </span></span><span style="color: #3366ff;">c2143377409</span><span style="color: #3366ff;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #3366ff;">req4_json</span><span><span style="color: #3366ff;">            </span></span><span style="color: #3366ff;">["jc","xyz@gmail.com","c2143377409",[["192.168.1.100","3801","video_rtp","dgE9SG8VMVdQFrYo","gyB0pRw5dkoEtq21","1","udp","0","local","0"]]]</span><span style="color: #3366ff;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #3366ff;">req4_type</span><span><span style="color: #3366ff;">          </span></span><span style="color: #3366ff;">j</span><span style="color: #3366ff;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #3366ff;">req5_jid</span><span><span style="color: #3366ff;"> </span></span><span style="color: #3366ff;">c2143377409</span><span style="color: #3366ff;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #3366ff;">req5_json</span><span><span style="color: #3366ff;">            </span></span><span style="color: #3366ff;">["jc","xyz@gmail.com","c2143377409",[["116.68.66.85","3784","rtcp","iqV9/3HhhqkjQ4kp","wMSi7BsiOVNtnbJR","0.9","udp","0","stun","0"]]]</span><span style="color: #3366ff;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #3366ff;">req5_type</span><span><span style="color: #3366ff;">          </span></span><span style="color: #3366ff;">j</span></span></p>
<p class="MsoNormal"><a href="http://www.sajithmr.com/wp-content/uploads/2008/11/chatstarts.jpg"><img class="alignnone size-full wp-image-370" title="chatstarts" src="http://www.sajithmr.com/wp-content/uploads/2008/11/chatstarts.jpg" alt="" width="230" height="374" /></a></p>
<p class="MsoNormal">Here xyz@gmail.com is the person , to whom you are going to chat. It sends the video_rtp protocol parameters. To know more about rtcp and udp go to: <a href="http://www.javvin.com/protocolRTCP.html" target="_blank">http://www.javvin.com/protocolRTCP.html</a></p>
<p class="MsoNormal"><span>Here 192.168.1.100 is my local area ip (LAN) and 116.68.66.85 is my internet IP address and the numbers starts in 3000 are the port number for the protocol</span></p>
<p class="MsoNormal">In addition to this, google also sends its usual parameters like mouse movement detector (To know the state of a chatter, idle or busy / normal )</p>
<p class="MsoNormal">It also sends the cpu speed info to google server to know about the video processing time. And your bandwidth and speed of internet is already there in google&#8217;s hand (See my post on <a href="http://www.sajithmr.com/gmail-architecture/" target="_blank">Gmail Architecture</a> to know about the 1pix speed calculation method of gmail)</p>
<p> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span><span style="color: #008080;">count</span><span><span style="color: #008080;">    </span></span><span style="color: #008080;">3</span><span style="color: #008080;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #008080;">req0_evtype</span><span><span style="color: #008080;">       </span></span><span style="color: #008080;">mousemove</span><span style="color: #008080;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #008080;">req0_time</span><span><span style="color: #008080;">          </span></span><span style="color: #008080;">263866</span><span style="color: #008080;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #008080;">req0_type</span><span><span style="color: #008080;">          </span></span><span style="color: #008080;">i</span><span style="color: #008080;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #008080;">req1_focused</span><span><span style="color: #008080;">     </span></span><span style="color: #008080;">1</span><span style="color: #008080;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #008080;">req1_type</span><span><span style="color: #008080;">          </span></span><span style="color: #008080;">cf</span><span style="color: #008080;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #008080;">req2_jid</span><span><span style="color: #008080;"> </span></span><span style="color: #008080;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #008080;">req2_json</span><span><span style="color: #008080;">          </span></span><span style="color: #008080;">["mf","mf1.0","1.0.2.0",2,{"caps":7,"cpuSpeed":1664,"cpus":2}]</span><span style="color: #008080;"></span></span></p>
<p class="MsoNormal"><span><span style="color: #008080;">req2_type</span><span><span style="color: #008080;">          </span></span><span style="color: #008080;">j</span></span></p>
<p> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Gmail sends request for every 3 seconds, and if your counterpart accepts the video chat invitation, your chat iframe loads with a flash object tag .</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span><span style="color: #800080;">&lt;embed id=&#8221;flash_yj_c_player2&#8243; wmode=&#8221;window&#8221; pluginspage=&#8221;http://www.macromedia.com/go/getflashplayer&#8221; type=&#8221;application/x-shockwave-flash&#8221; seamlesstabbing=&#8221;false&#8221; allowfullscreen=&#8221;true&#8221; allowscriptaccess=&#8221;sameDomain&#8221; bgcolor=&#8221;#000000&#8243; flashvars=&#8221;dbg=true&amp;ap=player&amp;nm=yj_c_player2&amp;cb=Recv_yj_c_player2&amp;os=windows&amp;plugin=true&amp;&#8221; src=&#8221;im/media-player.swf?ver=1.1.6&#8243; style=&#8221;width: 100%; height: 100%;&#8221; name=&#8221;yj_c_player2&#8243; quality=&#8221;high&#8221;/&gt;</span></span></p>
<p class="MsoNormal"><a href="http://www.sajithmr.com/wp-content/uploads/2008/11/fullchat.jpg"><img class="alignnone size-full wp-image-371" title="fullchat" src="http://www.sajithmr.com/wp-content/uploads/2008/11/fullchat.jpg" alt="" width="434" height="566" /></a></p>
<p class="MsoNormal">And this flash application does the later works.  This flash application communicate with google media server with Real Time Protocol and your video chat happens that way. The flash activex plugin support helps in accessing your webcam and mic.  Good day , have a nice chat &#8230; </p>
<p class="MsoNormal">Mail Me for more information</p>
<p class="MsoNormal">Thanks and Regards</p>
<p class="MsoNormal">Sajith</p>
<p> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/how-gmail-video-chat-works/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Fun Time</title>
		<link>http://www.sajithmr.me/fun-time</link>
		<comments>http://www.sajithmr.me/fun-time#comments</comments>
		<pubDate>Tue, 04 Nov 2008 03:14:45 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[webworld]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/?p=344</guid>
		<description><![CDATA[Hello Techies , Lets watch a fun video with your browser interactive effect. Kill me if you dont like this flash + javascript effect. Dont maximise (enlarge ) your browser window  after clicking the below link. Wait a moment  after the click. REMEMBER, DONT MAXIMIZE the window http://www.fly-a-balloon.be/ Regards Sythoos]]></description>
			<content:encoded><![CDATA[<p>Hello Techies ,</p>
<p>Lets watch a fun video with your browser interactive effect. Kill me if you dont like this flash + javascript effect.</p>
<p>Dont maximise (enlarge ) your browser window  after clicking the below link. Wait a moment  after the click.</p>
<p><strong><span style="color: #ff6600;">REMEMBER, DONT MAXIMIZE</span></strong> the window</p>
<p><a href=" http://www.fly-a-balloon.be/ " target="_blank"> http://www.fly-a-balloon.be/ </a></p>
<p>Regards</p>
<p>Sythoos</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/fun-time/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Embedded Flash Player is not working from another domain (Cross-Domain swf access )</title>
		<link>http://www.sajithmr.me/embedded-flash-player-flv-is-not-working-from-another-domain-cross-domain-swf-access</link>
		<comments>http://www.sajithmr.me/embedded-flash-player-flv-is-not-working-from-another-domain-cross-domain-swf-access#comments</comments>
		<pubDate>Fri, 18 Jul 2008 06:44:40 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[webworld]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[cross-domain]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/embedded-flash-player-flv-is-not-working-from-another-domain-cross-domain-swf-access/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>When I used an flv player for my website <a href="http://www.amvizone.com" title="Amvizone - The Amateur Video Zone" target="_blank">www.amvizone.com</a>, 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.</p>
<p><a href="http://www.amvizone.com" title="Amvizone - The Amateur Video Zone" target="_blank"><img src="http://www.sajithmr.com/wp-content/uploads/2008/07/flv.jpg" alt="FLV Player" /></a></p>
<p>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.</p>
<blockquote><p>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.</p></blockquote>
<p>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:</p><pre class="crayon-plain-tag"><code>&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&amp;lt;!-- http://www.foo.com/crossdomain.xml --&amp;gt;

&amp;lt;cross-domain-policy&amp;gt;

&amp;lt;allow-access-from domain=&quot;www.friendOfFoo.com&quot; /&amp;gt;

&amp;lt;allow-access-from domain=&quot;*.foo.com&quot; /&amp;gt;

&amp;lt;allow-access-from domain=&quot;105.216.0.40&quot; /&amp;gt;</code></pre><p></p><pre class="crayon-plain-tag"><code>&amp;lt;/cross-domain-policy&amp;gt;</code></pre><p>The above configuration allow any subdomains of foo.com or a particular ip 105.216.0.40 or  www.friendOfFoo.com</p>
<p>If you need to provide access to all domains , you can use the following xml:</p><pre class="crayon-plain-tag"><code>&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;

&amp;lt;!-- http://www.foo.com/crossdomain.xml --&amp;gt;

&amp;lt;cross-domain-policy&amp;gt;

  &amp;lt;allow-access-from domain=&quot;*&quot; /&amp;gt;

&amp;lt;/cross-domain-policy&amp;gt;</code></pre><p><p><p>
Courtesy:  Adobe.com</p>
<p>And special thanks to Rahul for sharing the information</p>
<p>For details: click <a href="http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;file=00001621.html" title="Adobe Policy" target="_blank">here </a></p>
<p>Regards</p>
<p>Sajith M.R</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/embedded-flash-player-flv-is-not-working-from-another-domain-cross-domain-swf-access/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>WordPress Announcement &#8211; Plugin</title>
		<link>http://www.sajithmr.me/wordpress-announcement-plugin</link>
		<comments>http://www.sajithmr.me/wordpress-announcement-plugin#comments</comments>
		<pubDate>Tue, 24 Jun 2008 09:20:36 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[webworld]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/wordpress-announcement-plugin/</guid>
		<description><![CDATA[Do you wanna inform any important news or message to your readers ? Here is a simple plugin, WordPress Announcement Plugin. Download the plugin from : http://downloads.wordpress.org/plugin/announcement.zip Go to Admin &#62; Plugin &#62; and activate announcement plugin. After that, go to options and select Announcement. By default the plugin will be inactive. You have to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/06/announce1.jpg" alt="Wordpress Announcement Plugin" style="margin: 10px; float: left" /></p>
<p>Do you wanna inform any important news or message to your readers ? Here is a simple plugin, WordPress Announcement Plugin.</p>
<p>Download the plugin from : <a href="http://downloads.wordpress.org/plugin/announcement.zip" target="_blank">http://downloads.wordpress.org/plugin/announcement.zip</a><a href="http://www.sajithmr.com/downloads/announcement.zip"></a></p>
<p>Go to Admin &gt; Plugin &gt; and activate announcement plugin. After that, go to options and select Announcement. By default the plugin will be inactive. You have to set your announcement and activate the  announcement by checking &#8216;Active&#8217; checkbox.</p>
<blockquote><p> Never Forgot to Run the Announcement. By Default the Announcement will be inactive</p></blockquote>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/06/option.jpg" /></p>
<p>Enough !!! You visitors can now see your announcement. It will be displayed <strong>only one time</strong> for a particular  user .</p>
<p><strong><font color="#ff6600">(If you want to see the announcement again, for testing purpose, Clear browser cookies, or atleast cookies from your blog. Otherwise you have to wait another 24 hours to play the announcement again) </font></strong></p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/06/screenshot-1.png" /></p>
<p>The plugin is created with cute design and animation. It will never interrupt your blog reader.</p>
<p>Regards</p>
<p>Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/wordpress-announcement-plugin/feed</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
		<item>
		<title>Requirements for a Video Website</title>
		<link>http://www.sajithmr.me/requirements-for-a-video-website</link>
		<comments>http://www.sajithmr.me/requirements-for-a-video-website#comments</comments>
		<pubDate>Mon, 23 Jun 2008 07:52:57 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[webworld]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/requirements-for-a-video-website/</guid>
		<description><![CDATA[If you are planing to start a video website like youtube, here is some things to keep in mind. FLV PLAYER ======== You know in now a days most of the video streaming websites use flash player for video streaming. The video file is in flv format. So you need a flash video player for [...]]]></description>
			<content:encoded><![CDATA[<p>If you are planing to start a video website like youtube, here is some things to keep in mind.</p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/06/usher_love480.jpg" /></p>
<p>FLV PLAYER<br />
========</p>
<p>You know in now a days most of  the video streaming websites use flash player for video streaming. The video file is in flv format. So you need a flash video player for this purpose.<br />
You can download a free flash / flv player from : <a href="http://www.jeroenwijering.com/?item=JW_FLV_Player" target="_blank">http://www.jeroenwijering.com/?item=JW_FLV_Player</a><br />
or <a href="http://flowplayer.org/" target="_blank">http://flowplayer.org/</a></p>
<p>FORMAT CONVERSION<br />
===============</p>
<p>Now you need videos in flv file format. In normal cases, most of the videos uploaded by an user will be in avi, dat ,mpg,mp4 or 3gp. So you need a flv converter. You can use either <a href="http://www.sajithmr.com/ffmpeg-sample-code/" target="_blank">ffmpeg</a> library or <a href="http://www.sajithmr.com/mencoder-video-convertion-tool/" target="_blank">mencoder</a> for this purpose</p>
<p>Here is a sample video emmbedding method.</p>
<pre class="crayon-plain-tag"><code>&lt;object&gt;
codebase=&quot;http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,18,0&quot;
width=&quot;450&quot; height=&quot;375&quot; id=&quot;/YouTube_video/youtube&quot; align=&quot;middle&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;youtube.swf?xml=config.xml&amp;video=121264118224947.flv&quot;&gt;&lt;/param&gt;
&lt;param name=&quot;quality&quot; value=&quot;high&quot;&gt;&lt;/param&gt;
&lt;param name=&quot;bgcolor&quot; value=&quot;#ffffff&quot;&gt;&lt;/param&gt;
&lt;embed src=&quot;youtube.swf?xml=config.xml&amp;video=121264118224947.flv&quot;&gt;&lt;/embed&gt;
bgcolor=&quot;#ffffff&quot; width=&quot;450&quot; height=&quot;375&quot; type=&quot;application/x-shockwave-flash&quot;
pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; /&gt;;
&lt;/object&gt;</code></pre><p>
Here src parameter points the swf file, the flash palyer and video parameter points the flv file. This is the format of player i used in <a href="http://www.amvizone.com" title="The Amateur Video Zone" target="_blank">http://www.amvizone.com</a></p>
<p>ffmpeg also can be used for making thumbnails and video watermarking</p>
<p>STORAGE and BANDWIDTH<br />
=====================</p>
<p>Where would you save flv files. In yourown server ? If there is a minimum number of videos, your server might handle it. But consider the case having a large number of videos, your server bandwidth will  get used  soon. So we have to switch into a CDN (Content Data Network) like <a href="http://www.sajithmr.com/amazon-s3-example/" target="_blank">amazone S3.</a> What you have to do is just register with any CDN website and use their webservices for uploading and manipulating your video files. These CDN have very reasonable cost for the bandwidth usage and storage space.</p>
<p>Comment here if any queries<br />
Regards</p>
<p>Sajith M.R</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/requirements-for-a-video-website/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Download Youtube Videos using PHP Code</title>
		<link>http://www.sajithmr.me/download-youtube-videos-using-php-code</link>
		<comments>http://www.sajithmr.me/download-youtube-videos-using-php-code#comments</comments>
		<pubDate>Thu, 29 May 2008 10:18:20 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[grabber]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/download-youtube-videos-using-php-code/</guid>
		<description><![CDATA[&#160; If you want to get the FLV file of any youtube video url using php code, here is the solution. If you are a PHP Programmer and if you are working with any video website, and if you need to grab videos (FLV files) from youtube and to put it yourown site (not object [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>If you want to get the FLV file of any youtube video url using <strong>php code</strong>, here is the solution.</p>
<blockquote><p>If you are a PHP Programmer and if you are working with any video website, and if you need to grab videos (FLV files) from youtube and to put it yourown site (not object embedding) , Download the Full Source Code given at the end of this article (ZIP)</p></blockquote>
<p>I used this php code for the <strong>Youtube video download</strong> tool <a href="http://www.googleneedle.com/" target="_blank">http://www.googleneedle.com</a></p><pre class="crayon-plain-tag"><code></code></pre><p>Here function getPatternFromUrl is nothing but, get the exact pattern of a particular video from any youtube video url format.</p>
<p>In the above case , it returns <strong>pzmP4UvZRa4</strong></p>
<p>The function is below</p><pre class="crayon-plain-tag"><code>function getPatternFromUrl($url)

 {

$url = $url.'&amp;amp;';

$pattern = '/v=(.+?)&amp;amp;+/';

preg_match($pattern, $url, $matches);

return ($matches[1]);

}</code></pre><p><p>
GetFlvFromYoutube is the main function here, which download the flv file from youtube pattern and saves to your local machine.<br />
The function is below:</p><pre class="crayon-plain-tag"><code>function GrabFlvFromYoutube( $pattern )
{

 require_once (&quot;phptube.php&quot;);

 $tube = new PHPTube ();

 $flv_http_path = $tube-&amp;gt;download($pattern) ;

 echo $flv_http_path;

 set_time_limit(0);

 $data = file_get_contents($flv_http_path);

 $new_flv_path = dirname(_FILE_).'/flvs/'.$pattern.'.flv' ;

 file_put_contents($new_flv_path, $data);

 return $new_flv_path ;

}</code></pre><p><p><p>
<span style="color: #008000;">Hey, the old script I wrote is not working as youtube constantly changing their way they serve the contents.</span></p>
<p><span style="color: #008000;">I updated googleneedle website with code from here: <a href="http://1chris.com/post/39/using-php-to-download-youtube-flvs/" target="_blank"><span style="color: #008000;">http://1chris.com/post/39/using-php-to-download-youtube-flvs/</span></a></span></p>
<p><span style="color: #008000;">It works now, thank you Chris</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/download-youtube-videos-using-php-code/feed</wfw:commentRss>
		<slash:comments>84</slash:comments>
		</item>
		<item>
		<title>Cross Browser Cookies</title>
		<link>http://www.sajithmr.me/cross-browser-cookies</link>
		<comments>http://www.sajithmr.me/cross-browser-cookies#comments</comments>
		<pubDate>Fri, 04 Apr 2008 06:34:09 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[webworld]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/cross-browser-cookies/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A</strong> 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.</p>
<blockquote><p>
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 &#8220;cookie&#8221; is derived from &#8220;magic cookie,&#8221; a well-known concept in UNIX computing which inspired both the idea and the name of HTTP cookies &#8211; Wikipedia</p></blockquote>
<p>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 ??</p>
<p>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.</p>
<p>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.</p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/04/cross-cookie.jpg" alt="Cross browser cookies" height="505" width="517" /></p>
<p>See this post: <a href="http://www.nuff-respec.com/technology/cross-browser-cookies-with-flash" target="_blank">http://www.nuff-respec.com/technology/cross-browser-cookies-with-flash</a></p>
<p>In this post Mr. Daniel Bulli explains it detaily. He is the big man here.</p>
<p>also see this link: <a href="http://www.ts0.com/crosscookie/example.html" target="_blank">http://www.ts0.com/crosscookie/example.html</a></p>
<p>A live example for cross browser cookie. Both of the sites provide source code of their implementation.</p>
<p>I also uploaded the source code as a backup. Download it from here:  <a href="http://www.sajithmr.com/downloads/CrossBrowserCookieManager.zip"><img src="http://www.sajithmr.com/wp-content/uploads/2008/04/winzip_180x180.thumbnail.gif" alt="OpenID Integration PHP" height="43" width="43" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/cross-browser-cookies/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

