Skip to main content
Known Participant
August 8, 2011
Question

Putting a html swf file on the web

  • August 8, 2011
  • 2 replies
  • 1228 views

Hi this is the last hurdle for me. I created an swf and a HTML output. Localy it works when I double click the html except IE

keeps telling me I need to accept the plug in. Verry annoying. But if I put the HTML and the SWF on the website the HTML is blank no movie.

Can't think what is missing. I cut the HTML down to a minimum as well. Any ideas what would be missing that is needed. Tried the original generated html as well

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>

<title>MovieClip</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>

<body>

<div style="border:solid;height:96px;width:144px">

          <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="144" height="96" id="MovieClip" align="middle">

          <param name="movie" value="MovieClip.swf">

     <object type="application/x-shockwave-flash" data="MovieClip.swf" width="144" height="96">

     </object>

          <embed src="MovieClip.swf" width="96" height="144"></embed>

          </object>

</div>

</body>

</html>

This topic has been closed for replies.

2 replies

Known Participant
August 9, 2011

Ok problem solved but can't fully understand why. I have a text file with the names of each image on a separate line. I split on (/\n/) but there is a rouge end of line character. So I was told by someone here to strip off the last character.

Using the line

MyImages=MyImages.substring(0,MyImages.length-1);

The reason why it doesn’t work on the live site is I am uploading the text file to a UNIX system. Somehow this character is no longer there and what I am doing is stripping of the G in .JPG.  This is strange. Maybe you guys now something about this?

Thanks for all the help

Desmond.

Kenneth Kawamoto
Community Expert
Community Expert
August 9, 2011

Windows uses CRLF characters (carriage return + line feed) for a new line, while Unix/Linux/MacOS X use LF (line feed) character.

It's best to use XML, which does not have this type of issue.

August 8, 2011

You really should be using SWFObject to embed Flash on your page. The code is way more concise, easier to read, easier to use, etc.

Known Participant
August 8, 2011

Ok I am new to this flash stuff. Ok with .NET and C#. So not sure what you mean by SWFObject. I am ussing CS 5.5

and it generates the SWF and HTML. The original generated HTML dosn't work on the website either. Do I need to get CS to produce a difrent output?

TIA

Desmond.

August 8, 2011

Google SWFobject... It's JavaScript and allows you to embed your Flash.