A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: one button behind another. Priority question.

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Location
    Barcelona
    Posts
    28

    one button behind another. Priority question.

    Hello everyone,

    I have a button behind a movieclip ( its an arrow behind a door that opens. (www.soulclub.es.) the arrow will be placed where the "page under construction" is and will be a link to the main page.)
    I want to make the arrow button active as link only when the door is open, that is, only when the movieclip is at the last frame.
    Does anyone have an idea how can i do it

    Thanks in advanced

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    use the enabled property -

    button must have an instance name -- ie .. myBtn

    to disable - myBtn.enabled = false;
    to enable - myBtn.enabled = true;

  3. #3
    Junior Member
    Join Date
    Apr 2007
    Location
    Barcelona
    Posts
    28
    How can i tell : "when the playhead is at the last frame of the mc"

  4. #4
    Senior Member
    Join Date
    Mar 2001
    Location
    Location : Location
    Posts
    131
    in the last frame of the MC tell the button it is enabled ...

  5. #5
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    as TechNoiz says .. add code to the last frame of the movieclip

    if the button is on the main timeline, the code in the movieclip
    must include the path back to the main timeline -- _root or _parent,
    and the buttons instance name to control its enabled property.

    //--last frame
    stop();
    _parent.myBtn.enabled = true;

  6. #6
    Junior Member
    Join Date
    Apr 2007
    Location
    Barcelona
    Posts
    28
    It. works

    Thank you very much

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