A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Doing something when a movie clip has fully played out

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    10

    Doing something when a movie clip has fully played out

    Hey all,

    So i have a problem. Sort of.

    I have a button, when its clicked a movieclip plays which fades the background adds some text to the stage above the main background, and disables the button to do all that (because when the button is hovered over a picture displays and goes over the movie)

    Anyway i was wondering if there was anyway to check if a movie clip has fully played out. So when it reaches its final frame (and the background in my case is fully visible again) the button that was disabled is re-enabled again.

    Hope this makes sense

    EDIT: I'm using ActionScript 2.0 - I was thinking of maybe using a loop and an if statement? But i'm quite new to AS and not sure on the syntax.
    Last edited by Celor; 05-02-2010 at 08:25 AM. Reason: Clarifications

  2. #2
    TheFlashMaster
    Join Date
    Aug 2009
    Posts
    28
    on the last frame of the movieclip add the this code:

    Code:
     this.gotoAndPlay(1);

  3. #3
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    hi again
    you can experiment with:
    actionscript Code:
    buttonname.enabled = true;
    buttonname.enabled = false;

    depeding where you want them you should add

    _root. to refer to somethign in the main timeline
    _parent. to refer to something in the previoustimeline of the object..

    example:
    button.button2.button3

    _root. would be button
    _parent. would be button2.
    might be addicted to flash...
    _______________________________________

  4. #4
    Junior Member
    Join Date
    Mar 2010
    Posts
    10
    Thanks again Steve you're a life saver

    put _root.button.enabled = true;

    on the final frame of my movieclip

    @The FlashMaster - I tried your answer but it just made my movieclip loop - thanks anyway :-)

  5. #5
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    glad to help again.
    might be addicted to flash...
    _______________________________________

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