Monday, 17 May 2010

Closing the sticker book

I have made it so the sticker book is displayed when the user answers a question correctly so now I want to make it so the sticker book closes once the user has taken the sticker from the sticker book and placed it onto the island. To do this I went to the actionscript layer on the main timeline and underneath the code to open the sticker book I put the following actionscript:

_root.closeStickerBook = function() {
var yStickerTween:Tween = new Tween(_root.stickerBook, "_y", Regular.easeOut, -72, - 330, 1, true);
};

I then went inside the sticker book movieclip and clicked on a sticker and put the following actionscript underneath the on(release) section:

_root.closeStickerBook()

This was placed on all the stickers.

No comments:

Post a Comment

Followers