Tap a button to make a component visible, and leave the button to hide the same component

In a project of mine i want the following task to be done , please help me to do it.

I have a button tapping on which makes a component to show up and tapping it again hides the component.

What i want is that the component should be visible only for the time i am tapping and holding the button and, should hide when i leave the button.

Is it possible to do?

I SHOULD ADMIT THAT I AM NEW TO TASKER SO PLEASE GIVE THE FULL TUTORIAL IF IT IS POSSIBLE USING TASKER!!

It is my first thread so please don't mind any mistakes.