Sie sind nicht angemeldet.

1

Samstag, 15. August 2009, 09:34

Has anyone got some sample code of calling an AS3 function from krpano?

I have tried :-

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import krpano_as3_interface;

var krpano:krpano_as3_interface;

krpano = krpano_as3_interface.getInstance();

function myfunction(p1:String):void {
	trace("myfunction");

}

if (krpano) {
	trace("krpano initialised");
	trace("myfunction = " + myfunction);

	krpano.set("events.myfu", myfunction);
}


And I have tried this syntax also :-

Quellcode

1
2
3
var myfunction:Function = function(p1:String):void {
	trace("myfunction");
}


... but everything I have tried produces the following : "Error #1006: value is not a function."

I am using ActionScript 3 and Flash CS3, and version 1.0.7 of the AS3 Interface for krpano as suggested in this thread: 283.
*cursing*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »michael360« (15. August 2009, 09:53)


2

Dienstag, 18. August 2009, 00:24

Kyle pointed me in the right direction with this - plugins!

Thanks again Kyle.

3

Dienstag, 18. August 2009, 13:53

Hi,

what was the problem?
the code itselfs looked okay...

edit: okay - http://krpano.com/forum/wbb/index.php?pa…D=6961#post6961

best regards,
Klaus