A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Hiding layers and buttons with Actionscript

  1. #1
    Junior Member
    Join Date
    Oct 2001
    Posts
    2
    Hi,

    Can anyone help?

    I need to either:

    Hide a button instance (that is not a movie clip) ie render invisible using AScript

    Or

    Hide a layer using Ascript


    I am sure it is very easy....

    Thanks very much
    Ed

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    119
    click on the button, go to insert>convert to symbol
    (even thought its already a button) and convert it to a movie clip.this wont affect the button. right-click on the button, which is now in a movie clip, and select actions.
    type this in

    onClipEvent(enterFrame)
    {
    this._alpha = 0;
    }

    this makes its alpha go to 0...as you can see. this works too:

    onClipEvent(enterFrame)
    {
    this._visible = false;
    }

    either one should work. good luck.

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