PDA

View Full Version : help creating plugins for flash panorama player


kheftel
11-14-2007, 10:10 PM
hello,
i am trying to create an mp3 player plugin for flash panorama player (the one that came with it doesn't meet my needs). i noticed that many of the included plugins (autorotator, hotspots, etc) let you pass in parameters in the xml file, i.e.

<parameters>
panoName=....
panoType=...
</parameters>
<plugin_name>
pluginVar=....
</plugin_name>

I want to be able to do that for my own plugin. My panoramas are entirely xml-driven so doing something like pano.swf?param=value is not an option. How do I do this? thanx,
kawika

zleifr
11-14-2007, 10:30 PM
put a function in the plugin called newParams(str:String){}

It will be called when hotspots.swf processes the xml and passed everything from <plugin_name> to </plugin_name> including all whitespace, so you'll have to write a parser.

Also, you can use:
function setAttribute (name:String, value:String, time:String=null, type:String=null, onDoneFunction:String=null, onInterruptFunction:String=null, relative:int=0) {}

and address it from any of the other spots with external.plugin_name.param=value

cheathamlane
11-17-2007, 06:03 PM
cool!

is this setAttribute documented somewhere in the FPP docs? or is this stock to AS3?

Scott Witte
11-17-2007, 10:17 PM
Well.... Before you put too much effort into an MP3 player you may want to check Denis's blog from today :D

(I just knew that by the time I finished building my own custom MP3 player Denis would introduce his. Oh, well. It was an education in AS3 at least!)