A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [MX] MC and button issues

  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    41

    [MX] MC and button issues

    ive made a quick little app thats wrong and right at the same time.

    What im trying to do is get the user to click a button and a dynamic text increment but the button disappear after the click

    whats working is if i make the clickable area a button it increments the dynmaic text great but when i include this._visible = false the whole screen disapears (all of the objects on all of the layers including the button) as you cant tie actions to buttons (edit mode) i cant do anything

    If i make the clickable area a movie clip the button disappears fine but the dynamic text doesnt increment

    What am i doing wrong/

  2. #2
    Member
    Join Date
    May 2004
    Posts
    60
    Instead of using a button, make it a movieclip. Then you can target your _visible to the button. Currently this._visible = false is targeting your entire movie.

    If you make a button as a movieclip you can do this:

    Code:
    myButton_mc.onRelease = function(){
    this._visible = false;
    }
    Here, this is reffering only to myButton_mc, rather than your entire movie

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