player gets stuck when i hide a field

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

player gets stuck when i hide a field

Post by problème »

Hello
I put a field in front of a player, when i hide the field with visual effect dissolve, the player gets stuck untill the field disappears

Code: Select all

hide field "field" with visual effect dissolve
or

Code: Select all

wait for 10 seconds
set the visible of field unChamp to false
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: player gets stuck when i hide a field

Post by Klaus »

Bonsoir problème

unfortunately that's the way visual effects work -> completely blocking! :?

Use this workaround to fade the field in/out by using its blendlevel property

Code: Select all

...
## Fade out in 1 secs
repeat with i = 0 to 100 step 10
   set the blendlevel of fld "the one in front of the player" to i
   wait 100 millisecs with messages
end repeat
...
Same for fading in, but in that case repeat from 100 down to 0 :D


Best

Klaus
problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

Re: player gets stuck when i hide a field

Post by problème »

Hello
With your code i have the same problem, the player stay block
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: player gets stuck when i hide a field

Post by Klaus »

Hi problème,

what version are you using on what platform?
Just tested with LC 7.1.1 RC2 and LC 8 dp7 on Mac OS X 10.11.1 and worked as exspected.


Best

Klaus
problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

Re: player gets stuck when i hide a field

Post by problème »

I have LiveCode 7.0.6 | Build 10038 on Windows 8.1
I will download LC 7.1.1


i tried too without "wait", the player block as well

Code: Select all

   repeat with i = 0 to 100 step 0.0001
      set the blendlevel of fld unChamp to i
   end repeat
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: player gets stuck when i hide a field

Post by Klaus »

...STEP 0.0001?
Mon dieu, that will take a whole WEEK to execute! :D
And without a WAIT clause here you will probably need to KILL LC in the task manger, I'm afraid!
Please look up the meaning of the STEP parameter in the dictionary.

Did you try my script at all?
problème
Posts: 77
Joined: Fri Oct 23, 2015 12:03 am

Re: player gets stuck when i hide a field

Post by problème »

Hello,
In fact it was one of my function that blocked the player. otherwise, everything works normally

thanks for the help
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: player gets stuck when i hide a field

Post by Klaus »

OK, but nevertheless you should re-think about "..STEP 0.0001 "! :D
Post Reply