<?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/"
	>

<channel>
	<title>Designscripting &#187; Javascript</title>
	<atom:link href="http://www.designscripting.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designscripting.com</link>
	<description>Latest in flash, Free slideshow, Flash tutorials, advance flash, actionscript, Adobe Air, flash slideshow, New technology, RIA, Abstract wall paper</description>
	<lastBuildDate>Thu, 17 Jun 2010 09:48:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dynamic Stage resize + AS3</title>
		<link>http://www.designscripting.com/2009/12/dynamic-stage-resize-as3/</link>
		<comments>http://www.designscripting.com/2009/12/dynamic-stage-resize-as3/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 14:48:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash CS4]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.designscripting.com/?p=273</guid>
		<description><![CDATA[Changing the size of flash document from Javascript will be handy in many situations like creating Flash widgets like

News scroller
Flash Banners

..
In this article we are going to create that effect.
First we need to import necessary classes.
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.MovieClip;
The next step is to align the stage to TOP LEFT and scalemode  to no scale.
Means we are aligning the stage to topleft even if we resize it and not scaling the contents on resize
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
The final step is to add Event listener for stage resize
stage.addEventListener(Event.RESIZE, handleResize);
function handleResize(e:Event):void
{
	//The ...]]></description>
			<content:encoded><![CDATA[<p>Changing the size of flash document from Javascript will be handy in many situations like creating Flash widgets like</p>
<ul>
<li>News scroller</li>
<li>Flash Banners</li>
</ul>
<p>..</p>
<p>In this article we are going to create that effect.</p>
<p>First we need to import necessary classes.</p>
<pre class="brush:as3">import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.MovieClip;</pre>
<p>The next step is to align the stage to TOP LEFT and scalemode  to no scale.<br />
Means we are aligning the stage to topleft even if we resize it and not scaling the contents on resize</p>
<pre class="brush:as3">stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;</pre>
<p>The final step is to add Event listener for stage resize</p>
<pre class="brush:as3">stage.addEventListener(Event.RESIZE, handleResize);
function handleResize(e:Event):void
{
	//The resize code goes here
}</pre>
<p>Note:<br />
In the sample files I added code that creates a rectangle equal of stage size.</p>
<p>In Html, We are resizing the Flash using StageResize.width = Value.<br />
Here,</p>
<p>StageResize is the name of the Flash movie create when publishing the Flash.</p>
<pre class="brush:html"> onclick="StageResize.width = '150';StageResize.height =  '150';" href="#"&gt;Change W:150 X H:150</pre>
<p><a href="http://www.designscripting.com/wp-content/uploads/2009/11/StageResize1.zip"><img src="http://www.designscripting.com/wp-content/uploads/2008/12/download.jpg" alt="Download Source Files" width="239" height="54" /></a><br />
<a href="http://www.designscripting.com/wp-content/uploads/2009/11/StageResize.html" target="_blank"><img src="http://www.designscripting.com/wp-content/uploads/2009/11/Demo.jpg" alt="" width="128" height="54" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.designscripting.com/2009/12/dynamic-stage-resize-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove/Hide right click + actionscript</title>
		<link>http://www.designscripting.com/2009/12/removehide-right-click-actionscript/</link>
		<comments>http://www.designscripting.com/2009/12/removehide-right-click-actionscript/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 14:46:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash CS4]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.designscripting.com/?p=252</guid>
		<description><![CDATA[Finally the default menu items from the Flash player can be removed.
Since when I started working in Flash, was thinking is there any option, but finally it came into action.
Now the developer can use this Code to hide the default right click menu in Flash through actionscript and javascript together.
The flash file(SWF) should be embedded inside a HTML page with the javascript file called.
But one sad new is that this will not work with opera browser.
Game developer and RIA &#8211; Rich internet Application can leverage this functionalit to hide/remove the ...]]></description>
			<content:encoded><![CDATA[<p>Finally the default menu items from the Flash player can be removed.</p>
<p>Since when I started working in Flash, was thinking is there any option, but finally it came into action.</p>
<p>Now the developer can use this Code to hide the default right click menu in Flash through actionscript and javascript together.</p>
<p>The flash file(SWF) should be embedded inside a HTML page with the javascript file called.</p>
<p>But one sad new is that this will not work with opera browser.</p>
<p>Game developer and RIA &#8211; Rich internet Application can leverage this functionalit to hide/remove the right click menu from the Flash File.</p>
<ul>
<li>http://www.uza.lt/blog/2007/08/solved-right-click-in-as3/</li>
<li>http://www.lordofduct.com/blog/?p=318</li>
</ul>
<p>Thanks guys.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.designscripting.com/2009/12/removehide-right-click-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>InnerHtml is not working in FireFox and Safari.</title>
		<link>http://www.designscripting.com/2009/06/innerhtml-is-not-working-in-firefox-and-safari/</link>
		<comments>http://www.designscripting.com/2009/06/innerhtml-is-not-working-in-firefox-and-safari/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 11:26:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[innerHtml]]></category>
		<category><![CDATA[innerText]]></category>
		<category><![CDATA[textContent]]></category>

		<guid isPermaLink="false">http://www.designscripting.com/?p=142</guid>
		<description><![CDATA[Few days back while working with &#8220;InnerHtml&#8221;, I realized that the tag doesn&#8217;t work properly for Firefox and Safari.So I tried searching for the solution, by checking the tag against each browser using JavaScript.
I replaced &#8220;InnerHtml&#8221; with &#8220;textContent&#8221; (Firefox and Safari) and â€œinnerTextâ€ (IE5+) and it worked!
if (document.layers) {
		type="NN";
	} else {
		if (document.all) {
			if (document.getElementById) {
				//type="IE5+";
				var spanTags = document.getElementsByTagName('span');
				for (var i = 0; i]]></description>
			<content:encoded><![CDATA[<p>Few days back while working with &#8220;InnerHtml&#8221;, I realized that the tag doesn&#8217;t work properly for Firefox and Safari.So I tried searching for the solution, by checking the tag against each browser using JavaScript.</p>
<p>I replaced &#8220;InnerHtml&#8221; with &#8220;textContent&#8221; (Firefox and Safari) and â€œinnerTextâ€ (IE5+) and it worked!</p>
<pre lang="c">if (document.layers) {
		type="NN";
	} else {
		if (document.all) {
			if (document.getElementById) {
				//type="IE5+";
				var spanTags = document.getElementsByTagName('span');
				for (var i = 0; i<spantags .length; i++) {
					spanTags[i].innerText = '';
				}
			} else {
				//type="IE4";
			}
		} else {
			//type="FF";
				var spanTags = document.getElementsByTagName('span');
				for (var i = 0; i < spanTags.length; i++) {
					spanTags[i].textContent = '';
				}
		}
	}</pre>
<p></spantags></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.designscripting.com/2009/06/innerhtml-is-not-working-in-firefox-and-safari/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
