Source language: Translate to:

"error" is momentarily the value of of a variable

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

"error" is momentarily the value of of a variable

Postby dragon terre » Fri Aug 18, 2006 4:00 pm

I am using the following script in a timer to report the percentage of a video clip played:

[Player3.Position]/[Player3.Length]) * 100 " "0" "percent"

The timer starts with a play button
and stops on page exit. (via the "stop timer when leaving page" checkbox)

When I exit a page. I SetVar [percent] to 0.

Now this works but MOMENTARILY on the new page the value of the variable is the word "error" after which point the set value of 0 shows.

I have tried clearing variables on page exit, but this does not help.
I have tried setting the value to 0 on page enter but this does not help.
One complication is that these items are all in different containers which seems to affect refreshing objects I have noticed.

Does anyone have any ideas.
Many thanks for your expertise.
--Rob
dragon terre
 
Posts: 4
Joined: Sun Sep 25, 2005 8:10 am

Postby beno » Fri Aug 18, 2006 4:11 pm

Hi Rob,

The only idea that comes to my mind is that in a certain moment the value of [Player3.Length] is zero, so here is why the contents of [percent] is Error.

Is it possible that the timer is still running and there is no video associated with Player3? :?

My cent,

beno
User avatar
beno
 
Posts: 678
Joined: Fri Apr 01, 2005 9:03 am
Location: México

had the same thought

Postby dragon terre » Fri Aug 18, 2006 4:29 pm

perhaps checking the "stop timer when leaving page" option is functionally different from stopping the timer in the page exit action area or a gotonext page button?
I will try it and see.
--Rob
dragon terre
 
Posts: 4
Joined: Sun Sep 25, 2005 8:10 am

explicitly stopiing at top of page exit may have fixed

Postby dragon terre » Fri Aug 18, 2006 4:40 pm

explicitly stopiing at top of page exit may have fixed
Page exit actions:
TimerStop "Timer6"
dxStop "[player1]"
dxDestroy "[player1]"
SetVar "[percent]" "0"
SetVar "[progressb]" "0"

So perhaps one should be cautious with the "general properties" way of stopping a timer.
Thanks Beno!
dragon terre
 
Posts: 4
Joined: Sun Sep 25, 2005 8:10 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest