SWFObject Slowdown ?

Posted on 2009-05-03
Last Modified: 2013-11-11

I have this code in my HTML:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" width="100%" height="100%" id="fullscreen_ex_8" align="middle">
  <param name="allowScriptAccess" value="sameDomain" />
  <param name="movie" value="g3.swf" />
  <param name="quality" value="high" />
  <param name="scale" value="noscale" />
  <param name="bgcolor" value="#000000" />
  <embed src="g3.swf" wmode="gpu" quality="high" scale="noscale" bgcolor="#000000" width="100%" height="100%" name="fullscreen_ex_8" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="" />

I converted it to use with SWFOBJECT:

<script type="text/javascript">
        // <![CDATA[
            var so = new SWFObject(g3.swf', 'g3', '100%', '100%', '8', '#000000');
            so.addParam('menu', 'false');
                  so.addParam('scale', 'noscale');
                  so.addParam('wmode', 'gpu');
                  so.addParam('quality', 'high');
                  so.addParam('allowScriptAccess', 'sameDomain');
        // ]]>

both work, but there is a significant performance lose with the swfobject version, somehow it is passing some obscure parameters to flash player that cause things to degrade.

my SWF has a lot of screen movement and thus is sensitive to performance

thank you
Question by:moshem
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
LVL 10

Expert Comment

ID: 24291905
My be a cut&paste error, but there is a missing quote  in the first line before g3.swf.
Anyway I don't think it's related with your problem.

What i can see is that in your OBJECT there isn't the wmode parameter, whil in your EMBED or jscript is there.
May be you're testing you app in IE that uses the OBJECT...

Author Comment

ID: 24292271
I need to put it in the object too ?

but it works much faster with the object version, and the swfobject version has the wmode parameter...

Expert Comment

ID: 24292865
There are 3 wmode values : Window, Opaque and Transparent.
In your code you are using a "gpu" value, which is not valid.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 10

Accepted Solution

bugada earned 500 total points
ID: 24293207
I think you can try to remove it from the swobject, and biyik, as of version 10, this is a valid value, but the optimization in somes cases can slow down the execution of the swf.

Just my 2 cents.

Author Closing Comment

ID: 31577325
thank you!

Expert Comment

ID: 24293349
I didn't know, thanks bugada.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JS to redirect to prev page 8 47
AngularJS: ng-repeat 25 56
Add Rows on a Table 8 54
How to count the number of table cells with a custom attribute and class? 7 37
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question