A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: programatically placed button

  1. #1
    Member
    Join Date
    Nov 2004
    Posts
    35

    programatically placed button

    I want to turn a button invisible when its pressed. I think this will only work if the button is placed programmatically. How can I place a button programmatically (do I need to use a mc button to achieve this?)?
    (The reason for doing this is that I want another button to take the place of the original button when it's pressed)

    Can anyone help me out


    SEb

  2. #2
    Member
    Join Date
    Nov 2004
    Posts
    35
    basically what I am trying to do is something like the VIEW DETAILS button in the PORTFOLIO section on this page


    http://www.arteye.com/arteye.html

    SEb

  3. #3
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Hi...
    Instead of using buttons......
    have a movieclip... (instance name ...mc)...containing 2 movieclips(acting as buttons)...one on frame 1...other on frame 2...
    then put this on first movieclip
    code:
    on (press) {
    _parent._parent.mc.gotoAndStop(2);
    }



    then this on the other..
    code:
    on (press) {
    _parent._parent.mc.gotoAndStop(1);
    }



    this basic fla. demonstrates this happening...
    actions are on the other movieclips(acting as buttons)
    inside the main mc .....

  4. #4
    Member
    Join Date
    Nov 2004
    Posts
    35
    Thanks for the fla its exactly what I was looking for!

    Can anyone help me out with a followup issue:
    When I now press the info button I want my infoTxt_mc to be loaded in on top of the project content similar to the link I pasted above. I have tried this by setting the visibility on and off and also by attaching the mc to a loader_mc when info btn is pressed but cant get this to work. What's a good way to set this up?

    SEb

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