Solved

SWF won't scale?

Posted on 2014-01-07
4
517 Views
Last Modified: 2014-03-14
I am trying to play a swf.

This is the default code that Dreamweaver gives me, and it works. The problem is, when I change the width and height to something reasonable, (600x326) the player shrinks, but the content doesn't, so you only see the center 50% of the video.

I have tried adding:
<param name="scale" value="noscale">

Open in new window

But that doesn't do anything.
When the SWF file plays, if I hit right-click, Show All, everything can be seen just fine.

Here's the starter code I am working with.

For the points: add the paran (or whatever I need) to make the content show in the 600x326 player size. Or... show me an alternative way to play this silly swf file.

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1360" height="739">
	  <param name="movie" value="videos/1389146962.swf">
	  <param name="quality" value="high">
	  <param name="wmode" value="opaque">
	  <param name="swfversion" value="8.0.35.0">
	  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
	  <param name="expressinstall" value="Scripts/expressInstall.swf">
	  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
	  <!--[if !IE]>-->
	  <object type="application/x-shockwave-flash" data="videos/1389146962.swf" width="1360" height="739">
	    <!--<![endif]-->
	    <param name="quality" value="high">
	    <param name="wmode" value="opaque">
	    <param name="swfversion" value="8.0.35.0">
	    <param name="expressinstall" value="Scripts/expressInstall.swf">
	    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
	    <div>
	      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
	      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
	    <!--[if !IE]>-->
      </object>
	  <!--<![endif]-->
</object>

Open in new window

0
Comment
Question by:DrDamnit
  • 3
4 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
Comment Utility
Use flowplayer http://flowplayer.org/

http://flash.flowplayer.org/documentation/installation/index.html

<script src="path/to/the/flowplayer-3.2.13.min.js"></script>

Open in new window

<a href="http://www.mywebsite.com/myVideo.flv"
   style="display:block;width:425px;height:300px;"
   id="player">
</a>

Open in new window

<script language="JavaScript">
  flowplayer("player", "path/to/the/flowplayer-3.2.18.swf");
</script>

Open in new window



In the code below is where you will set your width and height

<html>
  <head>
    <title>Wow! This is video</title>
    <script src="path/to/the/flowplayer-3.2.13.min.js"></script>
  </head>
  <body>
    <a href="http://www.mywebsite.com/myVideo.flv"
       style="display:block;width:425px;height:300px;"
       id="player">
    </a>
 
    <script language="JavaScript">
      flowplayer("player", "path/to/the/flowplayer-3.2.18.swf");
    </script>
  </body>
</html>

Open in new window

0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Just checking in... Does using flowplayer make sense or do you want to stick with flash/object?  

I have not used the flash embed in a long time myself and have mostly used flowplayer.   If you have an older version of dreamweaver it gives you the wrong code.
0
 
LVL 32

Author Comment

by:DrDamnit
Comment Utility
I am stuck with an SWF because it is something produced by jing. I really wish it was some other form of video because at least I can grab / transcode, do what I want, but SWF bytecode is a pain....
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
I tested the embed code and it does resize.  Did you change the width and height in both places?  Or did you use dreamweaver to auto generate the embed code?  I think if you use dreamweaver, it will detect the actual size and use it.  Try the code below and see what happens.   Also, does jing allow you to physically resize the video?  The reason you wan to physically resize is the actual file size will shrink and it will load faster.  More importantly, it is possible the video may not look as good as full size especially if you are using text.  

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="326">
	  <param name="movie" value="videos/1389146962.swf">
	  <param name="quality" value="high">
	  <param name="wmode" value="opaque">
	  <param name="swfversion" value="8.0.35.0">
	  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
	  <param name="expressinstall" value="Scripts/expressInstall.swf">
	  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
	  <!--[if !IE]>-->
	  <object type="application/x-shockwave-flash" data="videos/1389146962.swf" width="600" height="326">
	    <!--<![endif]-->
	    <param name="quality" value="high">
	    <param name="wmode" value="opaque">
	    <param name="swfversion" value="8.0.35.0">
	    <param name="expressinstall" value="Scripts/expressInstall.swf">
	    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
	    <div>
	      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
	      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
	    <!--[if !IE]>-->
      </object>
	  <!--<![endif]-->
</object>

Open in new window


Ning is showing a different way to embed http://creators.ning.com/forum/topics/html5-tip-valid-flash-embed-code

It has been a long time since I have used this type of code. I typically have used something like flowplayer.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now