On-Off button 3 (With variables)

Na de eerdere CaptiWeets over het het ‘pauzeren’ van de tijdlijn en het afwisselend verbergen van buttons leg ik in deze CaptiWeet uit hoe je een object (Caption, SWF etc.) met één button aan en uit kunt zetten. Hiervoor gaan we gebruik maken van Advanced Actions en van een variabelen.

In de variable myCaptionOn houden we bij of de caption met de naam myCaption op het moment wordt getoond. De Advanced Action switch_on_off koppelen we aan de button en ziet er zo uit:

Ook in dit voorbeeld start de slide met een Advanced Action die de variable netjes klaarzet en er voor zorgt dat myCaption in eerste instantie zichtbaar is. Hieronder het resultaat:

Voorbeeld (CP5.0)

  on-off_one_button_with_variable300x200.zip (576,2 KiB, 1.587 hits)

Zie ook:

After the previous  posts  about pausing the timeline and alternate hiding buttons I now explain you can hide/show how an object (Caption, SWF, etc.) with the same button. We’ll use Advanced Actions and a variables.

If the variable myCaptionOn is 1 myCaption is currently displayed. Associate the Advanced Action switch_on_off to the button. Above (Dutch part of this post) you can see the code for the Advanced Action.

 In this example, we start the slide with the  Advanced Action Start that sets the variable and makes myCaption initially visible. You can see the result in the Dutch part of this post.