<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Next Generation Web Applications</title>
	<atom:link href="http://nextgenerationweb.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nextgenerationweb.wordpress.com</link>
	<description>Web 2.0 and RIA</description>
	<lastBuildDate>Mon, 05 Apr 2010 06:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nextgenerationweb.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/5d3149de96aad2bdb9bed2177e260474?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Next Generation Web Applications</title>
		<link>http://nextgenerationweb.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nextgenerationweb.wordpress.com/osd.xml" title="Next Generation Web Applications" />
	<atom:link rel='hub' href='http://nextgenerationweb.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Custom Alert in Flex 3</title>
		<link>http://nextgenerationweb.wordpress.com/2009/11/18/custom-alert-in-flex-3/</link>
		<comments>http://nextgenerationweb.wordpress.com/2009/11/18/custom-alert-in-flex-3/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 11:33:41 +0000</pubDate>
		<dc:creator>osurikiran</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>

		<guid isPermaLink="false">http://nextgenerationweb.wordpress.com/2009/11/18/custom-alert-in-flex-3/</guid>
		<description><![CDATA[Usually &#8216;Alert&#8217; can`t have its default skin class, If you extend ProgrammaticSkin class and add this skin to Alert, It&#8217;s lose its original dimensions, because Alert, TitleWindow, Panel , components default skin is PanelSkin class. The solution is extending PanelSkin and applying it as a &#8216;border-skin&#8217; in style declaration. The mx.skins.halo package contains PanelSkin Class [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nextgenerationweb.wordpress.com&amp;blog=10011058&amp;post=49&amp;subd=nextgenerationweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#000000;">Usually &#8216;Alert&#8217; can`t have its default skin class, If you extend </span><span style="color:#000000;">ProgrammaticSkin</span><span style="color:#000000;"> class and add this skin to Alert, It&#8217;s lose its original dimensions, because Alert, TitleWindow, Panel , components default skin is PanelSkin class. The solution is extending PanelSkin and applying it as a &#8216;border-skin&#8217; in style declaration. The </span><span style="color:#000000;">mx.skins.halo</span><span style="color:#000000;"> package contains PanelSkin Class which will be extended and draw our own skin programmatically. Here is custom skin defined in action script 3.0 &#8216; CustomeAlertSkin.as&#8217; .</span></p>
<p><span style="color:#000000;"> </span></p>
<blockquote>
<div id="_mcePaste">package</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">import mx.skins.halo.PanelSkin;</div>
<div id="_mcePaste">public class CustomeAlertSkin extends PanelSkin</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">public function CustomeAlert()</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">super();</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">override protected function updateDisplayList(unscaledWidth:Number, scaledHeight:Number):void</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">super.updateDisplayList(unscaledWidth,scaledHeight );</div>
<div id="_mcePaste">graphics.clear();</div>
<div id="_mcePaste">graphics.lineStyle(2,0xFFFF00,1);</div>
<div id="_mcePaste">graphics.beginFill(0x80aad4,1);</div>
<div id="_mcePaste">graphics.drawRoundRect(0,0,unscaledWidth, unscaledHeight,50, 50);</div>
<div id="_mcePaste">graphics.endFill();</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">}</div>
</blockquote>
<div>Defining CustomeAlertSkin in style declaration</div>
<div><span style="font-family:'Courier New';line-height:18px;white-space:pre;background-color:#ffffff;"> &lt;mx:Style&gt;</span></div>
<blockquote>
<pre><span style="font-size:10pt;font-family:Courier New;"><span style="color:#000000;"> Alert
</span></span><span style="font-size:10pt;font-family:Courier New;"><span style="color:#000000;">    {
</span></span><span style="font-size:10pt;font-family:Courier New;"><span style="color:#000000;">        border-skin : ClassReference("CustomeAlert");
</span></span><span style="font-size:10pt;font-family:Courier New;"><span style="color:#000000;">        color : #FFFFFF;
</span></span><span style="font-size:10pt;font-family:Courier New;"><span style="color:#000000;">    }
</span></span><span style="font-family:Courier New;font-size:10pt;">&lt;/mx:Style&gt;</span></pre>
</blockquote>
<p><span style="font-family:Courier New;font-size:10pt;">Now in application define a Alert component and test it.<span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"> you find different Alert popup,</span></span></p>
<p style="text-align:center;"><span style="color:#000000;"> <a href="http://nextgenerationweb.files.wordpress.com/2009/11/new-picture.png"><img class="size-full wp-image-55 aligncenter" title="Custom Alert" src="http://nextgenerationweb.files.wordpress.com/2009/11/new-picture.png?w=650" alt=""   /></a></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nextgenerationweb.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nextgenerationweb.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nextgenerationweb.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nextgenerationweb.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nextgenerationweb.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nextgenerationweb.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nextgenerationweb.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nextgenerationweb.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nextgenerationweb.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nextgenerationweb.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nextgenerationweb.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nextgenerationweb.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nextgenerationweb.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nextgenerationweb.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nextgenerationweb.wordpress.com&amp;blog=10011058&amp;post=49&amp;subd=nextgenerationweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nextgenerationweb.wordpress.com/2009/11/18/custom-alert-in-flex-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5efd7cd2250b78581380f26da9c5f769?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">osurikiran</media:title>
		</media:content>

		<media:content url="http://nextgenerationweb.files.wordpress.com/2009/11/new-picture.png" medium="image">
			<media:title type="html">Custom Alert</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex SharedObject</title>
		<link>http://nextgenerationweb.wordpress.com/2009/10/24/flex-sharedobjects/</link>
		<comments>http://nextgenerationweb.wordpress.com/2009/10/24/flex-sharedobjects/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 06:03:03 +0000</pubDate>
		<dc:creator>osurikiran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nextgenerationweb.wordpress.com/?p=27</guid>
		<description><![CDATA[Flex  is client side application that runs on the browser . Usually Every server side technologies store client related and session related data in user computer known as cookies . Like other server programs flex also allows to store data in user computer as (.sol)  files. Known as SharedObject.  These files you can find  in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nextgenerationweb.wordpress.com&amp;blog=10011058&amp;post=27&amp;subd=nextgenerationweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Flex  is client side application that runs on the browser . Usually Every server side technologies store client related and session related data in user computer known as cookies . Like other server programs flex also allows to store data in user computer as (.sol)  files. Known as SharedObject.  These files you can find  in your file system  the path is</p>
<p>C:\Documents and Settings\{user name}\Application Data\Macromedia\Flash Player\#SharedObjects\</p>
<p>The file is not editable , can be deleted. it is a encrypted file format.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nextgenerationweb.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nextgenerationweb.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nextgenerationweb.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nextgenerationweb.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nextgenerationweb.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nextgenerationweb.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nextgenerationweb.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nextgenerationweb.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nextgenerationweb.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nextgenerationweb.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nextgenerationweb.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nextgenerationweb.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nextgenerationweb.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nextgenerationweb.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nextgenerationweb.wordpress.com&amp;blog=10011058&amp;post=27&amp;subd=nextgenerationweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nextgenerationweb.wordpress.com/2009/10/24/flex-sharedobjects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5efd7cd2250b78581380f26da9c5f769?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">osurikiran</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex 4 Features</title>
		<link>http://nextgenerationweb.wordpress.com/2009/10/20/flex-4-features/</link>
		<comments>http://nextgenerationweb.wordpress.com/2009/10/20/flex-4-features/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 04:18:43 +0000</pubDate>
		<dc:creator>osurikiran</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Action Script]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex3]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://nextgenerationweb.wordpress.com/?p=7</guid>
		<description><![CDATA[Adobe recently released beta version of Flex4  with new features and developer friendly tools.  Wich   enables fast and automated features . Some of  the new features add-on are. Integrated with Adobe Catalyst The Flex IDE is integrated with the Adobe Catalyst. witch is formally known as Adobe Thermo.  Which inter operates with adobe products such as Photoshop, CS,Illustrator, etc.. and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nextgenerationweb.wordpress.com&amp;blog=10011058&amp;post=7&amp;subd=nextgenerationweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="background-color:#ffffff;"></p>
<p></span><span id="more-7"></span>Adobe recently released beta version of Flex4  with new features and developer friendly tools.  Wich   enables fast and automated features . Some of  the new features add-on are.</p>
<p><strong>Integrated with Adobe Catalyst</strong></p>
<p><strong> </strong>The Flex IDE is integrated with the Adobe Catalyst. witch is formally known as Adobe Thermo.  Which inter operates with adobe products such as Photoshop, CS,Illustrator, etc.. and generates the corresponding mxml code.</p>
<p>The Graphic element generated in Adobe Creative Suite can directly be used in Flex IDE using the Catalyst. Supports to draw graphic objects , It&#8217;s behavior with respect to states and events  and import then into IDE . With this design, art and grahic oriented code need not to be type very much.</p>
<p><strong>Text Layout Framework</strong></p>
<p><strong> </strong>It is open source framework for rich text rendering.  It has capable of rendering text in columns, Text flow control, support for multi languages including some  Indian languages , Vertical text flow, Right to Left text flow, Text wrapping around image and inserting image in textcontrol, etc.. It also support text to export to xml, html and plain text formats and importing too. TLF can also be used in Flex 3.3 and above , AIR 1.5 . <a title="Learn TLF" href="http://labs.adobe.com/technologies/textlayout/" target="_blank">know more about it</a></p>
<p><strong>Support for FXG</strong></p>
<p><strong> </strong>FXG is a XML based graphics interchange format. FXG contains hight level graphics primitives enables to create, combine, group, modify, transform basic vector and bitmap graphics.One of the major benefits of FXG is that it will make it much easier to build visual tooling around working with and designing Flex applications (such as <a style="color:#004477;text-decoration:underline;margin:0;padding:0;" href="http://labs.adobe.com/wiki/index.php/Thermo">Thermo</a> and all of the Adobe CS tools).</p>
<p>Designers can create graphics using tools such as Adobe Photoshop CS4, Illustrator CS4 and Fireworks CS4 and export them into the FXG format. You can use tools such as Flash Builder with the FXG file to develop rich Internet applications. These applications run in a web browser using the Flash Player or on the desktop as an AIR application.</p>
<p><strong>Component Architecture:</strong></p>
<p><strong><span style="font-weight:normal;">In flex4 new components are  introduced known as &#8216;Spark Components&#8217; .The &#8216;Spark&#8217; components are implemented over the &#8216;Halo&#8217; components. In Flex 3 component architecture is totaly besed on &#8216;Halo Components&#8217;, But  Flex 4 allows to use both Spark and Halo components. In addition FXG componets are supported the xml assembly  prefix are used to differentiate the components kind.</span></strong></p>
<div id="_mcePaste">like, &#8216;mx&#8217;  for Halo, &#8216;s&#8217; for Spark and &#8216;fxg&#8217; for  FXG coponents.</div>
<blockquote>
<div id="_mcePaste">Halo (&lt;mx:Button&gt;)</div>
<div id="_mcePaste">Spark (&lt;s:Button&gt;)</div>
<div id="_mcePaste">Fxg (&lt;fxg:component&gt;)</div>
<div></div>
</blockquote>
<div><strong>MXML 2009 Languages</strong></div>
<div id="_mcePaste">The MXML 2006 wich is used in Flex3 was extended to  support for spark and FXG components . The syntaxt and XML assembly were changed in MXML 2009. Were you should specify all declarations in on seperate block</div>
<div id="_mcePaste">such as &lt;fx:declaration&gt; . All nonvisual components should be declared in  &lt;fx:declarations&gt;&lt;/fx:declarations&gt;, like HTTPService, WebServices, URLRequest, URLLoader, XML, Model, ArrayColletion, ect</div>
<blockquote>
<div id="_mcePaste">Flex 4 Language changes</div>
<div id="_mcePaste">
<ul>
<li>Halo &#8211; xmlns:mx=&#8221;library://ns.adobe.com/flex/halo&#8221;</li>
</ul>
</div>
<div id="_mcePaste">Included in previous releases of Flex</div>
<div id="_mcePaste">
<ul>
<li>Spark &#8211; xmlns:s=&#8221;library://ns.adobe.com/flex/spark&#8221;&gt;</li>
</ul>
</div>
<div id="_mcePaste">New architecture for skinning and have other advantages/components</div>
<div id="_mcePaste">
<ul>
<li>Flash XML Graphics – for workflow hand off between Flash</li>
</ul>
</div>
<div id="_mcePaste">Catalyst and Flash Builder 4</div>
<div id="_mcePaste">
<ul>
<li>xmlns:fx=http://ns.adobe.com/mxml/2009</li>
</ul>
</div>
<div id="_mcePaste">Support for Flash Catalyst (Thermo) Exports</div>
</blockquote>
<p><strong></p>
<p></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nextgenerationweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nextgenerationweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nextgenerationweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nextgenerationweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nextgenerationweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nextgenerationweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nextgenerationweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nextgenerationweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nextgenerationweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nextgenerationweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nextgenerationweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nextgenerationweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nextgenerationweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nextgenerationweb.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nextgenerationweb.wordpress.com&amp;blog=10011058&amp;post=7&amp;subd=nextgenerationweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nextgenerationweb.wordpress.com/2009/10/20/flex-4-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5efd7cd2250b78581380f26da9c5f769?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">osurikiran</media:title>
		</media:content>
	</item>
		<item>
		<title>Adobe Flex and JavaScript Interaction</title>
		<link>http://nextgenerationweb.wordpress.com/2009/10/19/adobe-flex-and-javascript-interaction/</link>
		<comments>http://nextgenerationweb.wordpress.com/2009/10/19/adobe-flex-and-javascript-interaction/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 13:54:00 +0000</pubDate>
		<dc:creator>osurikiran</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Java Script]]></category>

		<guid isPermaLink="false">http://nextgenerationweb.wordpress.com/?p=5</guid>
		<description><![CDATA[The Flex Application can communicate with the JavaScript running on the browser asynchronously. The Flex can call a function in JavaScript meanwhile JavaScript can call a function in Flex. Let us see how it can be achieved. The Action Script interface ‘ExternalInterface’ provides methods to communicate with the JavaScript In your flex IDE create a new flex [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nextgenerationweb.wordpress.com&amp;blog=10011058&amp;post=5&amp;subd=nextgenerationweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Flex Application can communicate with the JavaScript running on the browser asynchronously. The Flex can call a function in JavaScript meanwhile JavaScript can call a function in Flex. Let us see how it can be achieved.</p>
<p>The Action Script interface ‘ExternalInterface’ provides methods to communicate with the JavaScript</p>
<p>In your flex IDE create a new flex project,</p>
<h4><strong><span style="color:#333399;">Case 1: Calling JavaScript form Flex</span><br />
</strong></h4>
<p><strong>JavaScript side: </strong></p>
<p>Under the project root directory some subdirectories are exist.</p>
<p>Such as</p>
<ul>
<li>bin-debug</li>
<li>html-template</li>
<li>libs</li>
<li>src</li>
</ul>
<p>Now open the ‘html-template’ subdirectory under this open the ‘index.template.html’ file to edit. Within &lt;head&gt; &lt;/head&gt; tags define a function that that is called from the Flex application.</p>
<blockquote><p>&lt;script language=”JavaScript” type=”text/javascript”&gt;</p>
<p>function jsFunction(flex_msg)</p>
<p>{</p>
<p>alert(&#8220;JavaScript : Hi Flex I received your message &#8220;+flex_msg);</p>
<p>}</p>
<p>&lt;/script&gt;</p></blockquote>
<p><strong>Flex side: </strong></p>
<p>Now open ’ .mxml’ file type the code below that calls the  function in JavaScript.<strong> </strong></p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;</p>
<p>&lt;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; layout=&#8221;absolute&#8221; &gt;</p>
<p>&lt;mx:Script&gt;</p>
<p>&lt;![CDATA[</p>
<p>import mx.controls.Alert;</p>
<p>import flash.external.ExternalInterface;</p>
<p>private function accessJavaScipt():void</p>
<p>{</p>
<p>if(ExternalInterface.available)</p>
<p>{</p>
<p>ExternalInterface.call("jsFunction",”Hii a message to you”);</p>
<p>}</p>
<p>}</p>
<p>]]&gt;</p>
<p>&lt;/mx:Script&gt;</p>
<p>&lt;mx:Button y=&#8221;171&#8243; label=&#8221;Call JavaScript&#8221; horizontalCenter=&#8221;0&#8243; click=&#8221;accessJavaScipt()&#8221;/&gt;</p>
<p>&lt;/mx:Application&gt;</p></blockquote>
<h4><strong><span style="color:#333399;">Case 2: Calling Flex from JavaScript </span></strong></h4>
<p><strong>Flex side:</strong></p>
<p>The Action Script API ExternalInterface interface allows to register call back functions that are called from the JavaScript. Define all callback functions that are called from the javascript in flex application creationComplete event.</p>
<blockquote><p>private function creationCompleteHandler():void</p>
<p>{</p></blockquote>
<blockquote><p>if(ExternalInterface.available)</p>
<p>{</p>
<p>ExternalInterface.addCallback(&#8220;flexFunction&#8221;, javascriptEventsHandler);</p>
<p>}</p></blockquote>
<blockquote><p>}</p></blockquote>
<p>private function javascriptEventsHandler():void</p>
<blockquote><p>{</p>
<p>Alert.show(&#8220;Flex : Hi JavaScript&#8221;);</p>
<p>}</p></blockquote>
<blockquote><p><span style="font-size:xx-small;"><br />
</span></p>
<p><span style="font-size:xx-small;"><br />
</span></p></blockquote>
<p><strong>JavaScript Side</strong></p>
<p>open the index.template.html file    and define a html button tag as below.</p>
<p>&lt;input type=&#8221;button&#8221; onClick=&#8217;callFlex()&#8221; value=&#8221;call Flex&#8221; /&gt;</p>
<p>In script block define handler function &#8216;callFlex()&#8217;  like below</p>
<blockquote><p>&lt;script language=”JavaScript” type=”text/javascript”&gt;</p>
<p>function callFlex()</p>
<p>{</p>
<p>$ {application}.flexFunction();</p>
<p>}</p>
<p>&lt;script&gt;</p></blockquote>
<p><span style="color:#000080;"><span style="color:#000000;">Now execute the application and click on the &#8216;callFlex&#8217; button the flex application responds with alert message.</span></span></p>
<p><span style="color:#000080;"><span style="color:#000000;">Now the flex application movie object is browser specific to get instance of browser define a function that will return the movie object reference as browser specific.</span></span></p>
<p><span style="color:#000080;"><span style="color:#000000;">in Javascript define function as</span></span></p>
<p><span style="color:#000080;"><span style="color:#000000;">indsa</span></span></p>
<blockquote><p>function getFlexMovieRef(appName)</p>
<p>{</p>
<p>if (navigator.appName.indexOf (&#8220;Microsoft&#8221;) !=-1) {</p>
<p>return window[appName];</p>
<p>} else {</p>
<p>return document[appName];</p>
<p>}</p>
<p>}</p></blockquote>
<p>this function now return a object will call callback functions in action script  .</p>
<blockquote><p>getFlexMovieRef(&#8220;${application}&#8221;).flexFunction();</p></blockquote>
<p><span style="font-family:'Courier New';color:#000080;"><br />
</span></p>
<blockquote><p><span style="font-family:'Courier New';"><span style="font-size:xx-small;"><br />
</span></span></p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nextgenerationweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nextgenerationweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nextgenerationweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nextgenerationweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nextgenerationweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nextgenerationweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nextgenerationweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nextgenerationweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nextgenerationweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nextgenerationweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nextgenerationweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nextgenerationweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nextgenerationweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nextgenerationweb.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nextgenerationweb.wordpress.com&amp;blog=10011058&amp;post=5&amp;subd=nextgenerationweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nextgenerationweb.wordpress.com/2009/10/19/adobe-flex-and-javascript-interaction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5efd7cd2250b78581380f26da9c5f769?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">osurikiran</media:title>
		</media:content>
	</item>
	</channel>
</rss>
