4 swfs and applets in wordpress

I use kml_flashembed to embed flash content to my page. Its a really good plugin and I recommend it. But since the this page has a lot of swf sand some of them are really CPU-heavy I don’t want them to load directly. One way of doing it is to change the swf to have an inactive state but that needed some boring code changes. Instead I decided to activate them on click. So I made some small changes to the plugin to be able to send in either a url to an image or an explanation text. the parameters are optional and the plugin is 99% backwards compatible with the origional plugion. If you have javascript enabled but no flashplayer plugin the alt-text is not shown.

The embed text is now:

[ kml_flashembed movie="data/displaceview/displaceView.swf" height="400" width="600" fvars="load_url=data/displaceview/start.swf" clicktext="click to activate"/ ]


[ kml_flashembed movie="data/displaceview/displaceView.swf" height="400" width="600" fvars="load_url=data/displaceview/start.swf" clickimg="data/displaceview/displaceView.jpg"/ ]

Without the extra spaces at the start and end. The changes are not perfect, a style is written to an inner divtag

style="width:'.$width.'px; height:'.$height.'px;border: solid 1px #555;"

You will need an extra div if you want to control the border style with css since the dimensions are written to the div.

Since there are some old, really CPU intensive applets written in Processing on the site I also added a primitive form of applet embedding to the plugin. It only adds the applettags and are not supporting other parameters or check for existence of JRE. The parameters are the applet variable:

[ kml_flashembed movie="data/moviecube/MovieCube_img.jar" height="400" width="700" applet="MovieCube_img" clicktext="click to activate"/ ]

updated source of kml_flashembed.php. The rest of the plugin is kept as it is. All the changes are within lines 160-242. search for $clickimg, $clicktext, $funcmode or $applet.

4 Comments to “swfs and applets in wordpress”

1 Cross-section of video

To view this content, you need to install Java from java.com
This is an application to see the cross-section of a video. Its more then 4 mb so please be patient. Then the cpu will go up to max.
If you dont get the idea follow these simple instructions
1. click on the applet to focus
2. press r to reset to start value
3. press up-arrow to watch the video.
4. hold down space and move the mouse
5, watch the cube from the side. press up and down button to see the cube move through the plan
6. now hold down the mouse and move around to see the cross-section of the videoContact:
please send me comments.

Source code: MovieCube_img.pde, complete source with images MovieCube_img.zip
You also need to convert a video to an image-sequence and place in the data folder. An easy way if you got mplayer is:
mplayer video.avi -vf scale=240:180:0 -vo jpeg

Built with Processing

Look at similar applications at Golan Levins excellent Informal Catalogue of Slit-Scan Video Artworks

One Comment to “Cross-section of video”

4 Processing tree

First click the applet to focus then press any key to grow. Click and drag for rotation

This is an really old applet form the push()- pop() time. If you want to try the code you have to update the source or downgrade to 0.68alpha or something.

Source code
Built with Processing;

4 Comments to “Processing tree”