Last active
December 13, 2015 21:08
-
-
Save mattcolman/4975167 to your computer and use it in GitHub Desktop.
Movieclips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@documentMC = @newMovieClip('movieclip_filename', 'MyClassName') | |
# If you enter the class name as the filename you can import the main timeline from the FLA, | |
# unless you have specifically changed the name of the Document class. | |
@mainCnt.addChild @documentMC | |
# **** MONSTER **** # | |
monster = @documentMC.monster | |
monster.onClick = => | |
monster.gotoAndPlay('correct') | |
monster.onAnimationEnd = (key) => | |
console.log 'Monster.animationEnded', key | |
monster.gotoAndStop('correct') | |
# **** SQUARE **** # | |
square = @documentMC.square | |
@tweenMax.to(square, 1, {alpha:0, repeat:-1, yoyo:true}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment