You are not logged in.

ciul

Trainee

  • "ciul" started this thread

Posts: 149

Location: Colombia

Occupation: Creative developer guy

  • Send private message

1

Friday, January 18th 2013, 11:54pm

Custom Event and Events Dispatching

Hi Krpano friends,

I don't if you have noticed at documentation that events.dispatch action has no description: http://www.krpano.com/docu/actions/#events.dispatch

Klaus explained me a little bit, and...here an example:
http://depanorama.com/A408Wp/2

Regards,
Ciul

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

2

Saturday, January 19th 2013, 7:31am

Hi!

What is the difference instead simple action call.
does it make sense? *blink*

Andrey.
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

ciul

Trainee

  • "ciul" started this thread

Posts: 149

Location: Colombia

Occupation: Creative developer guy

  • Send private message

3

Saturday, January 19th 2013, 1:30pm

@Andrey

In words of Klaus: (from an Email)
"It can be used to dispatch either krpano events or user defined events,
e.g. define:

<events myevent="trace(global myevent);" />
<events name="local1" myevent="trace(local1 myevent);" />
<events name="local2" myevent="trace(local2 myevent);" />

and then call:

Source code

1
events.dispatch("myevent");

then all these events get called.

when you just want too call one function then just call that one,
e.g. events[local1].myevent();
but for such it would be not necessary to use events...
"

Regards,
Ciul

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

4

Saturday, January 19th 2013, 3:21pm

Hi!
Ciul, thanks for your answer

so, If i understand right - if I call
events.dispatch("myevent");

then all "myevent" will be executed?
Am i right?

Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

ciul

Trainee

  • "ciul" started this thread

Posts: 149

Location: Colombia

Occupation: Creative developer guy

  • Send private message

5

Saturday, January 19th 2013, 3:24pm

@Andrey

That's right.