2309 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 10+ members
  • Has sold $100+ on Envato Market
  • Has been a beta tester for an Envato feature
+5 more
theflyingtinman says
not that big difference :p I can’t imagine how to build a car, even just a tyre :D but a class is not so out of my hand , hehe

Okay .. so maybe I was exaggerating the scale a bit :) ... but the principle applies: pretty much any driver can drive any car and some drivers have even built their own cars, using ready made parts like engines and tyres ( classes and components :) ) .. but very few drivers could build a good Mercedes or a Ferrari, even given the right parts ;)

1561 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+3 more
dSKY says

small projects procedural programming, big projects oop :)

206 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Canada
+3 more
papashivo says
small projects procedural programming, big projects oop :)

I agree I still don’t see the advantages of building in advanced OO concepts with super classes etc for web projects, unless of course they are hugely data driven.

I use some fairly common self made methods to speed up my code eg a variable toggle method togglevar(myVar);

Switches boolean and string from one state to another and so on.

I have built sites using MVC paradigm and thought I would be able to reuse the code as it was quite modular, but really each new project has to start from scratch.

578 posts
  • Has been part of the Envato Community for over 8 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1+ on Envato Market
+6 more
ryan says
cool, thanks. I have coded in oop in the past but found it to be a huge pain for small projects! maybe i am just stuck in my ways.

I’d say it’s mostly a ‘stuck in my ways’ thing, and that’s not bad, it’s just that OO is a different kind of thinking, and all the techniques don’t tend to reveal themselves as useful and important until you’re working on larger more complicated projects.

That’s my experience with OO. The fact that Flash is timeline based doesn’t lend itself to OO straight out of the box whereas in Java for example you’re starting with OO right from the get-go (the application itself is a Class that gets instantiated and passed arguments).

I’d say that it’s helps to learn by working on existing projects that are OO, or within frameworks that encourage it. I was reading about OO for probably 12 months on and off before I actually tried to use it in a flash project (that project was thought garden, I was contracted to build it and don’t visit it much coz it takes over your damn browser window), and it wasn’t until after using Ruby on Rails for a few months that I actually really got it.

And instead of teaching with Car and Tyre metaphors, it’d probably be helpful to write tutorials and books in real-world metaphors you already understand, like Navigation and ImageGallery :)

And as a challenge, the coolest way to jump right in is put a line like this on the first frame of your timeline:

new ImageGallery(this);

And try to write your entire app in external AS files. This is going back a few years (I’m not sure how Flash is like these days) but that’s what I did, adding and manipulating the whole thing by creating and positioning MovieClips using graphics from the library (do you still have to give MCs names these days in the library?).

Anyway, hope that helps :)

2671 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 50+ items on Envato Market
+5 more
Chuckanucka says

thanks ryan that does help a lot. All the AS3 books i own really push opp so its somthing i am going to try and move over to. One concern i have is selling oop files on flash den, for your average buyer i think this could be pretty scary!

2671 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 50+ items on Envato Market
+5 more
Chuckanucka says
And instead of teaching with Car and Tyre metaphors, it’d probably be helpful to write tutorials and books in real-world metaphors you already understand, like Navigation and ImageGallery :)

agreed, why do books always use silly metaphors, i want some real world examples!

578 posts
  • Has been part of the Envato Community for over 8 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1+ on Envato Market
+6 more
ryan says
thanks ryan that does help a lot. All the AS3 books i own really push opp so its somthing i am going to try and move over to. One concern i have is selling oop files on flash den, for your average buyer i think this could be pretty scary!

Ah it could also be good! Like putting all the configurable variables of your file into one class called Configuration, then all they have to do is edit that one file :)

People buy files off FlashDen to learn how they’re made, as well as use them in their projects (from what I can tell from comments on a lot of the files). So if you’re putting OO files together I reckon people would buy them to learn how they’re structured.

3072 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item featured on Envato Market
+5 more
wickedpixel says

I think oop programming in actionscript comes with the experience gained…
After dozens of code and function systems you will start to see patterns in you work ( Zomg! ...you have entered in the Matrix! :D )... there you will see the oop alternative…
I think that starting & trying to write oop systems from the beginning will only slow you down…
When you will gain some experience in the procedural programming… you will “feel” the oop in your code structure, Neo. :)

2671 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 100+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 50+ items on Envato Market
+5 more
Chuckanucka says
Ah it could also be good! Like putting all the configurable variables of your file into one class called Configuration, then all they have to do is edit that one file :)

I try and do this anyway, by putting the config section on separate layer, external as file or xml file.

I think the problem i have is at the moment i can say change line 51 but in opp it will be go into the com folder, find the gui folder, open mainBtn.as find line 51.. just seems a bit intimidating for buyers, but then i guess they will want to learn! Of course it is impossible to build a config option for everything.

2309 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 10+ members
  • Has sold $100+ on Envato Market
  • Has been a beta tester for an Envato feature
+5 more
theflyingtinman says
And instead of teaching with Car and Tyre metaphors, it’d probably be helpful to write tutorials and books in real-world metaphors you already understand, like Navigation and ImageGallery :)
agreed, why do books always use silly metaphors, i want some real world examples!

Hey .. when I brought up the driving vs. building a car analogy I wasn’t trying to teach anything about oop .. just pointing out the difference between using a class and writing a class because someone claimed that we are all “getting our hands dirty” with oop by using filters! :) I don’t get any grease on my hands when I drive my car (well …maybe my car is a bad example ;) )

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by