Power Apps | Variables exercise | Use a variable to display a message if a user pauses a video

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

You can learn how to do this exercise if you attend the course listed below!

Software ==> Power Apps  (13 exercises)
Version ==> Latest update
Topic ==> Variables  (1 exercise)
Level ==> Relatively easy
Course ==> Power Apps
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

The idea behind this message is to display a label when a user presses paws on the video they are watching:

Pausing a video

When your users paws the video, a message should appear asking them to press play to resume it. 

 

Although this uses a multimedia file, don't worry - you don't need to know anything about these (the exercise will guide you through).

Start by creating a new app called Stop that cat.  Add a video:

Adding a video

Choose this Insert menu option to add a video player control.

 

Now add the video in the folder shown at the start of this exercise to this video control:

Adding a media file

Choose this option to add a media file (in this case a short video of Annie, the cat).

 

Everything will now be controlled by a variable called IfShowLabel which we'll create and set.  Set these properties:

What Property Set to
The video player control OnPause An action to set the value of this variable to true
The video player control OnStart An action to set the value of this variable to false
The label Visible The value of your variable

When you run the app, pausing the video should display your message, and restarting it should hide it! 

The video only lasts 7 seconds, and wouldn't win any awards.

When you've finished testing your app, save it and close it down. 

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post