PDA

View Full Version : Silly question



Dj Dove
March 17th, 2003, 01:25 PM
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.

:(

kode
March 17th, 2003, 02:42 PM
well ..

_visible is a property MovieClip._visible Button._visible TextField._visible so i don't think you can do that

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

delete phone;
// or
phone = "";

mlk
March 17th, 2003, 04:32 PM
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....

Dj Dove
March 18th, 2003, 07:31 AM
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... :(

merita
March 18th, 2003, 07:38 AM
try to put the variables into a MC and hide the MC with a setProperty ;)

lostinbeta
March 18th, 2003, 01:48 PM
Use an if statement.

if (user == admin){
phone = "number here";
} else {
phone = "Must be Admin";
}

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"

Dj Dove
March 18th, 2003, 01:50 PM
Thanks for Your help :D I have found a solution.

lostinbeta
March 18th, 2003, 01:51 PM
Alright.