A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How to do this with Buttons

  1. #1
    Junior Member
    Join Date
    Jul 2004

    How to do this with Buttons

    I am facing two problems with buttons :

    1) My button is at _root level. It is not having any instance name, so writing code on frame is not possible. I want to make it invisible as soon as the player loads.
    If it were a movie clip then i would have written


    this._visible = false ;

    But their is no load event for button...

    2) The second problem is similar. Now instead of making invisible at load of the player, i want the button to be invisilbe at it's click event. So i write :


    this._visible = false ;


    But this doesnot work, instead the _root gets invisible. What's the way out ?

    Thanks. .
    [ *NOTE: I cannot write code on frames, as i have not given any instance name to the objects. ]

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    you must use an instance name (btn) -

    btn.onPress = function(){ btn._visible = false; }

    NOTE: I cannot write code on frames

    why ever not ???

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