A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: visible question - flash 5

Hybrid View

  1. #1
    Member
    Join Date
    Sep 2001
    Posts
    67
    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

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    83
    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...

  3. #3
    Member
    Join Date
    Sep 2001
    Posts
    67

    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center