Join for FREE | Take the Tour Lost Password?
Shop deviantART for the
holidays and save BIG!
Click here! :holly:
[x]

deviantART

:flirty:
 

how to show/hide movie clip with xml?

[x]  
Shop deviantART for the holidays Click here! :holly:
:icondestructorv1:
Hi, i'm new here. Not totally new in flash (though i still work on flash 8 actionscript 2.0, i still can't get ac 3.0).

Anyways, i am struggling on a script, hope someone could help me out.

i wanna do a flash that reads an xml, in which the xml tells my flash to show or hide movie clips (they have instance names). I've been researching top to bottom for solutions, but can't find the solution. So i did a hard coded version.


//added in the frame

var elights = _root.mc_elights ;
var logo = _root.mc_logo ;
var croom = _root.mc_croom ;

if (elights._visible = true) {
elights._visible = true;
}
if (logo._visible = true) {
logo._visible = false;
}
if (croom._visible = true) {
croom._visible = true;
}


i however, want to do this via xml, so that i could have my programmer colleague create a php to call for this database.

thanks so much, hope i could find the solution asap. :)

PS. sorry if this thread isnt at the correct place, i just dunno where to write this thread.

--
"If you can laugh at yourself, loud and hard, everytime you fall........ people will think you're drunk" - Conan O'Brien, host of The Tonight Show with Conan O'Brien

my gallery [link]

Devious Comments

love 0 0 joy 0 0 wow 0 0 mad 0 0 sad 0 0 fear 0 0 neutral 0 0
:icondestructorv1:
Hi, i'm new here. Not totally new in flash (though i still work on flash 8 actionscript 2.0, i still can't get ac 3.0).

Anyways, i am struggling on a script, hope someone could help me out.

i wanna do a flash that reads an xml, in which the xml tells my flash to show or hide movie clips (they have instance names). I've been researching top to bottom for solutions, but can't find the solution. So i did a hard coded version.


//added in the frame

var elights = _root.mc_elights ;
var logo = _root.mc_logo ;
var croom = _root.mc_croom ;

if (elights._visible = true) {
elights._visible = true;
}
if (logo._visible = true) {
logo._visible = false;
}
if (croom._visible = true) {
croom._visible = true;
}


i however, want to do this via xml, so that i could have my programmer colleague create a php to call for this database.

thanks so much, hope i could find the solution asap. :)

PS. sorry if this thread isnt at the correct place, i just dunno where to write this thread.

--
"If you can laugh at yourself, loud and hard, everytime you fall........ people will think you're drunk" - Conan O'Brien, host of The Tonight Show with Conan O'Brien

my gallery [link]

Site Map