|
-
Well, I don’t know how to call this problem ..is it a problem with addressing a variable or what…
My main time line has 2 Frames…
The first frame: containing the action of
mov = "mov1";
as it is obvious it sets the Variable named mov a value of mov1
the second frame only stops the main time line.
In the second frame there are 2 movie clips ..
(1) one of them assigned the actions of :
onClipEvent (enterFrame) {
if (Key.isDown(Key.DELETEKEY)) {
// heres the problem of addressing i guess
setProperty (_root._root.mov, _visible, false);
}
}
* expression buttons is pressed
(2) and the other movie clip is named mov1 and the one I want to hide
all I want is when I press the key DELETE… the movie clip mov1 disappear…
I want to do this based on reading the variable value on the root so whenever I change the value of the variable ..it hides a different movie clip.
I am addressing the variable names in different ways… also ..i tried to use EVAL function in different ways…
I don’t know.. why it don’t read the variable mov as its value mov1
Shall I write it like _root(_root.mov) or shall I use the EVAL function(how).. I need some expert !!
Hint:: when I use a button instead .. It reads the variables value
on (release) {
setProperty (_root.mov, _visible, false);
}
BUT if I moved the button inside a movie clip..it does not.. even if I add a one more _root like this _root._root.mov
I guess it is addressing problem..
Someone help me pleeease
-
Try this...replace this line:
Code:
setProperty (_root._root.mov, _visible, false);
with this:
Code:
_root[mov]._visible = false;
(all the setProperty stuff isn't needed).
Hope this helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|