Silly question

I cant hide a variable on a clip:

I have a clip who display this :

Name : [name]
Address : [address]
Phone : [phone]

if I want to hide the phone number, how I can do that ?

I’ve tried this :

phone._visible = False

but it doesn’t work.

:frowning:

well …

_visible is a property [size=1]MovieClip._visible Button._visible TextField._visible[/size] so i don’t think you can do that

you’d need to either delete or clear the variable:

delete phone;
// or
phone = "";

or try to put a mask over it, because i dont think you’d want to actually delete the variable…
but why would you want to hide it if you display it ?
other take the length of the string and replace it by *s…

I explain why I will hide this variable :

  1. The same movie can be viewed by user and admin.

  2. Admin can view all variables displayed, and User can view only [name] & [address]. I dont want they can view the [phone].

  3. my variables are loaded with the command “Loadvariablenum”

  4. I have a global variable who say it’s a user or an admin is currently showing the movie.

I have tried to delete phone but it doesn’t work after my loadvariablenum . I have tried phone = “”; but it doesn’t work to.

I am desesperate… :frowning:

try to put the variables into a MC and hide the MC with a setProperty :wink:

Use an if statement.

[AS]if (user == admin){
phone = “number here”;
} else {
phone = “Must be Admin”;
}[/AS]

You check if the user is admin, and if that is true, the phone number shows, but if its false, the phone number box shows “Must be Admin”

Thanks for Your help :smiley: I have found a solution.

Alright.