Sie sind nicht angemeldet.

1

Dienstag, 1. Juli 2014, 13:38

Json string from plugin to hotspot

Hi everybody.

Please help me to create a proper json string to send it with krpanointerface to other hotspot.

The problem is the following^
1. string is built in fla plugin var stringd:String="{"screen":{"flightindicator":"setnavmodeparams":"takeoff"}}}";
2. I call function of other hotspot

var hotspot:Object = krpano.get("hotspot[display1l]");
hotspot.sendjson(stringd);

3. Nothing happens.

I have tested it when declared and called from krpano XML, that is ok.

May be qouts enetities converted in to real symbols before sending and thus cause an error.

2

Dienstag, 1. Juli 2014, 22:46

The get function only returns values, it does not execute actions.

You need to use the call function, see http://krpano.com/docu/plugininterface/#call. Try:

Quellcode

1
krpano.call("hotspot[display1l].sendjson(" + stringd + ")");
My Krpano plugins: Auto Thumbs - Tooltip - Abs