Re: [Flashcoders] How do you code your Flash applications?
sir i have anothe problem. i want to save a movie clip as image(jpeg)on a flash button click any ides pls mail to me - Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
try this, i made it when flash8 was beta.. http://www.m3style.lv/bo/experiments/flash2jpg/ sir i have anothe problem. i want to save a movie clip as image(jpeg)on a flash button click any ides pls mail to me __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Hi Syams, Way left field bro. I have this mental imagery of you falling from the sky into this topic, not knowing where you are. I remember your post about this question, it was answered. The way to do it without serverside programming is to use shared objects. Good luck with it, M. On 2/7/06, syam s [EMAIL PROTECTED] wrote: sir i have anothe problem. i want to save a movie clip as image(jpeg)on a flash button click any ides pls mail to me - Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
You make it sound like I'm forcing it to work. I'm not forcing it, it works as a nice byproduct of how I normally setup and group my movie clips. I see this as being good coding practice. Things that are grouped together share a parent movie clip, making control of the group easier and making depth management easer as each movie clip manages the depths of its children. I hate renumbering depths, and I don't like having to figure out blocks of depths then later finding that I need to move a block later on. This works very cleanly for me, both from architecting movie clips into a logical hierarchy and from preventing annoying depth collisions. I don't deny that it will not work in all situations, nor did I claim so, nor do I know your particular experiences with depth management. I do however have a hard time imagining that manual depth management is a best practice. Anyway, this has gone on long enough. If you haven't gotten the point yet you're never going to. Nonsense, this is a great debate IMHO, and I would love to hear more from others as well. This is something that everyone has to deal with, and I genuinely thought that others would make more use of getNextHighestDepth() and was surprised that you and others avoid it. What are the situations that you have come across where only manual depth management would work? Do you have other ways of managing depth? Nathan http://www.nathanderksen.com On Feb 6, 2006, at 3:10 PM, ryanm wrote: Then I create a placeholder movie clip... You miss the point. Doing something because you can usually find a way to make it work doesn't make it a valid replacement for good coding practices. That you rarely come across a scenario that you can't handle that way only means that there *are* scenarios that won't work that way, and that it is likely that at least some of the time when it does work for you it would still be better (more efficient, more readable, etc) to do it a different way. Also, just because you rarely run into situations that don't work that way doesn't mean that others don't run into them all the time, which means your method probably isn't the best one to be recommending broadly in a thread about best practices. Why not pick a good, standardized way to manage depths that works in every scenario? Anyway, this has gone on long enough. If you haven't gotten the point yet you're never going to. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Just to throw my 2c in, I personally only use getNextHighestDepth(), and as yet haven't had any problems with it. The majority of our screens are already placed in the Flash timeline, I use attachMovie almost only to populate scrollpanes, and loadMovie only into graphic components. To keep our code separated from the design, we will use placeholders / components in the Flash file to define where external elements are loaded. This lets the designers fiddle with what they like, without having to bother me :) Regards, Grant Cox Nathan Derksen wrote: Nonsense, this is a great debate IMHO, and I would love to hear more from others as well. This is something that everyone has to deal with, and I genuinely thought that others would make more use of getNextHighestDepth() and was surprised that you and others avoid it. What are the situations that you have come across where only manual depth management would work? Do you have other ways of managing depth? Nathan http://www.nathanderksen.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Why not pick a good, standardized way to manage depths that works in every scenario? ...tag, you're it! Anyway, this has gone on long enough. If you haven't gotten the point yet you're never going to. ...I don't feel like playing anymore. ok, let's not talk down to others who have good coding practices, even if they're not your coding practices. It's a good discussion. Managing the depths the way Ryan does it allows for a lot of control. getNextHighestDepth can be limiting as you have to predict the appropiate order of display items which can be problematic in a larger application. But the manual method sounds even more limiting, labeling depths that not only are now hard-coded in, but have to be understood and kept track of. I said it before, order matters, relational depths and not numbers. This is something that everyone has to deal with, and I genuinely thought that others would make more use of getNextHighestDepth() I have my own solution, but everyone else I know of uses getNextHighestDepth. Those who don't are the proud exception. Tyler ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
What are the situations that you have come across where only manual depth management would work? Do you have other ways of managing depth? It's not a matter of getNextHighestDepth not working, it's a matter of controlling the depth to avoid unexpected behaviors. I've never had a problem with accidentally creating a movie clip at the same depth as something else, and that's one less thing I have to think about when debugging. The only time when setting depth constants was inconvenient for me was in a windowing system I built, in which case I built a window manager class that managed depth for me. The window manager class kept windows on a timeline where nothing but windows would ever be created, and always kept the depths of the windows consecutive, so when a window was closed it was swapped to the top before closing, and there were never gaps in the depths. I *could* have used getNextHighestDepth and saved myself the trouble of swapping windows to the top before closing them, but then if a user left the app open overnight and used it for several days in a row, they could theoretically open enough windows to hit the 65,535 depth limit and unexpected things could happen. So I went ahead and wrote the extra 10 lines of code to keep the depths consecutive, and circumvented the problem before it ever occurred. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
and you want to add something between the content and the footer, then just add it in between: buildHeader(); buildContent(); buildMoreContent(); buildFooter(); Guess where the new stuff ends up? No figuring out what depth to assign, no re-assigning depths, no collisions. Nice and simple. What if it's not supposed to be built at the same time as the other elements? There are thousands of what ifs that might make your example not work. All of this becomes moot with the AS3 DisplayList, but as long as you have to work with the current depth system, it is a good idea to keep track of where you are putting stuff, rather than depending on execution order to place them in the right depths. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Then I create a placeholder movie clip in the order I intend for it to go, then put the new movie clips in that clip later. The parent clip holds the depth, so no matter how many child clips I create, they are always ordered relative to the rest of the content as intended. I always group related content into its own movie clip to simplify moving/animating/hiding the content anyways. I rarely come across scenarios where a combination of movie clip organization and getNextHighestElement do not work as intended. Nathan http://www.nathanderksen.com On Feb 5, 2006, at 1:33 AM, ryanm wrote: and you want to add something between the content and the footer, then just add it in between: buildHeader(); buildContent(); buildMoreContent(); buildFooter(); Guess where the new stuff ends up? No figuring out what depth to assign, no re-assigning depths, no collisions. Nice and simple. What if it's not supposed to be built at the same time as the other elements? There are thousands of what ifs that might make your example not work. All of this becomes moot with the AS3 DisplayList, but as long as you have to work with the current depth system, it is a good idea to keep track of where you are putting stuff, rather than depending on execution order to place them in the right depths. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
getNextHighestDepth()+10*152/36%23*Math.random()*362; LOL ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
The whole idea is that you keep things at *predictable*, and whenever possible explicitly defined, depths so that things are easy to manage. If you need getNextHighestDepth, that means you don't know what the current highest depth being used is, and that means you aren't in control of the z-depth of your objects. That's a bad thing. Yes, keep things predictable, and easy to manage. There are only two reasons you need control over the z-depth of your display object: 1) to visually layer your objects for appropiate overlapping of the items relative to each other. (usually after you z-position your objects to begin with you don't touch them again except in the case of floating windows or similar, which requires a 'put me on top' behavior) 2) to keep from accidently removing a display object through duplicate depths. I've also always had to know exactly what depths my display objects were, as I am generally more of the control friek. But I realized that I also lay out a lot of my visual elements in the Flash IDE and never seemed to care about the actual depth # in that setting. It was enough to know how everything was z-ordered the way I wanted in relationship to each other. I finally made my own DepthManager, which provides for extreme depths for cursors and tool-tips like MM's vs2 components, but without screwing up getNextHighestDepth() for those who would still use it. ( API: MovieClip.bringToFront(); MovieClip.bringForward(); MovieClip.sendBackward(); MovieClip.sendToBack(); where MovieClip.bringForward(); MovieClip.sendBackward(); can have one parameter, either of type MovieClip or type Number MovieClip: brings the calling MC directly in front of the argument MC, or sends directly behind Number: brings or sends calling MC forward or backward x number of steps. In the case of a 0, bringForward(0) would bring the MC to the front, sendBackward(0) to the back. In the case of a negative number, bringForward(-2) would bring the MC to the front minus two, or 3rd from the top of the visual stacking order. this provides for complete control in arranging visual objects in any order, relative to each other by name and/or by stacking order. I've never needed to know or care about keeping track of depth numbers since, though that doesn't mean I don't keep track of z-order (relational). And frankly I don't have the time or patience anymore to always be managing depth details when there's so much more to worry about. I would hate having all of my classes cluttered with two properties for every one visual object. private var vScroll:ScrollBar; private var vScrollDepth:Number; I'll try and get my code cleaned up a bit (I've been bad and not fully commented the class) for anyone interested. It will still allow you to set depths explicitly, as well as a padding that is currently at 2 or 3, but could be changed to 10. To be honest, I haven't yet found an instance where I've needed the depth number explicitly, but it's available. This and other classes that simplify implementation are one of the best ways to keep your code clean. Tyler ps oops, didn't realize I wrote so much. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Ya like prototyping, XP style spike solutions are a very good idea. Reach a proof of concept prototype asap. Do it dirty, do it by stealing, do it whichever way you can do it as long as it's fast. And from the experiences garnered during this spike, a better solution of the problem can be deducted. It feels awful planning to do something you haven't done before, so a minimum of a day or two just for experimenting with solutions and learning about the real scope of the problem is pretty much a given for me at work these days. Then again i haven't worked on anything small and quick in years. I miss the quick stuff :( year-long flashdev on the same project gets so demotivating... But i digress. Important to remember that people, at least most people, are monkeys that like playing and pushing and pulling and kicking stuff. Feeling the texture of a surface will tell you more about it than any picture. ryanm wrote: After spending a couple of hours, tracing my codes , pulling my hair out, and smoking 2 packets of cigarettes, I felt that rewriting it from the scracth was a better way. So, I did that and the result was satisfying. However, I think working twice on the same codes is not good at all. So here I am, asking for your guidance about how to code/design Flash applications (not only Flash sites) efficiently, as simple as possible, without making things overcomplicated. Or maybe it is just a matter of experience? Planning, that's all. Work it out in your head, on paper, on a whiteboard, whatever, before you write the first line of code. If you are unsure about how something will work, prototype it. Don't get hung up in the details, just test whatever it is you need to test, and figure out how to make it work how you want, and then go back to planning. Once you know how it all should work, writing the code is more like taking dictation than experimenting. As with anything, the more complex the app, the more necessary good planning becomes. If it's a quickie, one-off interactive ad, maybe all you need is to scribble out a few diagrams on a whiteboard for 15 minutes. But if it's a large-scale application, you might need several months of planning resulting in a substantial document that describes what components are to be built, how they work, and how they integrate. Once you have a good plan, though, writing clean, efficient code is easy. Even with good planning, there will be times when things don't work out as expected and you have to rewrite some code. But with good planning, you usually don't have to rewrite the whole thing. That is another advantage of that whole OOP thing that many people turn their noses at. One of the major benedfits of using OOP techniques is that it often saves you from having to rewrite the whole thing, and instead you may only have to rewrite a single function, class, or component, while the rest of the app works just like it is. The bottom line, though, is that you answered your own question. After you spent a few hours making sense of exactly what you wanted to accomplish, you found a much better way to do it. The question you need to ask is if you can put those couple hours at the beginning of the project, and skip over the whole first draft completely. Two hours up front to save you 8 hours of writing code that will end up in the trash anyway is a 63% increase in efficiency (assuming it took 8 hours both times you wrote it). It *more* than cuts your development time in half, because you spent those 2 hours working out how to build the thing either way. And I'll bet it was much faster to write the second time (when you really knew what you wanted to accomplish and how to accomplish it), too, wasn't it? ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
getNextHighestDepth() is your friend :-) Nathan http://www.nathanderksen.com On Feb 3, 2006, at 2:05 AM, ryanm wrote: Another little bit of advice you may find useful, don't put depths right next to each other, leave room between them. When developing a UI, I often put them 10 depths apart, as in navigation container at 10, content container at 20, footer container at 30, etc, instead of at 1, 2, and 3. That way, if I need to add a new section, or if I need to drop in additional elements like a scrollbar, etc, I have a depth available without having to go through the code and increment all the subsequent depths. Since there are 65k depths available and I rarely use more than a dozen on any given timeline, I figure spacing them out is safer than putting them right next to each other. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
Yeah, the sudden shut downs has frustrated me enough times that I just plain stopped using it, even though it's a better editor than SciTe Flash. Jason Merrill | E-Learning Solutions | icfconsulting.com -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Nathan Derksen Sent: Friday, February 03, 2006 11:04 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Yah, I really like it too, but it does the same thing for me. I save constantly anyways, so I rarely lose anything. I have yet to get the Mac version to actually run, which is a shame. Nathan http://www.nathanderksen.com On Feb 2, 2006, at 9:12 PM, Merrill, Jason wrote: I love Sepy, except for the fact that it seems to have a memory leak as it keeps shutting down every now and then with no warning, causing me to lose whatever work I had not saved - even though I have the latest version. It did it in the previous version too. Maybe its just an anomoly and doesn't happen to anyone else. For that reason, I went back to SciTE|Flash and the Actionscript editor. Eclipse was just too much for me, (though in Flexbuilder 2, its' great) - it's great for what it does if you're at or almost at guru level and can figure out all those project workspaces and junk, but sometimes, I just want to write a class and be done with it. Anyway, Anggie, I think maybe what I was getting at, (and honestly I'm very sorry if my little joke about it being a can of worms somehow made you feel bad), was that perhaps you could sharpen the question a little more so as to be not quite so broad. What is an example of a specific problem you're trying to solve other than write clean code? I guess when I saw your question, my thought was, where would anyone begin to answer that question effectively without writing a book on the subject. Could you give an example of something you've struggled with, which maybe people here could assist you in designing it better, making it more efficient? It probably won't be me that will help though, I'm still trying to get better at this stuff myself. Jason Merrill -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bjorn Schultheiss Sent: Thursday, February 02, 2006 10:09 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] How do you code your Flash applications? 9-5 I've been working on the same Flash RIA for the last 3 months. For this I have adopted to Sepy as this is what the rest of the dev team are using. Prior to that I was an Eclipse / MTASC k.i.d. Though when I get home and the collar comes and I'm UNLEASHEDtm into the flex beast that lays dormant during the day time within Flash Lemming. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 1:58 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Are you actually deploying Flex 2 applications? Doesn't it still require the alpha/beta Flash 8.5 player? Bjorn Schultheiss wrote: The enlightened Lemming would also like to add some comments. /* * Begin * * Flex 2 kicks ass. Any app dev I will work with flex. * Any GUI component / animation works I'll use Flash * * Thank you * * The end */ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 1:44 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Don't feel bad Anggie, I think it is an interesting topic that is worthy of discussion. The problem is that best practices are quite subjective, and as such some people feel the need to be offended at alternative suggestions :) Of course, the method I use (Eclipse/MTASC) really is The Best Practice, as in my infinite wisdom and experience have found that every other method is simply inferior, and only suitable for ignorant lemmings. You're all lemmings, you hear me!! ;) Regards, Grant Cox Anggie Bratadinata wrote: On 2/3/06, Mark Winterhalder [EMAIL PROTECTED] wrote: (to open) a can of worms, idiom: to ask for general stylistic advice on a professional mailing list, often resulting in contradicting advises that turn into flame wars, ending with somebody crying and repeated demands for the thread to be discontinued. Ugh, I didn't mean to start another flame war. I just wanna learn from you, folks I'm sorry if my question was considered a can of worms. If there's any Indonesian Flash mailing list that is as good as this one, I'd turn to them instead, keeping the worms in Indonesia. -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com www.nextrand.co.id
RE: [Flashcoders] How do you code your Flash applications?
It's not when you don't want the movieclip to be on the highest depth. Scott -Original Message- From: [EMAIL PROTECTED] on behalf of Nathan Derksen Sent: Fri 2/3/2006 11:07 AM To: Flashcoders mailing list Cc: Subject:Re: [Flashcoders] How do you code your Flash applications? getNextHighestDepth() is your friend :-) Nathan http://www.nathanderksen.com On Feb 3, 2006, at 2:05 AM, ryanm wrote: Another little bit of advice you may find useful, don't put depths right next to each other, leave room between them. When developing a UI, I often put them 10 depths apart, as in navigation container at 10, content container at 20, footer container at 30, etc, instead of at 1, 2, and 3. That way, if I need to add a new section, or if I need to drop in additional elements like a scrollbar, etc, I have a depth available without having to go through the code and increment all the subsequent depths. Since there are 65k depths available and I rarely use more than a dozen on any given timeline, I figure spacing them out is safer than putting them right next to each other. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Surprised at the lack of support for Primalscript on this list :) It's easily the most comprehensive and solid scripting IDE out there, and for mid to large scale flash development i don't see how i could do without it. In particular the dynamic code completion and code hinting for your own methods as you write them is really really nice to have. Another thing that's nice about something NOT being open source and NOT being modified by every geek on the block is that you have actual customer support heh. Like when i first tried out Primalscript 3 and found that it handled alt gr keys in such a way as to make scripting near-impossible on norwegian keyboards (alt gr+7 through alt gr+0 for brackets and curly braces, and the alt gr key was invariably setting keyboard focus to the menu bar). I notified them, immediatly got a message back that they had ordered a norwegian keyboard and was going to fix it asap. Was fixed within the week. Raw. Never caught on to se|py unfortunately, mostly because i change the colors on my code highlighting to run on a black background (black with light grey letters is easier on my eyes in the long run. Less staring at the sun), and se|py has line highlighting that's black, making the current line invisible ;P Couldn't work with that. Funny how simple i am. - Andreas Nathan Derksen wrote: Yah, I really like it too, but it does the same thing for me. I save constantly anyways, so I rarely lose anything. I have yet to get the Mac version to actually run, which is a shame. Nathan http://www.nathanderksen.com On Feb 2, 2006, at 9:12 PM, Merrill, Jason wrote: I love Sepy, except for the fact that it seems to have a memory leak as it keeps shutting down every now and then with no warning, causing me to lose whatever work I had not saved - even though I have the latest version. It did it in the previous version too. Maybe its just an anomoly and doesn't happen to anyone else. For that reason, I went back to SciTE|Flash and the Actionscript editor. Eclipse was just too much for me, (though in Flexbuilder 2, its' great) - it's great for what it does if you're at or almost at guru level and can figure out all those project workspaces and junk, but sometimes, I just want to write a class and be done with it. Anyway, Anggie, I think maybe what I was getting at, (and honestly I'm very sorry if my little joke about it being a can of worms somehow made you feel bad), was that perhaps you could sharpen the question a little more so as to be not quite so broad. What is an example of a specific problem you're trying to solve other than write clean code? I guess when I saw your question, my thought was, where would anyone begin to answer that question effectively without writing a book on the subject. Could you give an example of something you've struggled with, which maybe people here could assist you in designing it better, making it more efficient? It probably won't be me that will help though, I'm still trying to get better at this stuff myself. Jason Merrill -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bjorn Schultheiss Sent: Thursday, February 02, 2006 10:09 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] How do you code your Flash applications? 9-5 I've been working on the same Flash RIA for the last 3 months. For this I have adopted to Sepy as this is what the rest of the dev team are using. Prior to that I was an Eclipse / MTASC k.i.d. Though when I get home and the collar comes and I'm UNLEASHEDtm into the flex beast that lays dormant during the day time within Flash Lemming. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 1:58 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Are you actually deploying Flex 2 applications? Doesn't it still require the alpha/beta Flash 8.5 player? Bjorn Schultheiss wrote: The enlightened Lemming would also like to add some comments. /* * Begin * * Flex 2 kicks ass. Any app dev I will work with flex. * Any GUI component / animation works I'll use Flash * * Thank you * * The end */ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 1:44 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Don't feel bad Anggie, I think it is an interesting topic that is worthy of discussion. The problem is that best practices are quite subjective, and as such some people feel the need to be offended at alternative suggestions :) Of course, the method I use (Eclipse/MTASC) really is The Best Practice, as in my infinite wisdom and experience have found that every other method is simply inferior, and only suitable for ignorant lemmings. You're all lemmings, you hear me
Re: [Flashcoders] How do you code your Flash applications?
No, but what Ryan describes is exactly what getNextHighestDepth() is for. Nathan http://www.nathanderksen.com On Feb 3, 2006, at 8:19 AM, Scott Hyndman wrote: It's not when you don't want the movieclip to be on the highest depth. Scott -Original Message- From: [EMAIL PROTECTED] on behalf of Nathan Derksen Sent: Fri 2/3/2006 11:07 AM To: Flashcoders mailing list Cc: Subject:Re: [Flashcoders] How do you code your Flash applications? getNextHighestDepth() is your friend :-) Nathan http://www.nathanderksen.com On Feb 3, 2006, at 2:05 AM, ryanm wrote: Another little bit of advice you may find useful, don't put depths right next to each other, leave room between them. When developing a UI, I often put them 10 depths apart, as in navigation container at 10, content container at 20, footer container at 30, etc, instead of at 1, 2, and 3. That way, if I need to add a new section, or if I need to drop in additional elements like a scrollbar, etc, I have a depth available without having to go through the code and increment all the subsequent depths. Since there are 65k depths available and I rarely use more than a dozen on any given timeline, I figure spacing them out is safer than putting them right next to each other. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
I always have a movie clip as a base. Gives a better platform for moving everything around together if I need, and getNextHighestDepth () works as advertised. Nathan http://www.nathanderksen.com On Feb 3, 2006, at 8:23 AM, Bart Wttewaall wrote: And certainly not when you work within the _root. It will give depths at which you can't remove movieclips. 2006/2/3, Scott Hyndman [EMAIL PROTECTED]: It's not when you don't want the movieclip to be on the highest depth. Scott -Original Message- From: [EMAIL PROTECTED] on behalf of Nathan Derksen Sent: Fri 2/3/2006 11:07 AM To: Flashcoders mailing list Cc: Subject:Re: [Flashcoders] How do you code your Flash applications? getNextHighestDepth() is your friend :-) Nathan http://www.nathanderksen.com On Feb 3, 2006, at 2:05 AM, ryanm wrote: Another little bit of advice you may find useful, don't put depths right next to each other, leave room between them. When developing a UI, I often put them 10 depths apart, as in navigation container at 10, content container at 20, footer container at 30, etc, instead of at 1, 2, and 3. That way, if I need to add a new section, or if I need to drop in additional elements like a scrollbar, etc, I have a depth available without having to go through the code and increment all the subsequent depths. Since there are 65k depths available and I rarely use more than a dozen on any given timeline, I figure spacing them out is safer than putting them right next to each other. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
I meditate on the 3 base chakra's during 4-7am whilst considering the coherence between my left and right testicles. At a certain point I discharge conceptual code forward through foreign elements into sepy and charge an application with the spirit of that which I AM. PEACE hehe Deep. Anggie, my immediate advice would be to design your application API before you begin unit testing your functions; break down and generalize the internal communication of the application, use your own diagramming dialect to describe the application on paper. If you're gonna be hardcore about it, begin reading a book on UML diagramming. I would say about 70 percent of programming is knowing what you're going to do, and how everything will communicate via object API ( this is where design patterns come in ). It's important to consider design patterns, I would highly recommend reading Actionscript 2.0 essentials. It's important that you move away from programming in actionscript 1.0 (frame code). I would further recommend Design Patterns by Gamma, Helm, Johnson, Vlissides (the GOF). It is a timeless classic that has less to do with code and more to do with the way things should be constructed and thought about. I'm not sure what the others wrote, so I may be repeating what they've already elaborated. There was too much bs for me to keep reading, except for what Bjorn wrote, whom hence forth I shall refer to as Yoda. Some of the other replies were so long that I was frightened. I preach concision to my fellow programmers. And to contradict my preaching concision, I feel compelled to mention that it's more intelligent to take advice then to give it, so, keep on keeping on, as the North American southerners would say. It will make sense when you read it to yourself with a 'hick' accent. Go ahead, try it. Good luck, M. On 2/2/06, Bjorn Schultheiss [EMAIL PROTECTED] wrote: I meditate on the 3 base chakra's during 4-7am whilst considering the coherence between my left and right testicles. At a certain point I discharge conceptual code forward through foreign elements into sepy and charge an application with the spirit of that which I AM. PEACE hehe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 11:37 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? I personally use Eclipse / MTASC, so all code is class based. In my Flash file all symbols that need functionality have a linkage id, and almost all of my symbols are only a single frame (unless shape tweening is needed). To make the Flash compile faster, none of these symbols are linked to Classes in the Library, this is all done in the external code using Object.registerClass. I find it a lot cleaner to have all of my code in a nice external structure, in a decent IDE. My code is all right where I need it, I can control all animation simply (using an animation / tweening library like Fuse), and I can let the designers do almost whatever they like to the Flash file without worrying about them stuffing code up. And, of course, I get decent version control on the source files. After using this for a few months, I just wouldn't code inside the Flash IDE any more. Movieclip spaghetti is a bitter dish. Regards, Grant Cox Anggie Bratadinata wrote: Hi expert coders, Just a simple question, How do you develop your Flash applications? How do you write clean, readable, and reusable codes? The reason I'm asking this is because, so often, I got lost in MovieClips spaghetti. Different depth/levels/timelines drive me nuts and in the end, after reviewing my codes, I can't help re-writing everything from scratch in order to make it much cleaner. So, on the same project, I always work twice. :( What I do so far is write-then-test every single function in my codes;if it works then I'll write another function. And I tend to write everything in a single frame. I'd be more than happy if you, experts, can tell me the right way to code/develop Flash applications. TIA, -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
Surprised at the lack of support for Primalscript on this list :) Its probably just the cost of Primalscript, that's all - its competing with Eclipse, SEPY, SciTE Flash, which are all free. Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Free is always nice to have :-) That's pretty wicked support, though. I considered it, but I like to support SEPY partially because they are at least working on a Mac version, while PrimalScript is not that I know of. Nathan http://www.nathanderksen.com On Feb 3, 2006, at 8:41 AM, Andreas Rønning wrote: Surprised at the lack of support for Primalscript on this list :) It's easily the most comprehensive and solid scripting IDE out there, and for mid to large scale flash development i don't see how i could do without it. In particular the dynamic code completion and code hinting for your own methods as you write them is really really nice to have. Another thing that's nice about something NOT being open source and NOT being modified by every geek on the block is that you have actual customer support heh. Like when i first tried out Primalscript 3 and found that it handled alt gr keys in such a way as to make scripting near-impossible on norwegian keyboards (alt gr+7 through alt gr+0 for brackets and curly braces, and the alt gr key was invariably setting keyboard focus to the menu bar). I notified them, immediatly got a message back that they had ordered a norwegian keyboard and was going to fix it asap. Was fixed within the week. Raw. Never caught on to se|py unfortunately, mostly because i change the colors on my code highlighting to run on a black background (black with light grey letters is easier on my eyes in the long run. Less staring at the sun), and se|py has line highlighting that's black, making the current line invisible ;P Couldn't work with that. Funny how simple i am. - Andreas Nathan Derksen wrote: Yah, I really like it too, but it does the same thing for me. I save constantly anyways, so I rarely lose anything. I have yet to get the Mac version to actually run, which is a shame. Nathan http://www.nathanderksen.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
Only when you use v2 components on the root as well ithink? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bart Wttewaall Sent: Friday, February 03, 2006 5:24 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? And certainly not when you work within the _root. It will give depths at which you can't remove movieclips. 2006/2/3, Scott Hyndman [EMAIL PROTECTED]: It's not when you don't want the movieclip to be on the highest depth. Scott -Original Message- From: [EMAIL PROTECTED] on behalf of Nathan Derksen Sent: Fri 2/3/2006 11:07 AM To: Flashcoders mailing list Cc: Subject:Re: [Flashcoders] How do you code your Flash applications? getNextHighestDepth() is your friend :-) Nathan http://www.nathanderksen.com On Feb 3, 2006, at 2:05 AM, ryanm wrote: Another little bit of advice you may find useful, don't put depths right next to each other, leave room between them. When developing a UI, I often put them 10 depths apart, as in navigation container at 10, content container at 20, footer container at 30, etc, instead of at 1, 2, and 3. That way, if I need to add a new section, or if I need to drop in additional elements like a scrollbar, etc, I have a depth available without having to go through the code and increment all the subsequent depths. Since there are 65k depths available and I rarely use more than a dozen on any given timeline, I figure spacing them out is safer than putting them right next to each other. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
No, but what Ryan describes is exactly what getNextHighestDepth() is for. Not at all. If you have a content container at 1, a navigation container at 2 (so that drop downs lay on top of the content), and a footer container at 3, and you need to add another content container (for rotating ads or something), you want it to be next to the other content in depth so that it's under the navigation. I avoid getNextHighestDepth like the plague, it is an evil monkey living in your closet that wants to kill you. Or at least be a major pain in the ass while you try to figure out why you can't control the z-position of your elements. I don't even use it in loops when I'm generating a bunch of movie clips, like rows in a select box or something, I use the iterator for the loop, that way their depth and their index in the array is always the same. The only time I've ever used getNextHighestDepth was in one-off projects where I didn't know or care where the elements ended up because they were created and forgotten. Anything that might have to be referenced or moved later should probably have its depth set explicitly. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
I completely agree with what Ryan says, but if you still want to use getNextHighestDepth(), as Nathan commented, you could do something like this and get a similar result: ...getNextHighestDepth() + 10; Daniel On 2/3/06, ryanm [EMAIL PROTECTED] wrote: No, but what Ryan describes is exactly what getNextHighestDepth() is for. Not at all. If you have a content container at 1, a navigation container at 2 (so that drop downs lay on top of the content), and a footer container at 3, and you need to add another content container (for rotating ads or something), you want it to be next to the other content in depth so that it's under the navigation. I avoid getNextHighestDepth like the plague, it is an evil monkey living in your closet that wants to kill you. Or at least be a major pain in the ass while you try to figure out why you can't control the z-position of your elements. I don't even use it in loops when I'm generating a bunch of movie clips, like rows in a select box or something, I use the iterator for the loop, that way their depth and their index in the array is always the same. The only time I've ever used getNextHighestDepth was in one-off projects where I didn't know or care where the elements ended up because they were created and forgotten. Anything that might have to be referenced or moved later should probably have its depth set explicitly. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Daniel Cascais Tel: +56 (0)2 4589495 Cel: +56 (0)9 9417355 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
Here here! Another negative vote for getNextHighestDepth(). The _root.removeMovieClip() gotcha when using v2 components wasted several hours of my time when first learning AS2.0 ... why the he!! can't I remove those clips! I use a custom class to assign depth just to spite Flash. /-- | Bryan Thompson | Cyberian Tiger Multimedia \-- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ryanm Sent: Friday, February 03, 2006 12:35 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? No, but what Ryan describes is exactly what getNextHighestDepth() is for. Not at all. If you have a content container at 1, a navigation container at 2 (so that drop downs lay on top of the content), and a footer container at 3, and you need to add another content container (for rotating ads or something), you want it to be next to the other content in depth so that it's under the navigation. I avoid getNextHighestDepth like the plague, it is an evil monkey living in your closet that wants to kill you. Or at least be a major pain in the ass while you try to figure out why you can't control the z-position of your elements. I don't even use it in loops when I'm generating a bunch of movie clips, like rows in a select box or something, I use the iterator for the loop, that way their depth and their index in the array is always the same. The only time I've ever used getNextHighestDepth was in one-off projects where I didn't know or care where the elements ended up because they were created and forgotten. Anything that might have to be referenced or moved later should probably have its depth set explicitly. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
On 2/4/06, elibol [EMAIL PROTECTED] wrote: Anggie, my immediate advice would be to design your application API before you begin unit testing your functions; break down and generalize the internal communication of the application, use your own diagramming dialect to describe the application on paper. If you're gonna be hardcore about it, begin reading a book on UML diagramming. I would say about 70 percent of programming is knowing what you're going to do, and how everything will communicate via object API ( this is where design patterns come in ). It's important to consider design patterns, I would highly recommend reading Actionscript 2.0 essentials. It's important that you move away from programming in actionscript 1.0 (frame code). I would further recommend Design Patterns by Gamma, Helm, Johnson, Vlissides (the GOF). It is a timeless classic that has less to do with code and more to do with the way things should be constructed and thought about. Ugh, I haven't finished reading the GOF's book. I think I need brain vitamins. Could you suggest one? ;) In your experience, are patterns useful in small projects? You know, I've been learning patterns through C#.NET Design Patterns and so far, to me, patterns only useful in big projects (in small ones, it might make things overcomplicated). Correct me if I'm wrong, please. I'm not sure what the others wrote, so I may be repeating what they've already elaborated. There was too much bs for me to keep reading, except for what Bjorn wrote, whom hence forth I shall refer to as Yoda. Some of the other replies were so long that I was frightened. I preach concision to my fellow programmers. And to contradict my preaching concision, I feel compelled to mention that it's more intelligent to take advice then to give it, so, keep on keeping on, as the North American southerners would say. It will make sense when you read it to yourself with a 'hick' accent. Go ahead, try it. Good luck, Thanks -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com www.nextrand.co.id ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
I completely agree with what Ryan says, but if you still want to use getNextHighestDepth(), as Nathan commented, you could do something like this and get a similar result: ...getNextHighestDepth() + 10; No! Bad bad bad! Now you *really* have no way to find your objects. Why not just do this: getNextHighestDepth()+10*152/36%23*Math.random()*362; ... it would be equally as useful. The whole idea is that you keep things at *predictable*, and whenever possible explicitly defined, depths so that things are easy to manage. If you need getNextHighestDepth, that means you don't know what the current highest depth being used is, and that means you aren't in control of the z-depth of your objects. That's a bad thing. At any given time, you should be able to say I know that objects A, B, C, and D are at depths 35, 36, 37, and 38, so it is safe to put this new object at 40, and so on. And even better is to set constants in the class that defines those objects, that way you can just add a new constant for the new object, and you can see what the other depths are for reference when you are defining it. ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
On Feb 3, 2006, at 11:17 AM, Merrill, Jason wrote: Yeah, the sudden shut downs has frustrated me enough times that I just plain stopped using it, even though it's a better editor than SciTe Flash. Same. Sepy will not run on my Macs. Basically crashes on launch. -- Troy RPSystems, Ltd. http://www.rpsystems.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
I'd be more than happy if you, experts, can tell me the right way to code/develop Flash applications. TIA, -- Anggie Bratadinata Malang - East Java I N D O N E S I A I guess they don't can their worms in Indonesia. Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
what's that ?? harsh ? I'd be more than happy if you, experts, can tell me the right way to code/develop Flash applications. TIA, -- Anggie Bratadinata Malang - East Java I N D O N E S I A I guess they don't can their worms in Indonesia. Jason Merrill | E-Learning Solutions | icfconsulting.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Hey Anggie, Hello from a neighbor. I'm no guru, but I am OC (obsessive compulsive) when it comes to keeping my code clean. 1) If I can help it, I keep all my code in one place. All in one frame, all the better. All in one swf? Better yet. 2) I don't keep the actual code in the FLA but I import it via #include. 3) I use classes whenever I can - and I keep them as modularized as possible 4) If I can't use classes, I put all my code in functions, even if it is not in a class. It becomes easier this way when you have an AS editor that can collapse functions. 5) Comment, a lot! Goodluck, -- Ramon Miguel M. Tayag ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
5) Comment, a lot! Just wanted to qualify this piece of advice. You should comment appropriately, which is not necessarily the same as commenting a lot. Comments such as... // Increase the value of i by 5 i += 5; ...are no good to anyone. Instead, explain why 5 is being added to i, unless the surrounding code makes it obvious. Also, make sure that the comments you do make are kept up to date when changing code. It's completely baffling to read a comment that has little or no bearing to the code now surrounding it because it got left behind. I'd also add one piece of advice of my own... 6) Use subversion or some other form on source code control Saved my bacon on more than a few occasions! Steve -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
Harsh? Seriously? How? Can't take a joke? Yo - My joke was just that their question is a can of worms if you mis-understood. Jason Merrill | E-Learning Solutions | icfconsulting.com -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cedric Muller Sent: Thursday, February 02, 2006 10:47 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? what's that ?? harsh ? I'd be more than happy if you, experts, can tell me the right way to code/develop Flash applications. TIA, -- Anggie Bratadinata Malang - East Java I N D O N E S I A I guess they don't can their worms in Indonesia. Jason Merrill | E-Learning Solutions | icfconsulting.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
Dude, that's some funny shit. :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Winterhalder Sent: Thursday, February 02, 2006 9:22 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? On 2/2/06, Cedric Muller [EMAIL PROTECTED] wrote: what's that ?? harsh ? (to open) a can of worms, idiom: to ask for general stylistic advice on a professional mailing list, often resulting in contradicting advises that turn into flame wars, ending with somebody crying and repeated demands for the thread to be discontinued. see also: 'Tell me more about _global' http://en.wikipedia.org/wiki/List_of_idioms_in_the_English_language#C hth, mark -- http://snafoo.org/ jabber: [EMAIL PROTECTED] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
1) If I can help it, I keep all my code in one place. All in one frame, all the better. All in one swf? Better yet. That's one of the worst things I've ever heard. Maybe you should get on medication for your OCD. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
Steven Sacks, I am just surprised to see you writing that kind of stuff. Maybe you were trying to be funny, but I'm not seeing much humor in it with all the bickering and name-calling going on this list these past few days. Maybe it's just me, but I just don't like the tone here lately. Being professional should extend beyond your coding skills. My .02, Kevin 1) If I can help it, I keep all my code in one place. All in one frame, all the better. All in one swf? Better yet. That's one of the worst things I've ever heard. Maybe you should get on medication for your OCD. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
1) If I can help it, I keep all my code in one place. All in one frame, all the better. All in one swf? Better yet. That's one of the worst things I've ever heard. Maybe you should get on medication for your OCD. Sigh... ryanm ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
I personally use Eclipse / MTASC, so all code is class based. In my Flash file all symbols that need functionality have a linkage id, and almost all of my symbols are only a single frame (unless shape tweening is needed). To make the Flash compile faster, none of these symbols are linked to Classes in the Library, this is all done in the external code using Object.registerClass. I find it a lot cleaner to have all of my code in a nice external structure, in a decent IDE. My code is all right where I need it, I can control all animation simply (using an animation / tweening library like Fuse), and I can let the designers do almost whatever they like to the Flash file without worrying about them stuffing code up. And, of course, I get decent version control on the source files. After using this for a few months, I just wouldn't code inside the Flash IDE any more. Movieclip spaghetti is a bitter dish. Regards, Grant Cox Anggie Bratadinata wrote: Hi expert coders, Just a simple question, How do you develop your Flash applications? How do you write clean, readable, and reusable codes? The reason I'm asking this is because, so often, I got lost in MovieClips spaghetti. Different depth/levels/timelines drive me nuts and in the end, after reviewing my codes, I can't help re-writing everything from scratch in order to make it much cleaner. So, on the same project, I always work twice. :( What I do so far is write-then-test every single function in my codes;if it works then I'll write another function. And I tend to write everything in a single frame. I'd be more than happy if you, experts, can tell me the right way to code/develop Flash applications. TIA, -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
I meditate on the 3 base chakra's during 4-7am whilst considering the coherence between my left and right testicles. At a certain point I discharge conceptual code forward through foreign elements into sepy and charge an application with the spirit of that which I AM. PEACE hehe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 11:37 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? I personally use Eclipse / MTASC, so all code is class based. In my Flash file all symbols that need functionality have a linkage id, and almost all of my symbols are only a single frame (unless shape tweening is needed). To make the Flash compile faster, none of these symbols are linked to Classes in the Library, this is all done in the external code using Object.registerClass. I find it a lot cleaner to have all of my code in a nice external structure, in a decent IDE. My code is all right where I need it, I can control all animation simply (using an animation / tweening library like Fuse), and I can let the designers do almost whatever they like to the Flash file without worrying about them stuffing code up. And, of course, I get decent version control on the source files. After using this for a few months, I just wouldn't code inside the Flash IDE any more. Movieclip spaghetti is a bitter dish. Regards, Grant Cox Anggie Bratadinata wrote: Hi expert coders, Just a simple question, How do you develop your Flash applications? How do you write clean, readable, and reusable codes? The reason I'm asking this is because, so often, I got lost in MovieClips spaghetti. Different depth/levels/timelines drive me nuts and in the end, after reviewing my codes, I can't help re-writing everything from scratch in order to make it much cleaner. So, on the same project, I always work twice. :( What I do so far is write-then-test every single function in my codes;if it works then I'll write another function. And I tend to write everything in a single frame. I'd be more than happy if you, experts, can tell me the right way to code/develop Flash applications. TIA, -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
On 2/3/06, Mark Winterhalder [EMAIL PROTECTED] wrote: (to open) a can of worms, idiom: to ask for general stylistic advice on a professional mailing list, often resulting in contradicting advises that turn into flame wars, ending with somebody crying and repeated demands for the thread to be discontinued. Ugh, I didn't mean to start another flame war. I just wanna learn from you, folks I'm sorry if my question was considered a can of worms. If there's any Indonesian Flash mailing list that is as good as this one, I'd turn to them instead, keeping the worms in Indonesia. -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com www.nextrand.co.id ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
On 2/2/06, Merrill, Jason [EMAIL PROTECTED] wrote: I'd be more than happy if you, experts, can tell me the right way to code/develop Flash applications. I guess they don't can their worms in Indonesia. Nope, we export them without the can. :) Heard of Brontok.W32.Virus? -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com www.nextrand.co.id ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
The enlightened Lemming would also like to add some comments. /* * Begin * * Flex 2 kicks ass. Any app dev I will work with flex. * Any GUI component / animation works I'll use Flash * * Thank you * * The end */ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 1:44 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Don't feel bad Anggie, I think it is an interesting topic that is worthy of discussion. The problem is that best practices are quite subjective, and as such some people feel the need to be offended at alternative suggestions :) Of course, the method I use (Eclipse/MTASC) really is The Best Practice, as in my infinite wisdom and experience have found that every other method is simply inferior, and only suitable for ignorant lemmings. You're all lemmings, you hear me!! ;) Regards, Grant Cox Anggie Bratadinata wrote: On 2/3/06, Mark Winterhalder [EMAIL PROTECTED] wrote: (to open) a can of worms, idiom: to ask for general stylistic advice on a professional mailing list, often resulting in contradicting advises that turn into flame wars, ending with somebody crying and repeated demands for the thread to be discontinued. Ugh, I didn't mean to start another flame war. I just wanna learn from you, folks I'm sorry if my question was considered a can of worms. If there's any Indonesian Flash mailing list that is as good as this one, I'd turn to them instead, keeping the worms in Indonesia. -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com www.nextrand.co.id ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Are you actually deploying Flex 2 applications? Doesn't it still require the alpha/beta Flash 8.5 player? Bjorn Schultheiss wrote: The enlightened Lemming would also like to add some comments. /* * Begin * * Flex 2 kicks ass. Any app dev I will work with flex. * Any GUI component / animation works I'll use Flash * * Thank you * * The end */ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 1:44 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Don't feel bad Anggie, I think it is an interesting topic that is worthy of discussion. The problem is that best practices are quite subjective, and as such some people feel the need to be offended at alternative suggestions :) Of course, the method I use (Eclipse/MTASC) really is The Best Practice, as in my infinite wisdom and experience have found that every other method is simply inferior, and only suitable for ignorant lemmings. You're all lemmings, you hear me!! ;) Regards, Grant Cox Anggie Bratadinata wrote: On 2/3/06, Mark Winterhalder [EMAIL PROTECTED] wrote: (to open) a can of worms, idiom: to ask for general stylistic advice on a professional mailing list, often resulting in contradicting advises that turn into flame wars, ending with somebody crying and repeated demands for the thread to be discontinued. Ugh, I didn't mean to start another flame war. I just wanna learn from you, folks I'm sorry if my question was considered a can of worms. If there's any Indonesian Flash mailing list that is as good as this one, I'd turn to them instead, keeping the worms in Indonesia. -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com www.nextrand.co.id ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
On 2/3/06, Grant Cox [EMAIL PROTECTED] wrote: Don't feel bad Anggie, I think it is an interesting topic that is worthy of discussion. The problem is that best practices are quite subjective, and as such some people feel the need to be offended at alternative suggestions :) What a relief ! :) I though I was going to be the blacksheep of this list -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com www.nextrand.co.id ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you code your Flash applications?
9-5 I've been working on the same Flash RIA for the last 3 months. For this I have adopted to Sepy as this is what the rest of the dev team are using. Prior to that I was an Eclipse / MTASC k.i.d. Though when I get home and the collar comes and I'm UNLEASHEDtm into the flex beast that lays dormant during the day time within Flash Lemming. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 1:58 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Are you actually deploying Flex 2 applications? Doesn't it still require the alpha/beta Flash 8.5 player? Bjorn Schultheiss wrote: The enlightened Lemming would also like to add some comments. /* * Begin * * Flex 2 kicks ass. Any app dev I will work with flex. * Any GUI component / animation works I'll use Flash * * Thank you * * The end */ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox Sent: Friday, 3 February 2006 1:44 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How do you code your Flash applications? Don't feel bad Anggie, I think it is an interesting topic that is worthy of discussion. The problem is that best practices are quite subjective, and as such some people feel the need to be offended at alternative suggestions :) Of course, the method I use (Eclipse/MTASC) really is The Best Practice, as in my infinite wisdom and experience have found that every other method is simply inferior, and only suitable for ignorant lemmings. You're all lemmings, you hear me!! ;) Regards, Grant Cox Anggie Bratadinata wrote: On 2/3/06, Mark Winterhalder [EMAIL PROTECTED] wrote: (to open) a can of worms, idiom: to ask for general stylistic advice on a professional mailing list, often resulting in contradicting advises that turn into flame wars, ending with somebody crying and repeated demands for the thread to be discontinued. Ugh, I didn't mean to start another flame war. I just wanna learn from you, folks I'm sorry if my question was considered a can of worms. If there's any Indonesian Flash mailing list that is as good as this one, I'd turn to them instead, keeping the worms in Indonesia. -- Anggie Bratadinata Graphic|Web|Flash Jl. Raya Langsep 21 Malang - East Java I N D O N E S I A www.ibshastautama.com www.nextrand.co.id ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
I'll drink to that. Subversion is king. - Andreas Rønning 6) Use subversion or some other form on source code control Saved my bacon on more than a few occasions! Steve --Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
I build assets in flash and give them symbol names that match my class names. for example loginForm = com.bluetube.view.LginForm I code in eclipse and bind classes to symbols using Object.registerClass, I compile with mtasc and use ANT to build. I always have an ApplicationForm class that kicks off the whole show (natural entry point) and its the swf that gets the code injected into it via MTASC. I load external swfs with symbols that have names that match their classes but they have no code IN the swf. I use the ARP framework on pretty much everything. (I code, I have a designer who does the animation) I use Fuse for code based tweens. I use alcon for logging via a custom logger and the -trace feature of mtasc I use xray to debug I'm busy as hell since i learned all this stuff (normall a JAVA J2EE coder) :) (thanks flash and the open source community!) Cheers, Grant. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do you code your Flash applications?
Hi Anggie, haven't seen you active on this list, so i guess this is welcome as well..? I'm not an expert by any standard, but i do have close to 7 years of practical Flash experience paying my rent, so at the very least i guess that makes me a professional :) When i write these things i tend to go off on a tangent and start writing about horses and the gnp of the moon or something, so in advance, i apologize for any lack of clarity. Since Flash 5, i have made it my mission in life to never break any of the following rules: * Don't paint yourself into corners - Make sure what you do is flexible enough so that the client spec has some lebensraum * Don't put code in MovieClips - Debugging hell. Total terror to suss out some runtime errors if you have what you call MovieClip spaghetti. Sometimes even easy to forget about MC script entirely, which is.. bad. * When possible, keep your code externally and #include. Having to click on that actions frame and pressing f9 to bring up the script editor is 2 steps too many. I prefer to alt-tab between Flash and some external editor. It is no secret that the Flash IDE isn't the scripter's best friend (although it tries valiantly). My vote goes for PrimalScript (www.primalscript.com). It's a little pricey but i haven't really seen better. * Comment informatively and with clear intent, especially when working in teams or with something you'll come back to later.As someone else stated, don't overdo it, but comment where clarity is needed. * Some guys i've worked with think this is a little extreme, but try to avoid using frames at all. The longer your root timeline is the more convoluted your application gets. The abstraction that timeline script adds to your application is something i always personally found a little awkward to deal with (When i declare a function on frame 10, is it available in frame 1? When the movie replays, will it THEN be available at frame 1? What happens when it's redeclared in the next frame loop? etc). Some use frames for graphical states (for instance frame 1 is login, frame 2 is login accepted sequence, frame 3 is login failed, retry?, frame 4 is chat UI), but i prefer to draw everything dynamically and keeping the stage resizable. Partially because it's smart, but mostly because i simply CAN, and i can't think of a reason not to, unless i have 4 hours to deploy it. Pure animations in clips is fine, Flash is a rockstar animation package. But keep that _root clean. Your brain will thank you. * Maintain smart variable naming conventions. Quick, consise, descriptive. Something you can understand yourself. Don't overdo it, if all your loop does is iterate through an array, a for(var i = 0;i100;i++){} will do. In this case, for(var counting=0) etc is overkill, too many letters. Your brain hates letters! Argh! Reading is work, keep it to a minimum, but keep that minimum pretty generous. No one way to do this but i prefer names such as userName, isVisible, isMicAvailable, playerPosX, planeWidth etc. For instance, to some extent, it's obvious that the variables starting with is are booleans, making if(isMicAvailable){} a little more readable. A lot more readable than if(micStatus) or if(microphone). * Use local variables. Make your functions eminently clean. Don't leave stuff lying around, poisoning the air. Write functions that take a value, duplicate that into a local variable (especially in the case of arrays which are almost always references), and then work with that local value before returning a result. Use the return statement. As with coworkers, it's always nice to have functions that talk back. In addition, since MX2K4: * Use strict type checking. This gives a 2fold bonus: You get a free comment to your code that's immediatly clarifying, and you get the debugging assistance and hand-holding of a compiler that kind of knows what you want to do with a variable. This, much like interfaces in OOP, is a great way to hold yourself by the neck and keep yourself straight. On the subject of reusable code, yes, whenever possible. AS2 and OOP really brings this to the forefront. An example is a simple static class i wrote that does tooltipping. Whenever i need a tooltip on mouseOver right now, i'll drop ToolTip.display(This is the friendly assisting text); in the onRollOver and ToolTip.remove onRollOut etc. Since writing that stupid little class, i've used it on 3 apps, and i've felt a warm fuzziness every time it just worked without screwing with the rest of the application. Of course there are limits to just how reusable code is,and IMHO there's such a thing as a needlessly smart solution. I've seen convoluted OOP that makes total sense for scalability, but makes almost no sense from an uninitiated developer's point of view. If you have to learn the entire class tree to incorporate it into your own work, that's a lot of reading up to do. Some people like to abstract their code