Skip to main content
Known Participant
November 21, 2020
Question

visible property of objects

  • November 21, 2020
  • 7 replies
  • 456 views

Simple question:

I have a button and a text (Tostop the carnage press the Stop button)I want these 2 objects to be invisible first and then either to fade in or to jsut be visible after playing the carnage for 10 seconds 
So I typed in ACtions
Keyframe 1.
stop_btn.visible = false;
stop_txt.visible = false;

 

Keyframe at the end of the frames where the "carnage"happens:

count ++

If (count == 300){
stop_btn.visible = false;
stop_txt.visible = false;
}
(The idea is to let the user see the carnage for 10 seconds and then give him a chance to press "Stop" to end it.

 

But the ábove' did not work at all - it brought out a strange error message after compiling. 
I finally changed the setup so that the button always shows.
But for future experiments - how would an expert solve this problem?

 

Kind regards, William-Michael

 

 

    This topic is closed to new replies. Start a new post to keep the conversation going.

    7 replies

    Legend
    November 21, 2020

    So there's an error message, that presumably tells you exactly what the problem is, but you're going to ignore it and you're not going to tell us what it is.

    Known Participant
    November 22, 2020

    Hi Clay.

    Interesting skull.
    Well the message for turning a button instance  on an off was:
    Scene 1, Layer 'actions', Frame 1, Line 20, Column 4 1050: Cannot assign to a non-reference value.
    Scene 1, Layer 'actions', Frame 1, Line 9, Column 2 1050: Cannot assign to a non-reference value.

     

    One further question:
    Why is it that using a motion tweeen on the same keyframe blocks buttons and user input into textboxes ? 

    William Michael

    Legend
    November 22, 2020

    And the lines of code that the error messages were calling out is WHAT, exactly?

    Known Participant
    November 21, 2020

    Sorry It should, of course, read 

    count ++

    If (count == 300){
    stop_btn.visible = true;
    stop_txt.visible = true;
    }

    Known Participant
    November 21, 2020

    One further question 
    I continually keep losing my stage. And no no CTRl +Z will get it back.
    Is there not any method to get it back - I mean Window is filled with panels - but there is no entry saying "stage".
    Kind regards,

    William Michael (yes, I am new here) 

    Known Participant
    November 21, 2020

    OK - re. the losing of the "stage"'  - I think you have to just continually try to move panels apart - so may be this is how you find a "lost atage".
    William Michael.