Media

Flash content stops working with Flash Player 10

I am doing some work on a new Drupal module at the moment that will add my flash node functions to the content constructor kit (CCK) (see the FlashField project page for details). It had all been working well until today when I installed the Flash Player 10 update, and then the content no longer appeared in Firefox or Safari.

A bit of fault finding pinned it down to using the private file system, and then only private files associated with the FileField module (which my new FlashField module relies on).

Inserting an Aquafadas BannerZest banner in Drupal

The flash banner below is a BannerZest banner, inserted in an iframe. The banner animation is from the Aquafadas website to show that it can be done.

To insert the content on the page you need to upload the banner directory and all its files to somewhere on your webspace. Next create a node, set the input format to full HTML input, and then put something like <iframe name="bzAnimation" src="http://www.yourwesbite.com/files/banner/bzAnimation.html" width="600" height="250" allowTransparency="true" frameborder="0"></iframe>.

View the full node to see the banner in action.

Flash node xml example

A few people have posted over at drupal.org asking about getting flash node working with xml files, for example, as a means of loading content in to media players or image rotators.

Testing xml data loading in to flash

This loads a news item from xml...

The xml file was uploaded via the upload module, and is therefore stored in the Drupal files directory. If the base parameter doesn't point to that location too then the Flash engine can't find the xml file and the content doesn't get loaded.

Flash node macro example

This node is NOT a flash node, but it is displaying some flash content by using a flash node macro. The original flash content is actually in this node.

By using a flash node macro you can add the flash element from a flash node to any other content that has the flash node input filter configured in one of its input formats.

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

A basic flash node

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

This is just a basic flash node and has been created to provide some content for use in this node which demonstrates how a flash node macro can be used.

Using flashvars with flash node (2)

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.
Dynamic flashvars! The first item is a random number between 1 and 100, the second is the current date in Y/m/d format, and the third is your user ID. Note that "anonymous" content is cached so will not be refreshed on every page view, whereas a logged in use will get a fresh page each time.

Using flashvars with flash node (1)

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

To pass flashvars to an swf file that is being generated by flash node simply type the text string in the flashvars field under Advanced flash node options.

In the very simple example above the flashvars field simply contains first=These&second=Are&third=Flashvars.

Using loadSound with flash node

The sound that is playing with this movie is being streamed using the loadSound() function. It is using the base parameter to make sure that the Flash player finds it in the right place.

The ActionScript that enables this is:

// declare a new sound object
mysound = new Sound();

// load the audio into mysound, streaming mode
mysound.loadSound("Maple-Leaf-Rag.mp3", true);

// when the audio finishes the first time through start it again, with 999 loops!
mysound.onSoundComplete = function() {
mysound.start(0,999);
};