Alright, this is probably something simple I'm overlooking, so I thought I'd paste here all the details and get some more minds on the problem
I have this in my xml:
<plugin name="history" url="gui/history.swf" backbutton="back_button" fwbutton="forward_button" keep="true" preload="true" />
<plugin name="cap" url="gui/caption.swf" visible="true" align="leftbottom" x="0" y="0" handcursor="false" keep="true" preload="true" />
(...)
<events onxmlcomplete="action(qtvrcursor); plugin[history].register(get(localname)); plugin[cap].upd();" />
This is how history.swf registers itself:
import krpano_as3_interface;
var krpano:krpano_as3_interface;
var plugin:Object;
(...)
function registerEvent(evt:DataEvent):void {
var path:String = evt.data;
plugin = krpano.get(path);
plugin.register = update;
(...)
}
function update(place:String):void {
(...)
}
Display More
And this is how caption.swf registers itself:
import krpano_as3_interface;
import flashx.textLayout.*;
var krpano:krpano_as3_interface;
var plugin:Object;
(...)
function upd():void {
(...)
}
function registerEvent(evt:DataEvent):void {
var path:String = evt.data;
plugin = krpano.get(path);
plugin.upd = upd;
upd();
}
Display More
The base plugin structure, startpluggin, stopplugin and such are *exactly* the same in both plugins (directly copied from the examples and other existing plugins).
Why is it that while history.swf works perfectly, the call plugin[cap].upd(); in the load event fails with the error "WARNING: unknown action command: plugin[cap].upd" ?
Calls to (krpano, not flash) trace from within caption.swf's registerEvent *do not seem to be working*, which means the call to upd would fail because it somehow fails to run registerEvent (!) and therefore never really assigns the upd function?
However, visually speaking, caption.swf is being properly loaded and shows up where it's supposed to show up.
What could be happening here?