Embed flash elements in website
If you want to embed a Flash element in your website, you can do so using the HTML code. You should work validly to keep your website future-proof
Embed Flash with valid code in website
You should only use valid HTML code for your website, i.e. W3C-compliant code. This ensures that your website and its elements are displayed correctly with the current browsers in the future.
- Add the following HTML code to the desired position on your .HTML or .PHP page (we have divided the HTML code for a better overview):
- // This text is displayed in all browsers that are not called Internet Explorer // You do not have a Flash player installed.
- In point 3 under "value" and in point 4 under "data", replace the element "XY.swf" with the URL of your flash element on the server.
- Then, in points 2 and 4, adjust the values for "width" and "height" to the desired size in which the flash element is to be displayed.
W3C non-compliant alternative for flash elements
You can also include your Flash element in the HTML code with the tag. Although this method is against the standardization efforts of the W3C consortium, it is necessary for the display of Flash objects on older browsers such as Netscape or Firefox. The obsolete command enables older browsers to communicate between ActionScript and JavaScript, thus establishing a LiveConnect interface.
- To do this, add the following HTML code to the desired position on your .HTML or .PHP page (for a better overview, we have divided the HTML code again):
- Replace "XY.swf" with the URL of the flash element and adjust the size of the display to your requirements.
The valid code should be the first choice for today's websites. If you use the second variant, it may be that the element is displayed with older browsers, but your website will eventually experience problems with the display on new browsers. Another practical tip tells you how to create Flash animations. Alternatively, you should consider using the Flash successor HTML5 - this makes it much easier to integrate videos into websites.