Tutorials Books Videos Forums

Change the theme! Search!
Rambo ftw!

Customize Theme


Color

Background


Done

Combining DHTML with Flash

by kirupa   | filed under Flash and ActionScript

In my endless pursuit of making Flash more than just a simple animation on a site, I wanted to do something different with a simple animation that made some use of the advanced HTML technologies out there. I came up with this idea while creating a pre-loader for one my clients. Click on the button below for the example:

Click Here For Animation

Pretty cool ehh? To do that, you must simply add this code to the animation's code. The code in Blue is the actual code that is different than that of what Macromedia Flash publishes. I did shorten the code out just a little bit to fit in this location.

<object ID="Flash5"classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="http://active.macromedia.com/flash/cabs/swflash.cab"STYLE="POSITION: absolute; HEIGHT:100%;WIDTH:100%;TOP:5;LEFT:5;VISIBILITY:VISIBLE; ZINDEX:1"width="400" height="400"><param name="movie" value="youranimation.swf"><param name="play" value="true"><param name="loop" value="true"><param name="wmode" value="transparent"><param name="quality" value="best"></OBJECT>

You should add the code in Blue to your pre-existing animations to make your animation look like my example. I highly recommend you NOT TO copy the entire code and add it to your animation.

Explanation:

Limitations:

All things good (in Flash) have some problems following them.

That is all there is to combining some DHTML with Flash. Besides the limitations, this effect can be used for almost anything. The best use that I have found for this effect is in Preloaders. Make the numbers fly in, etc. Also, try dragging the animation. You can drag the animation with your mouse OVER the HTML, and have the animation play from there. Not too bad for a few lines of simple DHTML code.

Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.

Your support keeps this site going! 😇

Kirupa's signature!

The KIRUPA Newsletter

Thought provoking content that lives at the intersection of design 🎨, development 🤖, and business 💰 - delivered weekly to over a bazillion subscribers!

SUBSCRIBE NOW

Creating engaging and entertaining content for designers and developers since 1998.

Follow:

Popular

Loose Ends

:: Copyright KIRUPA 2026 //--