[_] any chance of a skillswap about flash OOP
Jon Bennett
jmbennett at gmail.com
Wed Oct 17 14:06:08 BST 2007
> 1. Well - lots of the stuff I do have animations in movieclips and other > things which can't be created with the drawing API. So lots of my stuff > is taylor made to suit a particular job. > So if I have to make a video > player, it's easier just to stick and FLVplayer instance in a movieClip, > stick some buttons in there and drop it on the stage. I could put all > the code in an imported bunch of classes - but it's likely that next > time I do a video player, it will by made differently - so unless I make > an OOP video player that encompasses every possible use I could have for > it, It would be quicker to just copy and paste some code and amend it. ahh, ok, well, I've always approached this differently. I would set the symbol to export and give it a linkage id then attach the movie clip (containing the movie player) assign the handlers to each of the buttons via the class that attached the video player then load the video from within the class I pretty much never ever place things directly on to the stage in the timeline, except for very particular jobs which rely on the exact number of frames to have passed, which come to think of it don't need to be done like that now, so empty stage it is for me! > I don't really make applications (where I can see OOP would be really > useful) I would do this for web sites and apps, everything actually, maybe just habit, thought it was the way to do things though. One of the benefits of this is it keeps you code in one place (well, lots of as files!), so you don't have to dig around to find conflicts etc. It also means that your main Controller class can contact all aspects of your app (via the correct classes), perhaps shutting off an audio player when video is started etc etc > 2. Am I right in thinking that those frameworks are just big sets of > classes - when using them, do you just use the methods of the provided > classes or do you extend the classes? bit of both, will answer more deeply later, I have to pop out to my niece's first burfday party! see ya jb -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett