Any Flash component as a plugin Flash plugins - Demo 2 / 9
Introduction
Flowplayer allows you to use any flash component as a "plugin" so that they can be placed inside the player area. The only requirement is that the component must be coded with ActionScript 3.0 and above. Here is an example.
The difference between official Flowplayer plugin and a random Flash compoent is that Flowplayer plugins are communicating with the Flowplayer API. Think of our controlbar plugin for example. It is very tightly integrated to the player and not a separate component. However there are manyt things that can be done with random Flash components too:
- their placement, dimensions and opacity can be defined in the configuration
- they can be moved, resized and fadeded in/out by scripting
- they can be dynamically loaded at runtime
- they work on fullscreen too. try this!
JavaScript coding
Here is our primitive configuration for this plugin
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf", {
// use a random Flash component as Flowplayer plugin
plugins: {
hello: {
url: '/swf/hello-world.swf',
top: 0,
right: 65
},
// change default skin to "tube"
controls: {
url: 'flowplayer.controls-tube-3.1.5.swf'
}
}
});
Scripting possibilities
Above 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(). Possibilites are (again) endless.