-
i am trying to get a movie clip to change from visible to non-visible. heres the scenerio:
i have a button, a movie clip and a dynamic text box.
every time the button is pressed , variable 'a' has 1 added to it
i want the movie clip named 'b' to be visible all the time except when a=3.
the dynamic text is only to show what variable a is equal to.
this is the script i used on the movie clip (this action script is attached to the movie clip)
{if a = 3
this.visible = false
}
{if a = 4
this.visible = true
}
but when i run the movie, the movie is never visible at any value of 'a'
whats wrong?
i would apreciate any help. thanks
-
Just have this code on your movieclip "b" which you want the visibility to change
onClipEvent (enterFrame) {
if (_root.a==3) {
this._visible = false;
} else {
this._visible = true;
}
}
if the variable a is 3 the visibility of the movieclip will be false
_root is used to refer the variables in the main time line
This should work
Regards...
-
YOU ARE A CHAMPION, THANX
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
|