I looked for a way to do this, but it looks like the flash player isn't passing the parameters to the plugin SWF's loaderInfo. It may be possible to manually pass these parameters in from the player. There is going to be a way to send data to a plugin through the initialze() method with is call on the PluginInfo. See this spec for more info on how to use initialize() for plugins: http://opensource.adobe.com/wiki/display/osmf/Plugins+Phase+4+Specification.
Note that the method is called initializePlugin() in the spec, but has been changed in source to initialize(). This is a sprint 9 feature, so you'll need to sync to the head, or wait until early next week for the official drop.
"I looked for a way to do this, but it looks like the flash player isn't passing the parameters to the plugin SWF's loaderInfo."
Is this a FlashPlayer problem, or an issue in the way that OSMF loads plugins for security reasons?
You could consider this a flash player problem, however they may have designed it this way.
In OSMF there is a better way, which doesn't lock your plugin into using FlashVars, and works in both the Static and Dynamic plugin use cases:
public function initializePlugin(metadata:Metadata):void
The metadata is passed from the URLResource or PluginInfoResource passed to the PluginManager.loadPlugin(resource) . You can tack on the flash variables here as metadata on a KeyValueFacet.
This feature was introduced in Sprint 9, which will drop in a few days time.
Thanks for your guidance. if i folllow the instruction given in the url
then if any update need to in the flashvars or external parameter then i need to update the player (means i need to recompile the player). If i go with the HTML Flashvars option then i need to update the HTML file. no need to recompile the SWF. So please provide me some right direction to slove this item.
Once again thanks for all.
OSMFPlayer (one of our sample apps) takes parameters from the HTML to determine what piece of media to play, what background color to use, etc. Here's the template HTML:
and here's the root Sprite of the application:
Note that it pulls the parameters from the preloader's LoaderInfo.
I believe the question was "how to access flash variables inside the OSMF plugin(Dynamic plugin)" not a player. The developer will have to pass the flash variables onto the plugin via metadata on the plugin resource for this to work, because like I said above, plugins cannot access flash vars of a parent swf. If this plugin requires these parameters, then they need to form a contract with the player developer for the developer to pass them on. This is important because it works with static plugins as well, whereas there are no loader.parameters for a static plugin.
In general though it's much clearer to have a documented API for your plugin that configures any parameters on you plugin, instead of just relying on flash varables passed from the player.