dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: close window button

  1. #1
    Member
    Join Date
    Jul 2003
    Posts
    59

    close window button

    I'm trying to make my "X" close window button make my main MC go to and specific frame and then make it play in reverse until it reaches its first frame.

    Does anybody know the code or way to achieve something like this???

    thanks

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    make a simple search for reverse movement. It's basically: mc.gotoAndStop(mc._currenframe-1);
    in a loop
    gparis

  3. #3
    Member
    Join Date
    Jul 2003
    Posts
    59
    Hey gparis,

    i don't mean to sound like a little, annoying beginner actionscripter, but I looked into other posts from other people and I don't seem to understand how to apply their problems to the one I'm encountering.

    You mentioned I could use a loop, but will that help me do what I'm after which is make a close button order the MC in which it is nested to close itself, or rather playbackwards from a certain poit to give through the animation the appearance that it is closing itself.

    Maybe my question should be: How do web designers achieve to close the window of a MC without it just simply dissapearing but rather doing some other animation or the same animation it had to create itself but in reverse.

    Well hope I'm not annoying you too much with these questions.

    thanks

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    there could be hundreds of way of 'closing' a flash 'window-mc'. It depends on the effect you're after.
    The 'reversed' frames is a good idea. Make the mc reverse its frames with the code i provided (you can use an enterFrame clip event for the loop)
    After that to have it close when it reaches frame 1 is up to you. Either set it's _alpha to 0, or its _visible to false, or make it move out of the stage. It's up to you.
    To know when it reaches the 1rst frame (or last frame of your 'rewind') set a variable to true, then check if that variable (false at the begining of the rewind animation) is true, then do your move.
    gparis

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