Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Quick actionscript 3.0 question

Options
  • 06-05-2010 5:26pm
    #1
    Registered Users Posts: 4,673 ✭✭✭


    So I'm working on a college project that I almost have finished. It's a 2 player card game that I made up but it's loosely based on 21. It's due tomorrow but I'm after running into a small problem.

    When a player goes bust I have a little pop-up (a movie clip that is off the stage but that moves on using x and y values when a player goes bust) to say that they've gone bust. However I cant figure out how to make this pop-up fade away after a certain length of time. I dont want the players to have to x it off. It probably needs to be a timer event or something but I cant get it to work at all.

    Anyone got any ideas??
    Thanks a million!


Comments

  • Registered Users Posts: 8,070 ✭✭✭Placebo


    havent touched flash in a while but

    the movie clip,
    double click it from your library or on stage and fade out the contents in it.

    if you select the contents you will see alpha setting, im assuming u know how to tween this ?

    make new frame [i think f6] further in the time line, then make the alpha 0
    and apply motion tween


    now when the movie clip is created on stage it will dissapper after whatever frame u set [however this will only work if the movie clip is being created on stage i.e not that its out of the stage [grey area] and then drags in - in which case it will be created upon the movie initiation and will be looping the fade animation]

    also what course u doing? not a fan of your username btw, insulting !


  • Registered Users Posts: 2,119 ✭✭✭p


    You can do it with the timeline as Placebo mentioned, or you can create a timer, that does something after a set amount of seconds.

    Check out the Timer class.
    http://blogs.adobe.com/pdehaan/2006/07/using_the_timer_class_in_actio.html
    and
    http://www.ilike2flash.com/2009/07/time-delay-in-actionscript-3.html


  • Registered Users Posts: 4,673 ✭✭✭mahamageehad


    Placebo wrote: »
    havent touched flash in a while but

    the movie clip,
    double click it from your library or on stage and fade out the contents in it.

    if you select the contents you will see alpha setting, im assuming u know how to tween this ?

    make new frame [i think f6] further in the time line, then make the alpha 0
    and apply motion tween


    now when the movie clip is created on stage it will dissapper after whatever frame u set [however this will only work if the movie clip is being created on stage i.e not that its out of the stage [grey area] and then drags in - in which case it will be created upon the movie initiation and will be looping the fade animation]

    also what course u doing? not a fan of your username btw, insulting !

    yup got it working in the end with a timer event. It had to be mainly script, didnt use the timeline at all. Thanks a mil anyways.

    Multimedia second year. Insulting?? :confused:


  • Registered Users Posts: 4,673 ✭✭✭mahamageehad


    p wrote: »
    You can do it with the timeline as Placebo mentioned, or you can create a timer, that does something after a set amount of seconds.

    Check out the Timer class.
    http://blogs.adobe.com/pdehaan/2006/07/using_the_timer_class_in_actio.html
    and
    http://www.ilike2flash.com/2009/07/time-delay-in-actionscript-3.html

    Yup this is what I used in the end thanks!


Advertisement