How to Insert a SWF File into a Web Page

Are you struggling to get your website perfect? Today we come to save you effort with this tutorial so that you learn how to insert a SWF file into a web page easily and quickly , as we know that this can be a difficult task when creating a web page with Google Sites , Word Press and other platforms.

What is a SWF file?

The acronym SWF is the acronym for ‘Small Web Format’, and refers to a format of graphic files that can be animated or static , and that are created in the Adobe Flash program. Although this program also allows you to create files in EXE format that can be converted into MP4 online for free.

In the next sections we will explain you step by step how to insert a SWF file into a web page quickly and easily. You should know that there are several ways to do this: the simplest of them is using a WYSIWYG editor, such as Macromelia; and the other is creating the HTML code manually.

These files are executed by Adobe Flash Player , so if you don’t have the latest version of that plugin, you may not be able to view the SWF files online. However, it is very easy to update Adobe Flash Player correctly to its latest version , so this should not be a problem.

Steps to insert a SWF file using a WYSIWYG editor

The WYSIWYG editors (acronym for ‘what you see is what you get’ which in Spanish means ‘what you see is what you get’), such as Microsoft FrontPage and to insert tables into a web page this Dreamweaver , are word processors that display the final result as you write to them.

If you know how to use any of these processors, you will see that inserting a SWF file into a web page will be very easy. Just go to the ‘Insert’ menu and select the SWF file from your hard drive. With this, the editor will generate an HTML code, so you only need to edit the path of the file so that it remains where you want.

Steps to insert a SWF file using a text editor

If you don’t handle WYSIWYG editors you can use a text editor. The difference will be that you will have to write the HTML code from scratch , something that WYSIWYG processors do automatically. Although this is a bit longer way, it is not that complicated. You just have to follow these steps:

  • When creating your SWF file in Flash, you must export it in HTML format before you can create the code later.
  • Find this HTML file on your computer, and right-click to select the ‘Open with’ option. When the new box opens, select NotePad or whatever text editor you have. This will allow you to see the HTML code for your file. You can also write the HTML code in Windows Notepad .
  • Copy this code and paste it into the source code of your website, making sure that it is located where you want it to be.
  • Modify the path of the file, so that it represents its place on your server and upload the files (both HTML and SWF) in the corresponding directories.

Code example

Below we leave you an example of how the code looks. You can copy it to use it, but you must keep in mind that you must modify the file path: in all the places where it says ‘archivoflash.swf’ you must put the name of your file for this to work.

<object type = »application / x-shockwave-flash» data = »file flash.swf» width = »550 ″ height =» 400 ″>
<param name = »movie» value = »file flash.swf» />
<param name = »Quality» value = »high» />
<img src = »noflash.png» width = »550 ″ height =» 400 ″ alt = »Image to replace flash» />
</object>

Another thing that you must modify the code is the size of the file , where it says ‘width’ (which in our example is 550) you must put the width in pixels, and where it says ‘high’ (which in our example is 400), the height . This in order that the dimensions of your file are not altered and it looks properly.

As you can see, inserting a SWF file into a web page is quite an easy task and can be done quickly. It only remains for you to familiarize yourself with this simple process so that your website is impeccable and a success.

 

Leave a Comment