<?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>flash &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>object and embed tag position in IE</title>
		<link>/2009/10/30/object-and-embed-tag-position-in-ie/</link>
		<comments>/2009/10/30/object-and-embed-tag-position-in-ie/#respond</comments>
		<pubDate>Fri, 30 Oct 2009 19:00:38 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[object]]></category>

		<guid isPermaLink="false">/?p=748</guid>
		<description><![CDATA[What is OK? If you&#8217;ve written at least once the OBJECT and EMBED tags, without copy/paste you may have been noticed that the place of the EMBED tag is a bit strange. Actually after the OBJECT tag, comes the PARAM sequence, that simply defines different parameters for the flash movie. And what looks strange? The &#8230; <a href="/2009/10/30/object-and-embed-tag-position-in-ie/" class="more-link">Continue reading <span class="screen-reader-text">object and embed tag position in IE</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/01/07/object-forget-about-embed-tag/" rel="bookmark" title="OBJECT &#038; &#8230; forget about EMBED tag!">OBJECT &#038; &#8230; forget about EMBED tag! </a></li>
<li><a href="/2009/02/22/html-object-and-embed-tags/" rel="bookmark" title="Html object &#038; embed tags">Html object &#038; embed tags </a></li>
<li><a href="/2009/02/23/object-and-embed-tags-revealed/" rel="bookmark" title="object and embed tags revealed">object and embed tags revealed </a></li>
<li><a href="/2009/06/08/a-tag-doesnt-apply-hover-on-ie6/" rel="bookmark" title="a tag doesn&#8217;t apply hover on IE6">a tag doesn&#8217;t apply hover on IE6 </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>What is OK?</h2>
<p>If you&#8217;ve written at least once the OBJECT and EMBED tags, without copy/paste you may have been noticed that the place of the EMBED tag is a bit strange. Actually after the OBJECT tag, comes the PARAM sequence, that simply defines different parameters for the flash movie.</p>
<h2>And what looks strange?</h2>
<p>The strange thing in all this is that the EMBED tag, which in fact is only one, instead of the case with all the parameters of the OBJECT, is displayed just before the closing of the OJBECT tag.</p>
<h2>Experimenting &#8230;</h2>
<p>What if the embed tag is outside of the OBJECT opening and closing tags. Actually only IE understands this as a problem. Than it displays the move twice!</p>
<p>That&#8217;s why the place of the EMBED is just before closing the OBJECT tag. In that case MSIE doesn&#8217;t &#8220;see&#8221; the EMBED and displays everything correctly!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/01/07/object-forget-about-embed-tag/" rel="bookmark" title="OBJECT &#038; &#8230; forget about EMBED tag!">OBJECT &#038; &#8230; forget about EMBED tag! </a></li>
<li><a href="/2009/02/22/html-object-and-embed-tags/" rel="bookmark" title="Html object &#038; embed tags">Html object &#038; embed tags </a></li>
<li><a href="/2009/02/23/object-and-embed-tags-revealed/" rel="bookmark" title="object and embed tags revealed">object and embed tags revealed </a></li>
<li><a href="/2009/06/08/a-tag-doesnt-apply-hover-on-ie6/" rel="bookmark" title="a tag doesn&#8217;t apply hover on IE6">a tag doesn&#8217;t apply hover on IE6 </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/10/30/object-and-embed-tag-position-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing objects with ExternalInterface from JS to Flex</title>
		<link>/2009/10/29/passing-objects-with-externalinterface-from-js-to-flex/</link>
		<comments>/2009/10/29/passing-objects-with-externalinterface-from-js-to-flex/#respond</comments>
		<pubDate>Thu, 29 Oct 2009 14:48:26 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[flex 3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">/?p=781</guid>
		<description><![CDATA[What if you&#8217;d like to pass an object to Flex To continue the topic of my previous post I&#8217;m just going to add that there&#8217;s a native way to pass objects from JavaScript to Flex&#8217;s actionscript. I&#8217;m not going to describe how to structure a object in JavaScript and/or Flex. Let&#8217;s go directly to the &#8230; <a href="/2009/10/29/passing-objects-with-externalinterface-from-js-to-flex/" class="more-link">Continue reading <span class="screen-reader-text">Passing objects with ExternalInterface from JS to Flex</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/10/28/tips-and-tricks-in-externalinterface-communication/" rel="bookmark" title="Tips and tricks in ExternalInterface communication!">Tips and tricks in ExternalInterface communication! </a></li>
<li><a href="/2010/02/24/storing-javascript-objects-in-html5-localstorage/" rel="bookmark" title="Storing JavaScript objects in html5 localStorage">Storing JavaScript objects in html5 localStorage </a></li>
<li><a href="/2009/07/08/externalinterface-from-javascript-to-ie-firefox/" rel="bookmark" title="ExternalInterface from JavaScript to IE/Firefox">ExternalInterface from JavaScript to IE/Firefox </a></li>
<li><a href="/2010/12/03/javascript-objects-coding-style-reviewed/" rel="bookmark" title="JavaScript Objects Coding Style Reviewed">JavaScript Objects Coding Style Reviewed </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>What if you&#8217;d like to pass an object to Flex</h2>
<p>To continue the topic of my previous post I&#8217;m just going to add that there&#8217;s a native way to pass objects from JavaScript to Flex&#8217;s actionscript.</p>
<p>I&#8217;m not going to describe how to structure a object in JavaScript and/or Flex. Let&#8217;s go directly to the example.</p>
<p>The function in .js file should return something that is object in JavaScript:</p>
<p><strong>.js file</strong></p>
<blockquote>
<pre>function getObject() {
    return { foo : 'bar', zoo : 'tar' };
}</pre>
</blockquote>
<p><span id="more-781"></span>Now, supposing that in Flex there already has been added a callback with ExternalInterface(&#8216;getObject&#8217;, receiveObject); and the as3 function receiveObject looks similar to this:</p>
<p><strong>.mxml or .as</strong></p>
<blockquote>
<pre>private function receiveObject( obj : Object ) : void
{
    Alert.show(obj.foo);
    Alert.show(obj.zoo);
}</pre>
</blockquote>
<p>That outputs respectively &#8220;bar&#8221; and &#8220;tar&#8221;.</p>
<h2>Even more &#8230;</h2>
<p>You can pass from .js to .as array of objects, but than with small change of the code you&#8217;d access the variables:</p>
<blockquote>
<pre>obj[0].foo
obj[1].foo</pre>
</blockquote>
<p>assuming that there are two objects with same properties.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/10/28/tips-and-tricks-in-externalinterface-communication/" rel="bookmark" title="Tips and tricks in ExternalInterface communication!">Tips and tricks in ExternalInterface communication! </a></li>
<li><a href="/2010/02/24/storing-javascript-objects-in-html5-localstorage/" rel="bookmark" title="Storing JavaScript objects in html5 localStorage">Storing JavaScript objects in html5 localStorage </a></li>
<li><a href="/2009/07/08/externalinterface-from-javascript-to-ie-firefox/" rel="bookmark" title="ExternalInterface from JavaScript to IE/Firefox">ExternalInterface from JavaScript to IE/Firefox </a></li>
<li><a href="/2010/12/03/javascript-objects-coding-style-reviewed/" rel="bookmark" title="JavaScript Objects Coding Style Reviewed">JavaScript Objects Coding Style Reviewed </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/10/29/passing-objects-with-externalinterface-from-js-to-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips and tricks in ExternalInterface communication!</title>
		<link>/2009/10/28/tips-and-tricks-in-externalinterface-communication/</link>
		<comments>/2009/10/28/tips-and-tricks-in-externalinterface-communication/#respond</comments>
		<pubDate>Wed, 28 Oct 2009 18:31:06 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[flex 3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[tips & tricks]]></category>

		<guid isPermaLink="false">/?p=778</guid>
		<description><![CDATA[ActionScript and the rest of the world In the past, when ActionScript v2 was widely used, the most common way to interact with the other parts of the web application, whether a page refresh, redirect or JavaScript method call was the as2 method getURL. With the simple getURL(&#8216;javascript:someJSMethod&#8230;&#8217;) the flash movie called the JS function &#8230; <a href="/2009/10/28/tips-and-tricks-in-externalinterface-communication/" class="more-link">Continue reading <span class="screen-reader-text">Tips and tricks in ExternalInterface communication!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/02/09/ie-externalinterface-communication-problem/" rel="bookmark" title="IE &#038; ExternalInterface communication problem">IE &#038; ExternalInterface communication problem </a></li>
<li><a href="/2009/10/29/passing-objects-with-externalinterface-from-js-to-flex/" rel="bookmark" title="Passing objects with ExternalInterface from JS to Flex">Passing objects with ExternalInterface from JS to Flex </a></li>
<li><a href="/2009/03/07/flex-javascript-communication/" rel="bookmark" title="Flex Javascript communication">Flex Javascript communication </a></li>
<li><a href="/2009/07/08/externalinterface-from-javascript-to-ie-firefox/" rel="bookmark" title="ExternalInterface from JavaScript to IE/Firefox">ExternalInterface from JavaScript to IE/Firefox </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>ActionScript and the rest of the world</h2>
<p>In the past, when ActionScript v2 was widely used, the most common way to interact with the other parts of the web application, whether a page refresh, redirect or JavaScript method call was the as2 method getURL. With the simple <strong>getURL(&#8216;javascript:someJSMethod&#8230;&#8217;)</strong> the flash movie called the JS function and everything was OK.</p>
<p>Now in ActionScript v3 where everything looks and it is different, everything about communication between JS and Flash/Flex is done by <strong>ExternalInterface</strong>. The communication can be done in both directions. From JS to Flash and vice versa.</p>
<h2>The ExternalInterface.call</h2>
<p>There are two simple methods implemented by ExternalInteface. The first one is <strong>addCallback</strong> and the second one is <strong>call</strong>. Here I&#8217;m going to write a little more about the second one.</p>
<p>The most common usage is:</p>
<blockquote>
<pre>ExternalInterface.call('jsMethod');</pre>
</blockquote>
<p>where jsMethod is, as you can guess, a JavaScript method. Something like:</p>
<p><strong><em>test.js</em></strong></p>
<blockquote>
<pre>function jsMethod() { alert('test') };</pre>
</blockquote>
<p>A bit different, but yet again simple, is the call to a js function with parameters:</p>
<blockquote>
<pre>ExternalInterface.call('jsMethod', param1, param2);</pre>
</blockquote>
<p>where the javascript function can be:</p>
<blockquote>
<pre>function jsMethod(param1, param2) { alert(param1) };</pre>
</blockquote>
<p>But what I was writing about is really tricky. What if the jsMethod returns a value? Than in the .js file you&#8217;ve the following method:</p>
<blockquote>
<pre>function jsMethod() { return 'foo bar' };</pre>
</blockquote>
<p>and when you try this:</p>
<blockquote>
<pre>var str:String = ExternalInterface.call('jsMethod');
Alert.show(str);</pre>
</blockquote>
<p>you get the alert box with the string &#8216;foo bar&#8217;.</p>
<h2>Where to use it?</h2>
<p>Well this is really useful, because you get the response within the call method, only with the .call instead with .call and than .addCallback. The problem of course appears when you try to use it with AJAX call. Than even if the function returns in the success method of the AJAX call the flash doesn&#8217;t get the response.</p>
<p>Than you simply implement the communication with both .call and .addCallback!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/02/09/ie-externalinterface-communication-problem/" rel="bookmark" title="IE &#038; ExternalInterface communication problem">IE &#038; ExternalInterface communication problem </a></li>
<li><a href="/2009/10/29/passing-objects-with-externalinterface-from-js-to-flex/" rel="bookmark" title="Passing objects with ExternalInterface from JS to Flex">Passing objects with ExternalInterface from JS to Flex </a></li>
<li><a href="/2009/03/07/flex-javascript-communication/" rel="bookmark" title="Flex Javascript communication">Flex Javascript communication </a></li>
<li><a href="/2009/07/08/externalinterface-from-javascript-to-ie-firefox/" rel="bookmark" title="ExternalInterface from JavaScript to IE/Firefox">ExternalInterface from JavaScript to IE/Firefox </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/10/28/tips-and-tricks-in-externalinterface-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ExternalInterface from JavaScript to IE/Firefox</title>
		<link>/2009/07/08/externalinterface-from-javascript-to-ie-firefox/</link>
		<comments>/2009/07/08/externalinterface-from-javascript-to-ie-firefox/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 06:53:53 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[flex 3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[ExternalInterface]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[object]]></category>

		<guid isPermaLink="false">/?p=660</guid>
		<description><![CDATA[ExternalInterface communication with JavaScript The most simple way to describe the case is as if you have the ExternalInterface addCallback in the Flex application like that: flex.mxml ExternalInterface.addCallback("jsFunc", flexFunc); public flexFunc() : void { ... } and in the javascript code you&#8217;ve something like that: file.js function getSwf(movieName) { if (navigator.appName.indexOf("Microsoft") != -1) { return &#8230; <a href="/2009/07/08/externalinterface-from-javascript-to-ie-firefox/" class="more-link">Continue reading <span class="screen-reader-text">ExternalInterface from JavaScript to IE/Firefox</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/03/09/flex-javascript-communcation-example/" rel="bookmark" title="Flex Javascript communcation example">Flex Javascript communcation example </a></li>
<li><a href="/2009/10/28/tips-and-tricks-in-externalinterface-communication/" rel="bookmark" title="Tips and tricks in ExternalInterface communication!">Tips and tricks in ExternalInterface communication! </a></li>
<li><a href="/2009/02/09/ie-externalinterface-communication-problem/" rel="bookmark" title="IE &#038; ExternalInterface communication problem">IE &#038; ExternalInterface communication problem </a></li>
<li><a href="/2009/10/29/passing-objects-with-externalinterface-from-js-to-flex/" rel="bookmark" title="Passing objects with ExternalInterface from JS to Flex">Passing objects with ExternalInterface from JS to Flex </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>ExternalInterface communication with JavaScript</h2>
<p>The most simple way to describe the case is as if you have the ExternalInterface addCallback in the Flex application like that:</p>
<p><strong>flex.mxml</strong></p>
<blockquote>
<pre>ExternalInterface.addCallback("jsFunc", flexFunc);

public flexFunc() : void
{ ... }</pre>
</blockquote>
<p>and in the javascript code you&#8217;ve something like that:<span id="more-660"></span></p>
<p><strong>file.js</strong></p>
<blockquote>
<pre>function getSwf(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
         return window[movieName];
    } else{
         return document[movieName];
    }
}

getSwf('movie').jsFunc();</pre>
</blockquote>
<p>that will execute the <strong>flexFunc</strong> in the flex app.</p>
<h2>Important!</h2>
<p>is very important to have the object/embed tag correct:</p>
<blockquote>
<pre>&lt;object classid="clsid:d27cdb6 ....
&lt;param name="name" value="movie" /&gt;
&lt;param name="allowFullScreen" value="true" /&gt;
&lt;param name="AllowScriptAccess" value="always" /&gt;
&lt;param name="wmode" value="transparent" /&gt;
&lt;param name="flashVars" /&gt;
&lt;param name="src" value="movie.swf" /&gt;
&lt;embed ... name="movie"&gt;&lt;/embed&gt;
&lt;/object&gt;</pre>
</blockquote>
<h2>That doesn&#8217;t work? Where&#8217;s the bug?</h2>
<p>Even it&#8217;s not so clear the bug is present. The getSwf function gets the window[moviename], or document[moviename] depending of which browser is used. But the problem is that both object and embed tags have same name and the selected object is not one but two.</p>
<h2>So there&#8217;s a simple patch</h2>
<p>Name the object embed tags with different names, i.e.</p>
<blockquote>
<pre>&lt;object classid="clsid:d27cdb6e-ae6d-11 ...&gt;
&lt;param name="name" value="movieie" /&gt;
&lt;param name="allowFullScreen" value="true" /&gt;
&lt;param name="AllowScriptAccess" value="always" /&gt;
&lt;param name="wmode" value="transparent" /&gt;
&lt;param name="flashVars" /&gt;
&lt;param name="src" value="movie.swf" /&gt;
&lt;embed ... name="movieie"&gt;&lt;/embed&gt;
&lt;/object&gt;</pre>
</blockquote>
<p>now they are named movieie (for IE) and movieff  (for Firefox) and we must to change a bit the getSwf function like that:</p>
<blockquote>
<pre>function getSwf(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
         return window[movieName + 'ie'];
    } else{
         return document[movieName + 'ff'];
    }
}

getSwf('movie').jsFunc();</pre>
</blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/03/09/flex-javascript-communcation-example/" rel="bookmark" title="Flex Javascript communcation example">Flex Javascript communcation example </a></li>
<li><a href="/2009/10/28/tips-and-tricks-in-externalinterface-communication/" rel="bookmark" title="Tips and tricks in ExternalInterface communication!">Tips and tricks in ExternalInterface communication! </a></li>
<li><a href="/2009/02/09/ie-externalinterface-communication-problem/" rel="bookmark" title="IE &#038; ExternalInterface communication problem">IE &#038; ExternalInterface communication problem </a></li>
<li><a href="/2009/10/29/passing-objects-with-externalinterface-from-js-to-flex/" rel="bookmark" title="Passing objects with ExternalInterface from JS to Flex">Passing objects with ExternalInterface from JS to Flex </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/07/08/externalinterface-from-javascript-to-ie-firefox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>load flash .swf in hidden div</title>
		<link>/2009/04/14/load-flash-swf-in-hidden-div/</link>
		<comments>/2009/04/14/load-flash-swf-in-hidden-div/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 05:23:21 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[loading]]></category>
		<category><![CDATA[ready]]></category>

		<guid isPermaLink="false">/?p=526</guid>
		<description><![CDATA[How you can load a flash file in the background, and show it only if it's completely loaded...<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/04/08/flash-doesnt-load-in-div-with-display-none-style/" rel="bookmark" title="Flash doesn&#8217;t load in div with display:none style">Flash doesn&#8217;t load in div with display:none style </a></li>
<li><a href="/2009/03/05/flex-3-import-swf-symbols/" rel="bookmark" title="Flex 3 import swf symbols">Flex 3 import swf symbols </a></li>
<li><a href="/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/" rel="bookmark" title="javascript: detect browser speed and load the &#8220;slow connection&#8221; site version">javascript: detect browser speed and load the &#8220;slow connection&#8221; site version </a></li>
<li><a href="/2009/02/08/flash-player-with-debugger-issue/" rel="bookmark" title="flash player with debugger issue">flash player with debugger issue </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Well let&#8217;s assume you&#8217;ve a &lt;div&gt; and like to load a .swf flash file into it. We suppose you&#8217;re using swfobject or any other library or even if you don&#8217;t use library that should be a simple thing to do.</p>
<p>But what happens if the &lt;div&gt; has the style property &#8220;display:none&#8221;. Than unfortunately the flash file does not load. You get the file from the server, but when you set the &lt;div&gt; to be &#8220;display:block&#8221;-ed the flash starts the play from the very beggining.</p>
<p>Actually that&#8217;s supposed to be default action. In fact the workaround is like so. You put the &lt;div&gt;, not to be hidden with that &#8220;display:none&#8221;, but to be with 0px width and height. something like that:</p>
<blockquote><p>&lt;div style=&#8221;width:0px;height:0px;overflow:hidden;&#8221;&gt;&lt;/div&gt;</p></blockquote>
<p>The overflow is important &#8211; cause you&#8217;d like to load the swf file into the &lt;div&gt; and if the swfobject.crateSWF or embedSWF is with 100% width and height, the flash will result with zero height and zero width.</p>
<p>So you may put the flash to load in something like that:</p>
<blockquote><p>&lt;div style=&#8221;width:800px;height:600px;&#8221;&gt;&lt;/div&gt;</p></blockquote>
<p>and put that one into the div with overflow hidden. Than the outer &lt;div&gt; will be ivisible but present to the page and the inner one will be with fixed width and height.</p>
<p>Now when the flash loads, or if the user clicks on some part of the page or fires some event, you can simply reset the width and height of the outer &lt;div&gt;. The resulting piece of code will look like:</p>
<blockquote><p>&lt;div style=&#8221;width:800px;height:600px;overflow:hidden;&#8221;&gt;</p>
<p>&lt;div style=&#8221;width:800px;height:600px;&#8221;&gt; the flash goes here with 100% width and height &lt;/div&gt;</p>
<p>&lt;/div&gt;</p></blockquote>
<p>With jQuery that should look as follows:</p>
<blockquote><p>$(document).ready(function() {</p>
<p>$(&#8216;#outer-div&#8217;).css({ width: &#8216;800px&#8217;, height : &#8216;600px&#8217; });</p>
<p>});</p></blockquote>
<p>Now you can load the flash in background, even you can start loading it after everything else is loaded &#8211; i.e. on document ready event of jQuery, so if you have havy computations in that flash you can simple show something else to the user till the flash loads.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/04/08/flash-doesnt-load-in-div-with-display-none-style/" rel="bookmark" title="Flash doesn&#8217;t load in div with display:none style">Flash doesn&#8217;t load in div with display:none style </a></li>
<li><a href="/2009/03/05/flex-3-import-swf-symbols/" rel="bookmark" title="Flex 3 import swf symbols">Flex 3 import swf symbols </a></li>
<li><a href="/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/" rel="bookmark" title="javascript: detect browser speed and load the &#8220;slow connection&#8221; site version">javascript: detect browser speed and load the &#8220;slow connection&#8221; site version </a></li>
<li><a href="/2009/02/08/flash-player-with-debugger-issue/" rel="bookmark" title="flash player with debugger issue">flash player with debugger issue </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/04/14/load-flash-swf-in-hidden-div/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Flash doesn&#8217;t load in div with display:none style</title>
		<link>/2009/04/08/flash-doesnt-load-in-div-with-display-none-style/</link>
		<comments>/2009/04/08/flash-doesnt-load-in-div-with-display-none-style/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 05:42:31 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[flex 3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[load]]></category>

		<guid isPermaLink="false">/?p=477</guid>
		<description><![CDATA[Flash doesn't load in display:none div.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/04/14/load-flash-swf-in-hidden-div/" rel="bookmark" title="load flash .swf in hidden div">load flash .swf in hidden div </a></li>
<li><a href="/2009/02/08/flash-player-with-debugger-issue/" rel="bookmark" title="flash player with debugger issue">flash player with debugger issue </a></li>
<li><a href="/2009/02/10/ie-6-problem-with-flash-z-index/" rel="bookmark" title="IE 6 problem with flash z-index">IE 6 problem with flash z-index </a></li>
<li><a href="/2009/04/24/scroll-the-page-with-javascript/" rel="bookmark" title="Scroll the page with JavaScript">Scroll the page with JavaScript </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Where&#8217;s the problem?</h2>
<p>As it appears if you have flash embed / object tags in a div which is initaly hidden (style=&#8221;display:none&#8221;) cannot be loaded. It means the .swf file is loaded via HTTP but when the div become visible then starts the loading process and the flash starts from the begining.</p>
<h2>Is there a workaround?</h2>
<p>I&#8217;m looking for a workaround which I&#8217;ll share as soon as I find it. If you have a solution please share it with us.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/04/14/load-flash-swf-in-hidden-div/" rel="bookmark" title="load flash .swf in hidden div">load flash .swf in hidden div </a></li>
<li><a href="/2009/02/08/flash-player-with-debugger-issue/" rel="bookmark" title="flash player with debugger issue">flash player with debugger issue </a></li>
<li><a href="/2009/02/10/ie-6-problem-with-flash-z-index/" rel="bookmark" title="IE 6 problem with flash z-index">IE 6 problem with flash z-index </a></li>
<li><a href="/2009/04/24/scroll-the-page-with-javascript/" rel="bookmark" title="Scroll the page with JavaScript">Scroll the page with JavaScript </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/04/08/flash-doesnt-load-in-div-with-display-none-style/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Flex 3 import swf symbols</title>
		<link>/2009/03/05/flex-3-import-swf-symbols/</link>
		<comments>/2009/03/05/flex-3-import-swf-symbols/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 07:30:35 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[flex 3]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[movie clip]]></category>
		<category><![CDATA[symbol]]></category>

		<guid isPermaLink="false">/?p=291</guid>
		<description><![CDATA[Embedding a .swf file into Flex application can be difficult sometimes. Learn how to solve this issue.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/03/01/flex-3-custom-datechooser-2/" rel="bookmark" title="Flex 3 Custom DateChooser">Flex 3 Custom DateChooser </a></li>
<li><a href="/2009/03/18/flex-3-text-editor/" rel="bookmark" title="Flex 3 text editor">Flex 3 text editor </a></li>
<li><a href="/2009/03/15/flex-3-bitmap-with-round-corners/" rel="bookmark" title="Flex 3 bitmap with round corners">Flex 3 bitmap with round corners </a></li>
<li><a href="/2009/02/06/flex-3-custom-preloader/" rel="bookmark" title="Flex 3 Custom Preloader">Flex 3 Custom Preloader </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;d like to embed a .swf file into your Flex 3 application you&#8217;ll probably get into several little problems. The simple task of embedding is clear and well documented in the web. Let&#8217;s assume we&#8217;ve to MovieClip symbols into a single .swf file. What we like to do is to access this two separate symbols within the Flex applications as MovieClip.</p>
<figure id="attachment_292" style="width: 300px" class="wp-caption alignnone"><a href="/wp-content/uploads/2009/03/embed_swf_symbols_1.png"><img class="size-medium wp-image-292" title="embed_swf_symbols_1" src="/wp-content/uploads/2009/03/embed_swf_symbols_1-300x247.png" alt="make a movie clip in your flash" width="300" height="247" srcset="/wp-content/uploads/2009/03/embed_swf_symbols_1-300x247.png 300w, /wp-content/uploads/2009/03/embed_swf_symbols_1.png 796w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption class="wp-caption-text">Make a new MovieClip symbol in your Flash</figcaption></figure>
<p>Make the .swf sample file with both symbols inside. In general it&#8217;s not that hard, just put this into your Flex application code:</p>
<p><code>[Embed(source="embed.swf", symbol="blue")]<br />
private var blue:Class;</code></p>
<p>[Embed(source=&#8221;embed.swf, symbol=&#8221;red&#8221;)]<br />
private var red:Class</p>
<p>Note that you&#8217;ve embed.swf file, which has to be in the same folder as the main .swf of the Flex app, and two symbols named red and blue for the sample. Be very careful when exporting the symbols from the .swf file. Do not forget to export them for actionscript.</p>
<figure id="attachment_293" style="width: 295px" class="wp-caption alignnone"><a href="/wp-content/uploads/2009/03/embed_swf_symbols_2.png"><img class="size-medium wp-image-293" title="embed_swf_symbols_2" src="/wp-content/uploads/2009/03/embed_swf_symbols_2-295x300.png" alt="Don't forget to export the .swf MovieClip for actionscript" width="295" height="300" srcset="/wp-content/uploads/2009/03/embed_swf_symbols_2-295x300.png 295w, /wp-content/uploads/2009/03/embed_swf_symbols_2.png 676w" sizes="(max-width: 295px) 100vw, 295px" /></a><figcaption class="wp-caption-text">Don&#39;t forget to export the .swf MovieClip for actionscript</figcaption></figure>
<p>If not exported like that, you&#8217;ll have trouble accessing them from the Flex app, and that&#8217;s the first problem you can have here.</p>
<figure id="attachment_294" style="width: 300px" class="wp-caption alignnone"><a href="/wp-content/uploads/2009/03/embed_swf_symbols_3.png"><img class="size-medium wp-image-294" title="embed_swf_symbols_3" src="/wp-content/uploads/2009/03/embed_swf_symbols_3-300x212.png" alt="Set the name of the MovieClip exactly as you wish to appear in your Flex application" width="300" height="212" srcset="/wp-content/uploads/2009/03/embed_swf_symbols_3-300x212.png 300w, /wp-content/uploads/2009/03/embed_swf_symbols_3.png 577w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption class="wp-caption-text">Set the name of the MovieClip exactly as you wish to appear in your Flex application</figcaption></figure>
<p>The rest you have to do is to add this two lines of code in Flex:</p>
<p><code>var mc:MovieClip = new blue();<br />
this.addChild(mc);</code></p>
<p>Note that the last line can have something else than &#8216;this&#8217; if there&#8217;s other element to become parent of the imported MovieClip symbol. Here comes the first major problem. As <a title="www.airtightinteractive.com" href="http://www.airtightinteractive.com/news/?p=112" target="_blank">www.airtightinteractive.com</a> describes this technique does not work every time:</p>
<blockquote><p><em>Sometimes when you do this you will get the following error: </em></p>
<p><em><strong>TypeError: Error #1034: Type Coercion failed: cannot convert app_red@12510d1 to flash.display.MovieClip.</strong></em></p></blockquote>
<p>And the author shares his solution which is to add at least 2 keyframes for both movie clips, so that they can be visible as movie clips, if not they will remain visible only as Sprites.</p>
<p>I&#8217;m not as conviced this is the right answer of the question and the right solution. I&#8217;ve experimented with 1 or 2 keyframes and still have the same problem in Flex even if i cast the symbols as Sprite, not MovieClip:</p>
<p><code><span style="text-decoration: line-through;">var mc:MovieClip = new blue();</span><br />
var mc:Sprite = new blue();</code></p>
<p>The solution from Adobes for me is not suficient, cause the movie clips we import (embed) does not serve as images but more like movie clips, which was the task from the beggining. And that&#8217;s what <a title="adobe" href="http://livedocs.adobe.com/flex/3/html/help.html?content=embed_4.html" target="_blank">Adobe</a> says:</p>
<blockquote><p><em>Flex fully supports embedding Flash SWF files. You can embed different types of SWF files.</em><br />
<em>&#8230;</em><br />
<em>To reference a symbol, you specify the symbol parameter:</em><br />
<em>[Embed(source=&#8217;SWFFileName.swf&#8217;, symbol=&#8217;symbolName&#8217;)]</em></p></blockquote>
<p>And again read carefully the note in the Adobe&#8217;s site:</p>
<blockquote><p><em><strong>Note</strong>: Flash defines three types of<br />
symbols: Button, MovieClip, and Graphic. You can embed Button and<br />
MovieClip symbols in a Flex application, but you cannot embed a Graphic symbol because it cannot be exported for ActionScript.</em></p></blockquote>
<p>Here you can be sure that lack of exported for actionscript symbol is not accessible in Flex.</p>
<p>One of the main solutions is to embed the .swf as octet-stream:</p>
<p><code>[Embed(source="embed.swf", mimeType="application/octet-stream")]<br />
private var blue:Class;</code></p>
<p>followed by:</p>
<p><code>var loader:Loader = new Loader()<br />
loader.loadBytes(new blue());</code></p>
<p>And the key point of this will be the lines:</p>
<p><code>var red:Class = loader.contentLoaderInfo.applicationDomain.getDefinition("blue");<br />
var mc:MovieClip = new red() as MovieClip;</code></p>
<p>I hope this can help</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/03/01/flex-3-custom-datechooser-2/" rel="bookmark" title="Flex 3 Custom DateChooser">Flex 3 Custom DateChooser </a></li>
<li><a href="/2009/03/18/flex-3-text-editor/" rel="bookmark" title="Flex 3 text editor">Flex 3 text editor </a></li>
<li><a href="/2009/03/15/flex-3-bitmap-with-round-corners/" rel="bookmark" title="Flex 3 bitmap with round corners">Flex 3 bitmap with round corners </a></li>
<li><a href="/2009/02/06/flex-3-custom-preloader/" rel="bookmark" title="Flex 3 Custom Preloader">Flex 3 Custom Preloader </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/03/05/flex-3-import-swf-symbols/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Download Custom Flex 3 DateChooser</title>
		<link>/2009/03/01/download-custom-flex-3-datechooser-2/</link>
		<comments>/2009/03/01/download-custom-flex-3-datechooser-2/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 08:51:29 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[download]]></category>
		<category><![CDATA[flex 3]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[custom datechooser]]></category>
		<category><![CDATA[datechooser]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">/?p=259</guid>
		<description><![CDATA[To download the date chooser source: click here Please, provide any feedback about the datechooser and feature requests. I&#8217;ll put the component documentation soon.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/03/01/flex-3-custom-datechooser-2/" rel="bookmark" title="Flex 3 Custom DateChooser">Flex 3 Custom DateChooser </a></li>
<li><a href="/2009/02/06/flex-3-custom-preloader/" rel="bookmark" title="Flex 3 Custom Preloader">Flex 3 Custom Preloader </a></li>
<li><a href="/2009/05/20/flex-3-datechooser-utc-issue/" rel="bookmark" title="Flex 3 DateChooser UTC issue">Flex 3 DateChooser UTC issue </a></li>
<li><a href="/2009/03/04/flex-3-custom-preloader-download/" rel="bookmark" title="Flex 3 Custom Preloader Download">Flex 3 Custom Preloader Download </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>To <a title="Flex 3 Custom DateChooser download" href="/wp-content/uploads/2009/02/calendarmxml.zip">download</a> the date chooser source: <a title="Flex 3 Custom DateChooser download" href="/wp-content/uploads/2009/02/calendarmxml.zip">click here</a></p>
<p>Please, provide any feedback about the datechooser and feature requests.</p>
<p>I&#8217;ll put the component documentation soon.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/03/01/flex-3-custom-datechooser-2/" rel="bookmark" title="Flex 3 Custom DateChooser">Flex 3 Custom DateChooser </a></li>
<li><a href="/2009/02/06/flex-3-custom-preloader/" rel="bookmark" title="Flex 3 Custom Preloader">Flex 3 Custom Preloader </a></li>
<li><a href="/2009/05/20/flex-3-datechooser-utc-issue/" rel="bookmark" title="Flex 3 DateChooser UTC issue">Flex 3 DateChooser UTC issue </a></li>
<li><a href="/2009/03/04/flex-3-custom-preloader-download/" rel="bookmark" title="Flex 3 Custom Preloader Download">Flex 3 Custom Preloader Download </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/03/01/download-custom-flex-3-datechooser-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Flex 3 Custom DateChooser</title>
		<link>/2009/03/01/flex-3-custom-datechooser-2/</link>
		<comments>/2009/03/01/flex-3-custom-datechooser-2/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 08:48:55 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[flex 3]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[custom datechooser]]></category>
		<category><![CDATA[datechooser]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[mxml]]></category>

		<guid isPermaLink="false">/?p=256</guid>
		<description><![CDATA[I searched so much about a custom DateChooser component in Flex 3, that I decided to make one by myself. My criteria is to have ComboBoxes for both months and years. I simply merged the ComboBox component with DateChooser and there is the beta release. Please fill free to comment and report any bugs or &#8230; <a href="/2009/03/01/flex-3-custom-datechooser-2/" class="more-link">Continue reading <span class="screen-reader-text">Flex 3 Custom DateChooser</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/03/01/download-custom-flex-3-datechooser-2/" rel="bookmark" title="Download Custom Flex 3 DateChooser">Download Custom Flex 3 DateChooser </a></li>
<li><a href="/2009/02/06/flex-3-custom-preloader/" rel="bookmark" title="Flex 3 Custom Preloader">Flex 3 Custom Preloader </a></li>
<li><a href="/2009/05/20/flex-3-datechooser-utc-issue/" rel="bookmark" title="Flex 3 DateChooser UTC issue">Flex 3 DateChooser UTC issue </a></li>
<li><a href="/2009/03/05/flex-3-combobox-disabled-options/" rel="bookmark" title="Flex 3 ComboBox disabled options">Flex 3 ComboBox disabled options </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I searched so much about a custom DateChooser component in Flex 3, that I decided to make one by myself. My criteria is to have ComboBoxes for both months and years. I simply merged the ComboBox component with DateChooser and there is the beta release. Please fill free to comment and report any bugs or feature requests.</p>
<p>Demo is here:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="450" height="190" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="map" /><param name="bgcolor" value="#ffffff" /><param name="align" value="middle" /><param name="src" value="/wp-content/uploads/2009/02/calendar.swf" /><param name="wmode" value="transparent" /><embed type="application/x-shockwave-flash" width="450" height="190" src="/wp-content/uploads/2009/02/calendar.swf" wmode="transparent" align="middle" bgcolor="#ffffff" name="map"></embed></object></p>
<p>Free download: <a title="Flex 3 Custom DateChooser download" href="/2009/03/01/download-custom-flex-3-datechooser-2/">here<br />
</a></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/03/01/download-custom-flex-3-datechooser-2/" rel="bookmark" title="Download Custom Flex 3 DateChooser">Download Custom Flex 3 DateChooser </a></li>
<li><a href="/2009/02/06/flex-3-custom-preloader/" rel="bookmark" title="Flex 3 Custom Preloader">Flex 3 Custom Preloader </a></li>
<li><a href="/2009/05/20/flex-3-datechooser-utc-issue/" rel="bookmark" title="Flex 3 DateChooser UTC issue">Flex 3 DateChooser UTC issue </a></li>
<li><a href="/2009/03/05/flex-3-combobox-disabled-options/" rel="bookmark" title="Flex 3 ComboBox disabled options">Flex 3 ComboBox disabled options </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/03/01/flex-3-custom-datechooser-2/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Html object &#038; embed tags</title>
		<link>/2009/02/22/html-object-and-embed-tags/</link>
		<comments>/2009/02/22/html-object-and-embed-tags/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 14:31:08 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[active x]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[autohigh]]></category>
		<category><![CDATA[autolow]]></category>
		<category><![CDATA[classid]]></category>
		<category><![CDATA[codebase]]></category>
		<category><![CDATA[embed tag]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html tags]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[java applet]]></category>
		<category><![CDATA[JW FLV Player]]></category>
		<category><![CDATA[movie attribute]]></category>
		<category><![CDATA[Netscape]]></category>
		<category><![CDATA[object tag]]></category>
		<category><![CDATA[Opera browser]]></category>
		<category><![CDATA[pluginspage]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[wmode transparent]]></category>

		<guid isPermaLink="false">/?p=184</guid>
		<description><![CDATA[Why the object and embed tags both are used for putting flash movie in the HTML. What are the specifications about. Which attributes to put on object and which on embed tags.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/02/23/object-and-embed-tags-revealed/" rel="bookmark" title="object and embed tags revealed">object and embed tags revealed </a></li>
<li><a href="/2009/10/30/object-and-embed-tag-position-in-ie/" rel="bookmark" title="object and embed tag position in IE">object and embed tag position in IE </a></li>
<li><a href="/2010/01/07/object-forget-about-embed-tag/" rel="bookmark" title="OBJECT &#038; &#8230; forget about EMBED tag!">OBJECT &#038; &#8230; forget about EMBED tag! </a></li>
<li><a href="/2009/02/09/ie-externalinterface-communication-problem/" rel="bookmark" title="IE &#038; ExternalInterface communication problem">IE &#038; ExternalInterface communication problem </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Maybe almost 90 % of the web developers world wide are using widely the <strong>&lt;embed&gt;</strong> and <strong>&lt;object&gt;</strong> HTML tags, but in the most cases do not understand the semantics and syntax of them.</p>
<p>Very well known is that these tags help to put a flash movie into the HTML, but why they are two, and can they be used in other cases remains unanswered.</p>
<p>These tags, in general, are really most used to put flash movie into the web site, and as anyone can guess they are two cause of the differences in the web, specially between the web browsers. The <strong>&lt;object&gt;</strong> tag helps for the browser who use ActiveX controls to display properly the flash movie. In fact the newest Internet Explorer browsers like 7 version and 8 beta, display the movie correctly even without the <strong>&lt;object&gt;</strong> tag, but not always those flash movies work in the expected manner. Somethimes there are problems with autoplay or something like that. Especially this can be problematic when using some kind of .flv player. In that case (depending from the player) the movie initialize but the required .flv does not load and play. This was the problem I wrote for in my previous post about <a href="/2009/02/20/jw-flv-media-player-issue-under-opera/">Opera and JW FLV Player</a>.</p>
<p>As you may guess the <strong>&lt;object&gt;</strong> tag can handle much more the flash movie, but as many other entities as there are ActiveX controls.</p>
<p>To be more exact the <strong>&lt;object&gt;</strong> tag is for Internet Explorer, while the <strong>&lt;embed&gt;</strong> tag is for Netscape and related to it browsers using Netscape plugin to display a flash movie. More detailed information can be found on Adobe site:</p>
<p><a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_4150">http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_4150</a></p>
<p>All the specification can be found online but more important is to mention the semantics of some of the attributes.</p>
<p>For both of the tags valid attributes are width and height. They can be either pixels or percentage, which are relative from the element containing the object/embed pair, i.e. if the flash is in a div with fixed width of 800px and the object/embed pair is 100% width the movie will became 800px wide.</p>
<p><em><strong>Notice:</strong> some browsers do not calculate the height correctly when the height is set in percentage.</em></p>
<p>For the <strong>&lt;object&gt;</strong> tag only there should be <strong>classid</strong>, <strong>codebase</strong>, <strong>movie </strong>attributes, while for the <strong>&lt;embed&gt;</strong> tag only is <strong>src </strong>and <strong>pluginspage</strong>.</p>
<p>see which attributes are mandatory and which one are not at: <a href="/2009/02/23/object-and-embed-tags-revealed/">object and embed tags revealed</a></p>
<p><strong><br />
</strong></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/02/23/object-and-embed-tags-revealed/" rel="bookmark" title="object and embed tags revealed">object and embed tags revealed </a></li>
<li><a href="/2009/10/30/object-and-embed-tag-position-in-ie/" rel="bookmark" title="object and embed tag position in IE">object and embed tag position in IE </a></li>
<li><a href="/2010/01/07/object-forget-about-embed-tag/" rel="bookmark" title="OBJECT &#038; &#8230; forget about EMBED tag!">OBJECT &#038; &#8230; forget about EMBED tag! </a></li>
<li><a href="/2009/02/09/ie-externalinterface-communication-problem/" rel="bookmark" title="IE &#038; ExternalInterface communication problem">IE &#038; ExternalInterface communication problem </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/02/22/html-object-and-embed-tags/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>
