Thursday, 15 January 2015

flash - How to work with buttons in an extended movieclip class -


I think the movieclip enhances the class and in this class there are several buttons. Is present in the FLA and is related to the definition of class, how can I control events from within the class? The following does not work:

  class extends new movie movie clips {var test_btn: button; Function newMovie () {} function test_btn.onRelease () {trace ("pressed button"); }}  

Try to do this,

  Import mx.utils.Delegate; Class Expands New Movie Movieclip {var test_btn: Button; Function Pneumovi () {test_btn.onRelease = Rep. Create (this, Parbutton release); } Button on the function () (trace ("pressed the button"); }}  

No comments:

Post a Comment