Ad hoc flash components
standalone demo
The only requirement is that the component must be coded with ActionScript 3.0 and above. Here is an example:
The difference between a real Flowplayer plugin and a random Flash component is that Flowplayer plugins are developed against and using the Flowplayer API. Think of our control bar plugin for example. It is very tightly integrated to the player. However, there are many things that can be done with ad hoc Flash components:
- their placement, dimensions and opacity can be defined in the configuration
- they can be moved, resized and faded in/out using animations that are triggered by JavaScript
- they can be dynamically loaded at runtime
- they work in fullscreen too. Try it in the demo shown above!
Javascript
Here is our primitive configuration for this plugin:
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.11.swf", {
// use a random Flash component as Flowplayer plugin
plugins: {
hello: {
url: '/media/swf/hello-world.swf',
top: 0,
width: '70%',
height: '70%'
},
// change default skin to "tube"
controls: {
url: "http://releases.flowplayer.org/swf/flowplayer.controls-tube-3.2.11.swf"
}
}
});
Scripting options
The SWF component can be accessed in following way:
var plugin = $f().getPlugin("hello");
And now you can use all available methods that can be found from
Plugin API such as fadeIn(), fadeOut(),
animate() and css(). Possibilities are (again) endless. One example:
var plugin = $f().getPlugin("hello").animate({ width: 50, height: 50 });