Sunday, 5 of September of 2010

Archives from day » 15, January 2009

How to stop internet explorer yellow security bar while loading swf content.

Many times (I even don’t remember) people ask these questions.

1. My swf works fine in mozilla / firefox but not in internet explorer. Why?
2. When I double click a HTML web page to view my flash content (movie), it shows yellow bar at top. Why?
3. How can we remove yellow information bar in IE (internet explorer) while loading my swf content?

….. and so on.

Well the solution is simple and kiddie to those who knows. But what about who is newbie or less knowledge of flash?

Here is an example, how to write HTML code to embed SWF.

<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title>example</title>
<script language=”javascript”>AC_FL_RunContent = 0;</script>
<script src=”AC_RunActiveContent.js” language=”javascript”></script>
</head>
<body bgcolor=”#000000″>
<script language=”javascript”>
if (AC_FL_RunContent == 0) {
alert(“This page requires AC_RunActiveContent.js.”);
} else {
AC_FL_RunContent(
‘codebase’, ‘http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0′,
‘width’, ’290′,
‘height’, ’340′,
‘src’, ‘images/SWFs/myswf‘,
‘quality’, ‘high’,
‘pluginspage’, ‘http://www.macromedia.com/go/getflashplayer’,
‘align’, ‘middle’,
‘play’, ‘true’,
‘loop’, ‘true’,
‘scale’, ‘showall’,
‘wmode’, ‘window’,
‘devicefont’, ‘false’,
‘id’, ‘myswf‘,
‘bgcolor’, ‘#000000′,
‘name’, ‘myswf‘,
‘menu’, ‘false’,
‘allowFullScreen’, ‘false’,
‘allowScriptAccess’,'sameDomain’,
‘movie’, ‘images/SWFs/myswf‘,
‘salign’, ”
);
}
</script>
<noscript>
<object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0″ width=”290″ height=”340″ id=”t3fla” align=”middle”>
<param name=”allowScriptAccess” value=”sameDomain” />
<param name=”allowFullScreen” value=”false” />
<param name=”movie” value=”images/SWFs/myswf.swf” /><param name=”quality” value=”high” /><param name=”bgcolor” value=”#000000″ />    <embed src=”images/SWFs/myswf.swf” quality=”high” bgcolor=”#000000″ width=”290″ height=”340″ name=”myswf” align=”middle” allowScriptAccess=”sameDomain” allowFullScreen=”false” type=”application/x-shockwave-flash” pluginspage=”http://www.macromedia.com/go/getflashplayer” />
</object>
</noscript>

</body>
</html>

Probably this could be your HTML code. {You can use this code for exercise.}

Now, you need ac_runactivecontent to run your javascript. The filename is hilighted in red in above code.  This file will reside along with your HTML file.

See in <HEAD>…

<script language=”javascript”>AC_FL_RunContent = 0;</script>
<script src=”AC_RunActiveContent.js” language=”javascript”></script>

These 2 lines add and enable javascript. You need to have the same js file along with the HTML file.

See <BODY>….

<script language=”javascript”>
if (AC_FL_RunContent == 0) {
alert(“This page requires AC_RunActiveContent.js.”);
} else {
AC_FL_RunContent(
‘codebase’, ‘http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0′,
‘width’, ’290′,
‘height’, ’340′,
‘src’, ‘images/SWFs/myswf‘,
‘quality’, ‘high’,
‘pluginspage’, ‘http://www.macromedia.com/go/getflashplayer’,
‘align’, ‘middle’,
‘play’, ‘true’,
‘loop’, ‘true’,
‘scale’, ‘showall’,
‘wmode’, ‘window’,
‘devicefont’, ‘false’,
‘id’, ‘myswf‘,
‘bgcolor’, ‘#000000′,
‘name’, ‘myswf‘,
‘menu’, ‘false’,
‘allowFullScreen’, ‘false’,
‘allowScriptAccess’,'sameDomain’,
‘movie’, ‘images/SWFs/myswf‘,
‘salign’, ”
);
}
</script>

Now what?

We need your swf that you need to load. Say… your swf name is myswf.swf and it resides in SWFs folder in images folder.

Put images folder along with HTML as shown below.

image

Copy your swf name with relative path and paste in place of blue colored text as per above example. Keep in mind that you don’t need to write swf extension with its file name. Check carefully.

And you know green colored text script very well so I think I don’t need to elaborate this part.

Double click to open the html to load swf content. If everything fine, your SWF will load perfactly without any security (yellow bar) related problem.

Have a nice day!


Cute flipbook / pageflip! Software will be launched very soon.

Hi all,

See this cute flipbook / pageflip example from here. The making software will be launch very soon.

See y.


Do your comment