View Full Version : changing a variable inside movie clip?? :S
DeadCell
01-04-2003, 06:01 AM
ok, well what i am trying to do is this, i have a movie clip
links_bg
and inside it i have a variable "show_links" that is set to false
i am trying to set it to true from the _root like this
_root.links_bg.show_links = true;
in an onRelease action... i wont work tho :( *sulks* any idea why? am i doing it wrong?
annexion
01-04-2003, 06:12 AM
How are you setting show_links to false? If it is an onEnterFrame, then no matter how many times you press the button for true, it will revert to false.
Post some code here and we might better be able to work with you.
Good luck.
DeadCell
01-04-2003, 06:24 AM
um, ok..
this is the movie clip:
onClipEvent (load) {
show_links = false;
fade_speed = 20;
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (show_links) {
if (this._alpha<100) {
this._alpha += fade_speed;
}
} else {
if (this._alpha>0) {
this._alpha -= fade_speed;
}
}
}
and the on release action looks like:
on (release) {
if (!links) {
_root.links_bg.show_links = true;
links = true;
} else {
_root.links_bg.show_links = true;
links = false;
}
}
bembino
01-04-2003, 07:19 AM
can you post or e-mail an FLA? flashHelp@xonesix.com
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.