1 Reply Latest reply on Jun 13, 2007 9:56 AM by gallion311

    Hiding & Unhiding Sprite with Lingo?!

      Whats up guys; here's the situation.

      I have some videos that play; the problem is that it's unclear when each video is done playing. So the client wants me to flash the next button once the video in that section is done playing.

      So here's what I have; I set the visibility of the highlighted next button to 0 on the first frame. Then I detect the currentTime of the video and once it reaches the end I set the visibility to 1.

      Works perfectly, the video stops and the next button appears. The problem is that I can't "re-hide" the next button once the user starts the next video clip.

      I tried using the same function as I do in the first frame, but the next button just won't hide. Here's my Lingo:

      First Frame to hide the nextbutton:

      on exitFrame
      sprite("nextbuttonroll").visible = 0

      Lingo to unhide the Next button once a video is done:

      on Exitframe
      if sprite("capitol").currentTime > 5000 then
      sprite("nextbuttonroll").visible = 1
      end if

      Then 1 frame before the next video starts I just pasted that first line again:

      on exitFrame
      sprite("nextbuttonroll").visible = 0

      And it just stays there. It seems like that second function is forever stored in memory and it never wants to re-hide the next button.

      Any ideas? Can I clear the memory using unLoadMember or something?

        • 1. Re: Hiding & Unhiding Sprite with Lingo?!
          gallion311 Level 1
          Jeez...talk about a headache over nothing.

          The problem was that I was viewing it in Director (not the published projector) and for some reason buttons tend to stay in there roll0over state. (something about how Director does it's Window Focusing)

          Anyway, I published the file and it works perfectly.

          So the code above is legit if someone wants to use it.