What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
IndieFlashArcade: I’ve heard that from a lot of video tutorials and whatnot recently, but why is it recommended to use MovieClips over Buttons? Is it just that Buttons are redundant when MovieClips can do the same things or is there some other reason?
It’s because MovieClips have a lot of useful functions (or methods) that buttons do not have. You just don’t have the same level of control over it if it’s a Button.
I didn’t make this stuff up, it’s just a best practices thing.
> I didn’t make this stuff up, it’s just a best practices thing.
Yeah, I believe you. I’ve noticed from your posts that you definitely seem to know your ActionScript.
And thanks for posting the tutorial on Buttons. I’ll definitely take it into account in the future.
It depends on the circumstances. Sometimes you dont want those extra methods; and they become baggage; other times they are useful. Generally, its not wise to make use of a heavier class if it contains unneeded functionality that a lighter class doesnt. Most of the general functionality used with MovieClips are also accessible to the button class. They are very similar for the most part; the button class is like a toned down version of the MovieClip class that automatically reacts visually to mouse events without the need to code it.
Yeah that makes sense… I don’t think about the size of the class when I create MoveClips, but mostly it wouldn’t make much of a difference unless it was in a game.
But that’s the way that I’ve been told is the ‘right’ way to make a button. Lately though, in my personal work, I’ve been more focused on creating custom UI with classes (so I can just use one line of code to initialize an entire menu), and I end up using MovieClips anyway.
In many cases Buttons are prollie fine.
Your method is interesting, but I’m still sticking to my method, which I think is a lot quicker to do. My tutorial was meant more for animators rather than ActionScripters anyway, as it doesn’t need as much understanding or work. I personally prefer to use movieclips when I need a button as part of a game :)
It’s not spam, genious boy, it’s a discussion of how you could do it better. Whether or not you use the Button class (which I’ve been told not to do by industry professionals), you should be using dot notation and avoiding use of the
` on( ) `
keyword, because that way of programming is the very outdated, AS 1 way.
My method of making buttons does happen to be more cumbersome, but like I said I don’t even really make buttons that way anymore, I use classes.
Just try making the really cool buttons that you see on many high-end Web sites with the Button class. It works okay for beginners but I’m just trying to help you guys do it better.