Sie sind nicht angemeldet.

1

Samstag, 24. Oktober 2020, 11:58

No events getting triggered

Hi everyone,

I am trying to add a test event to my script that calls an action to simply print a log. I tried all different event types but I can't get any to trigger.
Do I need to setup anything prior to use events?

This is my simple test:

<event name="test_event" onresize="action(print_log)" keep="true"/>

<action name="print_log" scope="local">
trace('height=', stageheight);
</action>


*confused*
//thomas

Sergey74

Fortgeschrittener

Beiträge: 193

Wohnort: Russia, Chelyabinsk

Beruf: professional noob

  • Nachricht senden

2

Samstag, 24. Oktober 2020, 12:46

Hello! It's simple

Quellcode

1
<event name="test_event" onresize="print_log();" keep="true"/>
translation difficulties *huh*

3

Samstag, 24. Oktober 2020, 13:09

Still don't work.....

onresize should get triggered when resize the browser window, right?

//thomas

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

4

Samstag, 24. Oktober 2020, 13:39

Hi,

did you try get(stageheight) in the trace?


Tuur *thumbsup*

5

Samstag, 24. Oktober 2020, 14:11

The print_log function works fine if I call it from the startup like : print_log();

So I guess that's not the problem.


*confused*

//thomas

Sergey74

Fortgeschrittener

Beiträge: 193

Wohnort: Russia, Chelyabinsk

Beruf: professional noob

  • Nachricht senden

6

Samstag, 24. Oktober 2020, 17:48

events
translation difficulties *huh*

7

Samstag, 24. Oktober 2020, 21:41

Thank you Sergey74,

event and events makes a big difference.... *rolleyes*


//thomas