RE: [Flashcoders] 500 blur filters on 500 MCs
500 MCs is gonna be a hit already on VM1, 500 blurred MCs? Best of luck. AS3/FP9 you'll have better performance but 500 blurs seems like lot. I would suggest you write some an algorithm that creates groups of clips with the same blur into container clips and blur the container clips rather than all the individual clips. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Create an object by name
Most of the time, what I've seen is setting a temporary var to either an instance of the class, or in the case of a static class, setting it to a reference to the class. var myClass:MyClass = new com.client.project.package.MyClass(); or var myClass:MyClass = com.client.project.package.MyClass; I have to wonder, though, if there's not a better way to accomplish what you're trying to achieve. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] apollo is in macromedia labs
It's not only for Flex. Flex == Flash. That's like saying It's only for Ruby, not Rails. Rails is written in Ruby. Flex 2 is built with Flash. It's simply a bunch of classes and components written in AS3 that provide a framework for developing applications. Currently, the Apollo compiler is a plug-in for Flex Builder 2, but you could make a stub projector that will load any AS3 swf, which there are multiple ways to write. There's the Flash 8 patch to publish Flash 9, the ANT compiler which works with FlashDevelop, and Flex Builder 2. Yes, you can write regular AS3 swfs with Flex Builder. Flex Builder is just Eclipse with a plug-in. I'm not sure what you need Apollo for. It's still in beta, and even after launch, I'm sure that like every single other wrapper out there, it will need time to work the kinks out before it will be ready for mass distribution. If you have a client depending on a Flash wrapper technology, you should look to mProjector or Zinc. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] stopDrag question
function compareX():Void { if (MC_Drag._x == mc2._x) { endDrag(); } } function beginDrag():Void { MC_Drag.startDrag(false, t, l, b, r); clearInterval(compareInterval); compareInterval = setInterval(this, compareX, 10); } function endDrag():Void { clearInterval(compareInterval): stopDrag(); } MC_Drag.onPress = Delegate.create(this, beginDrag); MC_Drag.onRelease = Delegate.create(this, endDrag); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] xml parse question - Steve Sacks
Hey Jason, You don't say .nodeValue - the nodeValue is just the first item in the Array. Technically, it's a String object. Here is a sample class that parse that entire xml and traces it out. In your timeline just put: import com.Test; var test:Test = new Test(); And you'll see it trace the test.xml file. /// import com.stevensacks.data.XML2AS; import mx.utils.Delegate; class com.Test { private var xml:XML; function Test() { var d:Date = new Date(); var xmlPath:String = test.xml; load(xmlPath); } private function load(xmlPath:String):Void { xml = new XML(); xml.ignoreWhite = true; xml.onLoad = Delegate.create(this, parseXML); xml.load(xmlPath); } private function parseXML(success:Boolean):Void { if (success) { var xmlObj:Object = {}; XML2AS.parse(xml.firstChild, xmlObj); trace(test.foo = + xmlObj.config[0].test[0].attributes.foo); var nodes:Array = xmlObj.config[0].items[0].item; var i:Number = nodes.length; while (i--) { trace(nodes[i]); } } else { trace(XML Failed to load); } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:using printjob class
1) always make a printer default to landscape mode and I know the answer to #1 is no. and... 1) You can't make the printer default to landscape, but you can rotate the clips that you are printing. Actually, you can! PrintJob is a poorly written class that you have to make special accomodations for to do this. Here is the code to force printing in landscape. Awesome, the Flashcoders archives are all 404 according to google. :( Here is the code (scroll all the way down to the bottom - the post by Ultimante) to do it. http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=288t hreadid=1089277enterthread=y ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:using printjob class
Here's a shorter version of that link showing how to do it. Code written by me. http://tinyurl.com/38he4a ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:using printjob class
And on my blog: http://www.stevensacks.net/2007/03/16/force-landscape-printing-with-prin tjob/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:using printjob class
There is no difference between printing a rotated clip in portrait or a non-rotated clip in landscape. A printer does the same thing when it prints an image in landscape. Technically, I'm telling the printer to print in landscape mode even when it's not set to print in landscape mode. My script results in an identical print regardless of what the user sets the printer to, so I think I'm right in saying that you can force a printer to print in landscape. Also, my script doesn't rotate the clip if the printer is set to print in landscape. You have to rotate the clip is only part of the story. The PrintJob class has inconsistencies in its internal math, which is why I had to set realW, realH, orgX and orgY and do different calculations at different points in the script. I wrote that code with much trial and error (and no wasted paper thanks to Microsoft image documents). Um - unless I'm missing something - the code you link to is just rotating the image to be printed to make it landscape (if the printer settings aren't already set to landscape). You can't actually set the printer settings to landscape programmatically, you have to rotate the clip in question. Which is, I think, what I said. Ian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] xml parse question
Here's XML2AS as an AS2 static class for her pleasure. class com.stevensacks.data.XML2AS { public static function parse(n, r) { var a, d, k; if (r[k=n.nodeName] == null) r = ((a=r[k]=[{}]))[d=0]; else r = (a=r[k])[d=r[k].push({})-1]; if (n.hasChildNodes()) { if ((k=n.firstChild.nodeType) == 1) { r.attributes = n.attributes; for (var i in k=n.childNodes) XML2AS.parse(k[i], r); } else if (k == 3) { a[d] = new String(n.firstChild.nodeValue); a[d].attributes = n.attributes; } }else r.attributes = n.attributes; } } Usage: config test foo=bar/ items item![CDATA[Some text]]/item item![CDATA[More text]]/item item![CDATA[Other text]]/item /items /config var xml:XML = someXML; var xmlObj:Object = {}; XML2AS.parse(someXML.firstChild, xmlObj); trace(xmlObj.config[0].test[0].attributes.foo); -- bar var nodes:Array = xmlObj.config[0].items[0].item; var i:Number = nodes.length; while (i--) { trace(nodes[i]); } -- Some text -- More text -- Other text ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flash - using the back button
Google SWFAddress -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karim Beyrouti Sent: Thursday, March 15, 2007 4:56 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Flash - using the back button Hi All, I was just wondering what the best way to activate the browser's back button for a Flash(8) app?... are there any up to date resources / tutorial about this?... Kind regards Karim ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] xml parse question
Or you can save yourself the very slow Array.reverse() and just iterate through the array backwards, too. You might be aware of this, but just an FYI, if you're concerned about attributes being order specific. When you loop through the attributes with a for statement, you'll get the attributes in the reverse order. I personally loop through the attributes and push the attribute name to an array and then reverse order, when the for is done. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] is flash still alive?
Flash is dead. Long live WPF/E! ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] deleting a progress bar after loading
You can't tell an object to delete itself from within its own thread. When you delete an object outside of its own thread, you need to first delete any functions assigned to that object and remove it from any event listeners of other objects or you will end up with memory waste. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] RE: Cache Killer... is it bulletproof ???
A: deny a user from hotlinking Meaning? B: deny cacheing of swf files and content Impossible. C: deny playability locally. Check for domain at launch. If domain doesn't match, don't play. Cache Killer isn't about keeping something from being cached (which you can't do), it's about forcing the browser to not load the cached version but instead get the latest version from the server. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Cache Killer... is it bulletproof ???
The user would have to reset their clock and make the request at the EXACT SAME MILLISECOND in time. It's nigh impossible. It will never ever ever EVER happen. You're good to go. var d:Date = new Date(); var noCache:String = String(d.getTime()); var xmlPath:String = http://www.domain.com/my.xml?noCache=; + noCache; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] OT: Pirated Books
Omar Fouad said: this is not called piracy my little brave boy...know your right and respect your older bro. Give us a break, Omar. http://en.wikipedia.org/wiki/Software_piracy QUOTE The copyright infringement of software refers to several practices when done without the permission of the copyright holder: Creating a copy and giving it to someone else. This constitutes copyright infringement in most jurisdictions. /QUOTE http://www.usatoday.com/tech/news/2007-02-05-potter-no-ebook_x.htm QUOTE Author J.K. Rowling has not allowed the first six Potter stories to be released as e-books and has no plans to change that for the seventh and final work. ... Rowling has cited ... concern[s] about online piracy. /QUOTE Lots more can be found here. http://www.google.com/search?source=ighl=enq=ebook+piracybtnG=Google+ Search Maybe you should know you're wrong and stop trying to justify your illegal activity. At the same time, I don't agree with Ian the tattle-tale posting about it on Flashcoders. He would have done quite well in the McCarthy era. Cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Dynamic Flash
Posting the same question under three different subjects won't get your question answered any quicker. Flash is perfectly capable of CRUD communication with a database and displaying it however you like. You're asking for advice on how to set up a relational database and how to write inner join SQL statements, and then how to send that data to Flash. Only one part of that has anything to do with Flash, and it's probably one of the most basic things you can do with Flash (displaying data). I suggest you buy an introduction to Flash book and an introduction to relational database book and get to reading. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] shape tweens at 60fps
Any browser except IE on Windows will have reduced performance. Only IE gives Flash as much RAM and CPU as it wants. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] OT: Pirated Books
Are you so retarded that you would repost the same ignorant denial to the list? Omar, you broke the law and that's that. You're only making yourself look dumber by denying it. Drop it move on before you make yourself look any worse. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ADMIN: DO NOT SEND UNSUBSCRIBE REQUESTS TO THE LIST
You should just post their emails on spam forums where they are sure to be culled by bots and then they'll start getting so much spam it'll force them to get a brand new email. Maybe then they'll see that a few unwanted emails are really not that bad compared to how bad it will be if they don't stop whining about an issue you're obviously working on. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ADMIN: DO NOT SEND UNSUBSCRIBE REQUESTS TO THE LIST
I know the whining has been excessive, but there are real people behind those e-mails. Your bleeding heart is making a mess of the sarcasm on this thread. I know you work in an extremely corporate environment, but try and find a sense of humor and lighten up, Jason. ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Subscription problems
There are those who cry and then there are those who help themselves. Hear, hear! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Skewing MovieClip??
Please take me off this list, the emails just keep coming Ahhggg At the bottom of every email it tells you how to get off the list. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Getting frustrated. regarding set Interval, and for loop.
So even though I never wrote it I would offer the following advice, which is to *almost* not use setInterval at all. Hogwash. http://www.kennybunch.com/index.php?p=16 :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] test
1 out of 1 tests completed. Errors: 0. Warnings: 0. BLITZ | Steven Sacks - 310-551-0200 x209 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts Sent: Sunday, February 25, 2007 11:11 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] test Test again ... Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] What do you think are the best Flash projects andRIA's
Looks like they're using DENG or something like it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glen Pike Sent: Thursday, February 15, 2007 3:44 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] What do you think are the best Flash projects andRIA's Hi, It might not be a full on application as such, but I really liked the way that Pier Inc's site uses Flash to enhance the blog as I see it. http://pierinc.com/ Check it out, there is some nifty ideas and slick stuff in there. Then set your user-agent to GoogleBot and see what is served. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Anyone hate flash 9 already?
What people keep missing here is THERE IS NO FLASH 9. There is the Flash 9 player, there is the Flash 9 beta, which is only Flash 8 with a Flash 9 player compiler, but no Flash 9 yet. The closed Flash 9 Beta (Blaze) has been going on for a few months now. You're talking about the public patch for Flash 8 that lets you publish as Flash 9. If the OP is sharing information about Blaze on this list, he's breaking the NDA. This alone is probably pushing it. *duck* ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Anyone hate flash 9 already?
Adobe calls it Flash 9 Professional Actionscript 3.0 Preview Fair enough, though in my defense, I didn't capitalize it as if it was the actual. I just described it. Still not a beta. ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] limits to AS2 levels of OOP class inheritance?
- Refactor to simpler class relationships (worst case but it did the trick for me - had to duplicate code, ewww). You could use Composition instead, which reduces the need for normal class inheritance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Coding Standards: Use of Get/Set
Get/set is useful when creating a visual object class, as well as for setting private variables on set. It's also useful when you don't want the variable that is being set to be getted, as well. For instance, I have an application which allows a user to type in the day, month and year into three different fields. This data is applied to the model via setters: public function set month(n:Number):Void { _month = --n; var d:Date = new Date(_msDate); d.setMonth(n); _msDate = d.getTime(); } public function set day(n:Number):Void { _day = n; var d:Date = new Date(_msDate); d.setDate(n); _msDate = d.getTime(); } public function set year(n:Number):Void { _year = n; if (String(_year).length == 1) { _year = Number(200 + n); } else if (String(_year).length == 2) { _year = Number(20 + n); } var d:Date = new Date(_msDate); d.setFullYear(_year); _msDate = d.getTime(); } This allows me to set the month to a valid flash month (month - 1), and update _msDate, which is the date in milliseconds, for sorting by dates very easily. I use setters and getters because it makes autocompletion and code hints a breeze. It also is great for visual object model classes. If you choose to write getVariable vs get variable, it's up to you. I use them in different ways at different times. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Adding a function to the String prototype
You should absolutely feel comfortable and fine using prototype to add functions to the String native object if you want. I say if it works, use it. Just because they skimped on String and Array methods that MOST other languages have doesn't mean you should have to write a bunch of extra code to extend the class or cast your Strings as MyStrings. Feel free to use prototype until you move to AS3. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] (no subject)
I wasn't aware that Foreigner posed their question to Flashcoders, but I'm sure they appreciate the answer. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Omar Fouad Sent: Monday, February 12, 2007 11:28 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] (no subject) hi Omar Fouad-- Love is always patient and kind. It is never jealous. Love is never boastful nor conceited. It is never rude or selfish. It does not take offense and is not resentful. Love takes no pleasure in other people's sins...but delights in the truth. It is always ready to excuse, to trust, to hope... and to endure... whatever comes. _ Live Search: Better results, fast http://get.live.com/search/overview ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] determining which object is displayed at agivenpoint
Oops. I responded to the wrong thread, I'm sorry. :( That being said, perhaps rethinking your approach would help. There's a tutorial on Kirupa about managing z-order stacking of movieclips which might contribute to a solution. http://www.kirupa.com/developer/actionscript/3dexplore.htm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Identifier expected
As you have discovered you are not able to use numbers as keys in line objects. That's not true. Just wrote this and it works fine. a = {}; a[a] = {}; a[a][1] = new Number(5); trace(a[a][1]); -- 5 Works for me. You must be doing something else wrong. I'm not sure why you're using new Number(). I don't think I've ever used that. Ever. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Identifier expected
private function createData():Void { this._data = {a:{t1:0, t2:0}}; } One line. :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael Sent: Friday, February 09, 2007 11:02 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] Identifier expected Thanks Jason. I see what you're saying. So I inited an object and then define it, but the below still errors. I was just hoping to be able to define my object with only one line of code. private function createData():Void { this._data = new Object(); this._data[a] = new Object(); this._data[a] = {t1:0, t2:0}; } I was using new Number for a reason, but it's not critical I suppose. Thanks Steven. - Mike The second line does not work because you are evaluating a string to try to resolve it to a property of the object, (which you are hoping is a sub-object) that does not exist yet. In other words, this._data.a the .a in the above statement has not been declared or identified as an object, and thus this._data[a] resolves to nothing. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: Re[2]: [Flashcoders] Identifier expected
Stop using new Object() and use {}; :) I'm not experiencing the same issue you're having Jason. Not sure why. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Detecting mouse events over non-white parts of amovieClip
class com.domain.RollWhileWithin extends MovieClip { public var rolled:Boolean; function RollWhileWithin () { rolled = false; } public function doRollOver():Void { if (!rolled) { rolled = true; gotoAndStop(over); } } public function doRollOut():Void { if (rolled) { rolled = false; gotoAndStop(up); } } } One level above it, you can manage as many clips as there are. var checkMouseInterval:Number; clearInterval(checkMouseInterval); checkMouseInterval = setInterval(this, checkMouse, 100); private function checkMouse():Void { var i:Number = 5; while (i--) { var clip:MovieClip = this[MC_RollClip + i]; if (_xmouse clip._x _xmouse clip._x + clip._width _ymouse clip._y _ymouse clip._y + clip._height) { clip.doRollOver(); } else { clip.doRollOut(); } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] determining which object is displayed at agivenpoint
I think the class I wrote works well enough, I actually pulled it out of an app I'm working on with complex rollovers like that. Why not consider my way? It's simple, easy and, most importantly, it works. It hardly takes any processing power, too. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Tab Problem
Increments are your friend. :) a = 0; tf1.tabIndex = ++a; tf2.tabIndex = ++a; tf3.tabIndex = ++a; btn4.tabIndex = ++a; btn5.tabIndex = ++a; If you had to reorder any of those tab orders all you have to do is cut and paste them into their new position. If you number your tabIndexes specifically and you needed to move one, you would have to renumber any that came after the one you moved. Not fun, especially if you have a lot of tabbable elements. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] finding out which fonts are embedded inaswfatruntime?
Mike, your signature needs an editor. :) ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ Tel: 01964 672000 Fax: 01964 671102 Registered in England no. 01646471 The information contained within this email expresses the views of the sender and not necessarily those of the company. It is private and confidential and may be legally privileged. It is intended solely for those authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or action taken in reliance on its contents is strictly prohibited and may be unlawful. If you have received this email in error, please telephone us immediately on 01964 672000 or email a reply to highlight the error and then delete it from your system. This email may contain links to web-sites, the contents of which ECM Systems Ltd have no control over and can accept no responsibility for. Any attachments have been virus-checked before transmission; however, recipients are strongly advised to carry out their own virus checking as ECM Systems Ltd do not warrant that such attachments are virus-free. Please note that this email has been created in the knowledge that Internet email is not a secure communications medium. We advise that you understand and observe this lack of security when emailing us. ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ Tel: 01964 672000 Fax: 01964 671102 Registered in England no. 01646471 The information contained within this email expresses the views of the sender and not necessarily those of the company. It is private and confidential and may be legally privileged. It is intended solely for those authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or action taken in reliance on its contents is strictly prohibited and may be unlawful. If you have received this email in error, please telephone us immediately on 01964 672000 or email a reply to highlight the error and then delete it from your system. This email may contain links to web-sites, the contents of which ECM Systems Ltd have no control over and can accept no responsibility for. Any attachments have been virus-checked before transmission; however, recipients are strongly advised to carry out their own virus checking as ECM Systems Ltd do not warrant that such attachments are virus-free. Please note that this email has been created in the knowledge that Internet email is not a secure communications medium. We advise that you understand and observe this lack of security when emailing us. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Detecting Rollover w/o onRollOver
You can use hitTest, you can use mouse position, or you can set an interval to fire a function in 10 ms when you rollout that checks to see if a flag is true that the other button will set true onRollOver. function checkFlag() { clearInterval(checkInterval); delete checkInterval; if (btn2Flag) { btn2Flag = false; btn1.gotoAndStop(out); } } btn1.onRollOut = function() { checkInterval = setInterval(checkFlag, 10); }; btn2.onRollOver = function() { btn2Flag = true; }; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Extending List v2 component
Why use a component at all? All you're talking about doing is scrolling a bunch of movieclips behind a mask. I posted some code here awhile back that covered doing that. Search the archives and you'll find it. It's pretty straightforward to do. The MM components are heavy, take too long to render and are buggy to boot. You're better off rolling your own or trying a 3rd party solution. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] What are your thoughts on creating a hook back vsDelegate ?
Also, anyone please let me know if my code formatting doesn't work (i.e: shouldn't be using hotmail to post) Your code formatting is not working. Delegate rocks. I use it all the time. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Ford Sent: Sunday, February 04, 2007 7:48 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] What are your thoughts on creating a hook back vsDelegate ? Which do you prefer:oThis:Object = this;mcClear.onRelease = function():Void{oThis.clearForm();}ormcClear.onRelease = Delegate.create(this, clearForm); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Need help with Keyboard events
Pseudo-code: obj.onKeyDown = function() { if (Key.getAscii() == C Key.isDown(Key.CONTROL)) { // copy } }; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Progresivly track upload speed
Is there any way to progressively track upload speed in flash? http://www.speedtest.net/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flair Pattern bad mixins good (?)
Yeah, the GoF book is definitely like reading a calculus textbook. It's dry and to the point and the examples are in Smalltalk and some C++, which means a lot of cross-referencing with google. The concepts they discuss and the examples they give are helpful to a point but code examples you can't understand definitely get in the way. GoF's is good reference book worth owning, and once you grasp design patterns more firmly, you'll probably get more from it. Head First is a lot more accessible out the gate. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Shorhand for if statement without else statement
(foo) ? foo() : (bar) ? bar() : (foobar) ? foobar() : trace(sorry! no soup for you!); I feel like I need a shower after that one. ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flair Pattern?
I've never heard of an OOP design pattern called Flair. From the class you've pasted, it looks like a novice attempt at implementating a design pattern known as Decorator. Perhaps they were trying to be funny with a reference to the movie Office Space where buttons decorating a TGIFriday's uniform were called Flair? I know that comedy helps when teaching dry material, but renaming a design pattern like that seems to me to be confusing at best. At any rate, here is a link to a description of the Decorator pattern. It should get you on your way. http://en.wikipedia.org/wiki/Decorator_pattern SNAPFLAIR CLASS Implemented as a Singleton class SnapFlair { private static var _obj:SnapFlair; private function SnapFlair() {} /** * @param target The MovieClip being 'flaired' * @param source The source of the event that the flair functionality is listening for * @param eventName The name of the event that the flair is listening for */ public function snapOn( target:MovieClip, source:Object, eventName:String ) { target.mc.$snapFlair = new Object(); target.mc.$snapFlair._obj = target; source.addEventListener( eventName, target.$snapFlair ); target.mc.$snapFlair[eventName] = onEvent; } public static function getObj():SnapFlair { if (SnapFlair._obj == null) { SnapFlair._obj = new SnapFlair(); } return _obj; } public function snapOff( target:MovieClip, source:Object, eventName:String ) { source.removeEventListener(eventName, target.$snapFlair) delete target.mc.$snapFlair; } public function onEvent( evt:Object ) { // do stuff } public function toString():String { return Class SnapFlair; } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Incremental compilation workflow
http://www.flashos.org/flasc/ :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo de Moraes Serpa Sent: Saturday, January 27, 2007 6:04 AM To: Flashcoders mailing list Subject: [Flashcoders] Incremental compilation workflow Hello, How would you go on implementing incremental compilation workflow on Flash 8/AS2? I mean, compiling only the modified classes into their correspondent swfs. Let's say you've got a really big project and that you are constantly messing with code and recompiling it. ANT build files are great, but surely it's not clever to rebuild the whole application when you have modified only one class for example. Take the following application structure (it's not that big application I said earlier of course bit I think it still helps to depict the main issue): - Application.as gets compiled to Site.swf - MenuBar.as gets compiled to Site.swf - IndexForm.as gets compiled to IndexForm.swf - ContactForm.as gets compiled to ContactForm.swf As you can see, I have a Site.swf which is the entry-point of the application. IndexForm.swf and ContactForm.swf are both loaded by Application.as. The MenuBar is a class that implements the menu bar for the site navigation. The menu bar is part of the main application UI and gets compiled into Site.swf. If I update or fix something on the MenuBar.as, for example, I don't want to recompile Application.as into Site.swf, nor compile the other classses to the other swfs. What I want is only inject the new MenuBar.as bytecode into Site.swf (the modified class!). Simple, fast, effective. On FlashDevelop, I used to do this by using the Quick MTASC build feature. I would just write the @mtasc statement in the class' header, inside a javadoc comment, telling where to compile this class. So, if I had to do a quick fix or something, I would just hit CTRL+F8, and the new bytecode for MenuBar.as would get injected into Site.swf. I don't know if there are better (more automatized ways) to do this, and if you know, please share, this is the purpose of this post! Recently I've started using FDT 1.5 on Eclipse 3.2, and while it is a killer piece of software, I miss some of FlashDevelop features, mainly the simple and effective ones such as the Quick MTASC build. Currently, I'm using an ANT build file (the FDT MTASC launcher isn't really of any use in my opinnion) with an ANT target to compile each of the swfs the application is made of. When I'm working on a particular SWF, I set up the ANT external tools configuration to launch only this target. It's not the same as injecting only the modified classes (other non-touched classes get compiled also) but it was the best I could do atm. This message isn't really about implementing this with FDT, though I would love to hear from FDT users how they would do this. What I would like to know (and discuss) are the following points: * Do you feel the need to have this workflow implemented? * Do you already have this workflow implemted somehow? * If so, what tools/techniques do you use (would use) to implement it? Thanks in advance! Marcelo. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Incremental compilation workflow
er, apparently it's a bizarro monday for me. http://www.osflash.org/flasc/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ Sent: Monday, January 29, 2007 10:47 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] Incremental compilation workflow http://www.flashos.org/flasc/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flair Pattern?
So I was dead on about the Office Space reference. :) The class manages assigning Decorators. It isn't a design pattern. It's a class that manages the Decorator design pattern on multiple objects. I'm not sure where the idea that the Decorator pattern must be used on all or none of the objects in an application, or that Decorated objects cannot be undecorated. There are no references to the Flair design pattern anywhere else because it doesn't exist anywhere except in the ego of Brendan Hall. It's not a design pattern, it's a class that uses another design pattern, and poorly, too, judging by the code example. If you want to learn more about Design Patterns, there are quite a few great books out there on the subject written by people more learned and experienced than Brendan Hall. Like people with PhD's in Computer Science. From the de facto bible Design Patterns by the Gang of Four to many others. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flair Pattern?
I felt that I did qualify my statement, I'll try again with clearly language. My statement: There is no such thing as a Flair design pattern. My qualification: Brendan Hall's book and deep in the archives of Flashcoders back when Brendan operated this list are the only places you will find reference to it. His class uses the Decorator design pattern. Using a design pattern doesn't mean you've made your own design pattern. Calling it a design pattern gives it a level of authenticity that it simply doesn't have and is misleading to anyone who reads it, as the OP has demonstrated with his post. He has no point of reference outside of Brendan's book or this list to support him or his questions. I provided a link that would hopefully help him learn the actual design pattern being used, which is called Decorator. Using Decorator on multiple objects isn't a design pattern, it's the usage of the Decorator design pattern. To your comment that Actionscript isn't C++ or Smalltalk, that's true. My feeling is that Design Patterns are universal, not limited to syntax or language. I didn't mean to imply that GoF holds the one true set of patterns. They don't cover MVC in their book, for instance, a pattern I use regularly. Their book is weighted heavily towards the Composition design pattern, which is slowly being embraced by the Actionscript community. The Flex framework and even the AS3 language are influenced by the power of the Composition design pattern. The Head First Design Patterns book is quite good, as well, and is more accessible than the heady and dense GoF one which I had trouble understanding parts of (often due to lack of experience with C++ and Smalltalk) and had to turn to google and other books to grasp some of the concepts they were talking about. However, the 18 design patterns covered by Head First can all be found in the 23 covered by Gang of Four, and all are on Wikipedia, discussed all over the web, and come up with many useful results in google, in contrast to Brendan's Flair design pattern. To the ad hominem remark: When you're writing a book to help people and claiming you're using a new design pattern who does it serve? The reader or the author? And if it serves the author and not the reader, is that not an ego driven decision? Years ago, a company I worked at sent a few employees to Figleaf for training and the class was taught by Brendan Hall. I walked away from that class with the impression that Brendan spent most of the time telling everyone how smart he was but not teaching very much at all. His class did little to improve my or my coworkers Flash skills. That experience, the way he ran Flashcoders in the early days, and now this, is, I suppose, why I called it an ego driven decision to call it a design pattern. If you see it as ad hominem, that's my fault for not using clear enough language. Cheers, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Re: IE6 problem with SWFAddress?
Yes, mixing getURL and ExternalInterface causes problems with IE6 (and 7 to a lesser extent) when using SWFAddress. He talks about it on his site and there are also discussions on his forum, as well. I didn't see them at first, either. It took me awhile to figure out why the site was behaving oddly because the class that I had that used getURL (an omniture tracking class) wasn't making getURL calls on my server but was on the client's server. I didn't put the two together until I spent an afternoon chatting with Rostislov (the author of SWFAddress) and he asked me casually about whether I was using getURL somewhere else. The solution is to use ExternalInterface instead of getURL(), which actually performs better anyway. -Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flair Pattern?
Can you elaborate? While a trip down memory lane replete with posts from the archives sounds like a wonderful time (not), I have work to do and it would take this thread extremely OT. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flair Pattern?
Whether something is a true design pattern or not is kind of beside the point, for me; what I want to know is if a particular approach is good for what I am trying to accomplish: in this case, adding and removing functionality to an object at runtime. If it works and you meet the deadline, then it's good enough, eh? :) If you want to engage in what a fellow coder friend of mine calls aromatherapy, I'm for it. I was mistaken in my impression that you were looking to understand the design pattern, which is why I was trying to lead you to Decorator and away from Flair because you weren't going to find any information on Flair that would be helpful, but there are plenty of helpful places to look for Decorator. If you want to discuss best practice for what you're doing, I'd be happy to offer ideas later today when I have more time. Other people might be able to chime in here on the best application of Decorator in Actionscript. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flair Pattern?
Is adding and removing identical decorators on multiple objects a commonly occuring problem in software development? ;) I avoid Decorators, as well, for the same reasons you stated and the same solutions you offered, as well. :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Shorhand for if statement without else statement
does anybody knows if there is any short hand for if statement without the else statement? 1. You can remove the braces. I always use: if (true) something(); But rarely use: if (true) something(); else somethingElse(); because it can get lost visually in code. 2. Inline conditional I use this all the time. val = (boolean) ? trueVal : falseVal; 3. Inline or conditional val = (if true) || (if not true) This one is a little different than the inline conditional. val will be set to what is left of the || if what is left of the || resolves true (i.e. not 0, undefined or null), otherwise it will be set to what's to the right of the ||. You can also use these without setting a variable. // If boolean is true, call funcA, else call funcB. (boolean) ? funcA() : funcB(); // if funcA returns false, run funcB() funcA() || funcB(); HTH, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Shorhand for if statement without else statement
function foo() { trace(foo); } function bar() { trace(bar); } (true) ? foo() : bar(); -- foo (false) ? foo() : bar(); -- bar Works fine for me. Not the best practice (I would never use it), but just showing what's possible with inline conditionals. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eka Sent: Friday, January 26, 2007 2:27 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Shorhand for if statement without else statement Hello :) In FDT for example : cond ? methodA() : methodB() failed :) The operator cond ? true : false is used to return a value but isn't really the good solution to launch method i think :) EKA+ :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Shorhand for if statement without else statement
( condition ) ( code ); Hot! I wonder how many of these shortcuts we can come up with that nobody would use unless they were trying to show off to other codemonkeys. :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flash wish: Omit comments on publish
Comments are not compiled. If you decompile a swf with commented code, you will not see the comments. If you have tons of comments in your code, you may need to improve your coding practices and naming conventions. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] scrolling a randomly generated field function resultHELP PLEASE
Check this out http://www.kirupa.com/developer/actionscript/zooming.htm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Getting Frames Per Second
Is there a way to know the original fps of a loaded swf? I mean, the fps to which it was compiled to, not the actual framerate? Sure, decompile it. :) http://www.sothink.com/ FYI, you can set Flash to 24fps and runtime framerate calculators will show it's running 35-38 fps. The player ain't perfect. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 properties woes
I don't know about AS3 (and I can't imagine this is different from AS2) but you cannot put any code before super() in a constructor. super() must be the first line of code in a constructor. You should pass the labelClass value to the super constructor (watch your every move, super constructor). super(date); and in your parent function ClassName(lc:String) { labelClass = lc; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Salisbury Sent: Wednesday, January 24, 2007 6:32 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] AS3 properties woes Thanks guys, its was actually my fault, the example i gave was a little simpler than my real code, and i discovered i was calling setTitle from inside the super construtor, so obviously if i dont set my subclass variable before calling super() it wont use that variable. by changing the subclass constructor to this: public function DateMarker () { labelClass = date super(); } I have the desired functionalitythink i probably need to spend some time refactoring tho. The example i've given (aside from Petro's astute comment) should actually work as expected, not as i described!! Sorry for the distractions!!! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Re: flash on osx thru parallels/bootcamp
Have you tried FlashDevelop for Windows or TextMate for Mac? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 Defining Objects
You can't strict type items in a hash. You never could, and you don't need to. You cast them as you pull them out of the hash. myObject[i] = {}; myObject[i].prop = Prop Value; var someProp:String = myObject[i].prop; Not to mention, casting as object is considered weak typing since an object can be anything, so it should be avoided unless you are really casting a object. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] div over swf
Short answer: no. Long answer: It's sort of possible, but it doesn't work in all browser or on all platforms. So, unless you have total control of the delivery platform, no. Check out wmode=transparent and see if that helps but no guarantees. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Re: flash on osx thru parallels/bootcamp
TextEdit on Mac is hands down the best text editor for Mac, possibly on both platforms. It's learning curve beyond the basics can be steep but it is so powerful and you can tightly integrate it with MTASC, SVN, etc., which makes it worthwhile. The benefits to your workflow are measurable. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Re: flash on osx thru parallels/bootcamp
The thing about TextMate is, you need to watch some of the screencasts on their site to really see the awesome power of its macros and actions. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Getting Frames Per Second
In addition to being the best Flash debugging tool on the planet, Xray has a built in Framerate display. http://www.osflash.org/xray :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] External libraries
Unfortunately I'm stuck using the Flash IDE only (no MTASC). :( Why can't you use MTASC? Has somebody got a gun to your head and will pull the trigger if you use it? If that's the case, might I suggest bringing a kevlar helmet to work? ;) I highly recommend FLASC http://www.osflash.org/flasc as a great easy way to use MTASC. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: Re[2]: [Flashcoders] External libraries
I think you have a misconception about MTASC. It isn't a replacement for Flash (unless you're a G like Ben Jackson), it's a 3rd party compiler for Flash. When Flash compiles, it recompresses all the media (graphics, sound, components) as it compiles. All MTASC does is injects code into the swf. So, you can update your classes and use MTASC to compile and cut your compile time down to less than a second where Flash can take many (some of my FLAs take over 30 seconds!). To use MTASC, you need to be writing AS2 classes, as any timeline code or #include code changes won't be updated using MTASC. FLASC is an easy to use GUI for MTASC that runs as a panel in the Flash IDE and it's how I use MTASC (beats learning to write those long command lines). Using FLASC from the beginning of a project is ideal, because MTASC is stricter than the Flash IDE compiler. A benefit of its strictness is it forces you to be a better coder. If you jump into the middle of a project with FLASC, it will probably take you a bit to get it going. It will only really benefit you if your FLAs take more than a second or two to compile. If you're waiting 5-10 seconds every time you make a change, it might be worth your time to install FLASC. As far as your corporatation goes, you're still using Flash. FLASC is a panel inside of Flash. You'll have to get MTASC, which is just an executable that sits in your Program Files folder, but it doesn't require installation - you download it and put it there manually. No administrator access required. HTH, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Rotating a comboBox
Is there any easy way... Write your own. Seriously. The reason it's not rotated is because the ComboBox component's drop down is drawn on the _root. The v2 components are crap. They're hermetically sealed so you can't easily hack them, they're bloated and slow, they're much harder to skin, etc. etc. The new AS3 ones promise to be better. Until then, I suggest writing your own, or purchase the Ghostwire ComboBox and use it (great components even though they're written in AS1 but they do work in Flash 8). ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] movement question
Need to clean up that enterFrame once it's finished. This is about as compact as it can get. this.onEnterFrame = function() { if (--myClip._rotation == -90) delete this.onEnterFrame; } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Override _xscale and _yscale setter in AS2
You can do it with enabled, but you can't with _xscale or _yscale. You have to use a watcher to catch it and return oldVal. BLITZ | Steven Sacks - 310-551-0200 x209 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eka Sent: Thursday, January 18, 2007 3:50 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Override _xscale and _yscale setter in AS2 Hello :) Yes you can :) Try this code (not tested) class Test1 extends MovieClip { /** * Constructor */ function Test1() { } public function get _xscale ():Number { return _xscale_ ; } public function set _yscale( value:Number ):Void { __xscale__ = value ; // your code :) } private var _xscale_ = MovieClip.prototype._xscale ; } I use this technik in LUnAS the extension of VEGAS my framework OpenSource with the enabled property... it's possible it's work with the _xscale property. NB 1 : Vegas project : http://vegas.riaforge.org/ NB 2 : the AbstractComponent class in LunAS with this hack over the enabled property : http://svn.riaforge.org/vegas/AS2/trunk/src/lunas/display/comp onents/AbstractComponent.as EKA+ :) 2007/1/19, Patrick Matte | BLITZ [EMAIL PROTECTED]: In AS2, is it possible to override the _xscale and _yscale setter in a subclass of MovieClip ? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Loading .html as a String variable
Can't you use LoadVars with the html file as the path? BLITZ | Steven Sacks - 310-551-0200 x209 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Murphy Sent: Tuesday, January 16, 2007 4:41 PM To: 'Flashcoders mailing list' Subject: [Flashcoders] Loading .html as a String variable Hi. Does anyone know of a way to load an .html document as a simple String variable, so it can be parsed rather than displayed like a webpage? There's the good-ol-XML object, but if the webpage you're loading isn't exactly XML compliant, it won't load, correct..? Thanks. :) -[a]- -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.13/632 - Release Date: 16/01/2007 4:36 PM ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:Dynamically REMOVE a class linkage
Does this make sense? No it doesn't. I surmise that you are making the variable static, either by declaring it as static variable or by setting it to a value when you declare it. Thus, it ends up shared across all instances of the class (static variables are class variables, dynamic variables are instance variables). ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] scrolling dynamic movie clip
I really want the scroll buttons in the loaded library item. You should rethink the way you're doing this. Putting a scrollbar inside the clip that is being scrolled is illogical. If you want them to appear together as one clip, put the scrolling content in one movieclip in the library clip and the scrollbar in another movieclip on the same level in the clip. Every movieclip has a timeline and layers and you should put them to good use. :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Will the new iPhone run flash?
I just wish it was cheaper. iPhone: $499 for 4GB, $599 for 8GB. 4GB iPod Nano: $199 8GB iPod Nano: $249 Some other top rated Smart Phones: Palm Treo 700p ~$679 Sony Ericsson P990i ~$680 RIM BlackBerry 7130c ~$200 Even the RIM Blackberry with a Nano is the same price as the 4GB model. Considering the Palm Treo doesn't have nearly as many features, plus the iPhone has a touch screen, OSX with Safari, unique non-sequential voicemail, GPS, among all the other amazing features, I think the cost is actually quite competitive and fair, especially since I won't have to carry two gadgets in my pocket anymore. :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] history, bookmarks, etc within flash
SWFAddress is the answer. http://www.asual.com/swfaddress/ BLITZ | Steven Sacks - 310-551-0200 x208 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Dean Sent: Tuesday, January 09, 2007 1:38 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] history, bookmarks, etc within flash I've been asked to implement back button functionality and possibly bookmarking for a flash project that I've been involved in, and I'm aware of a project from unfocus (http://www.unfocus.com/projects/FlashSuite/). basically, having the back and forward buttons in the browser respond to the flash movie rather than the browser's history. My question is if anyone is familiar with a better version than the unfocus method, or if there is currently a standard method for this functionality other than what is being used in unfocus. Ultimately i can incorporate the above. I am, however, looking for what is considered the best / most recommended method. ~james ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flash Tracer / FF2
There's a standalone debug executable available too at http://www.osflash.org/xray/ BLITZ | Steven Sacks - 310-551-0200 x208 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, January 08, 2007 3:54 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Flash Tracer / FF2 I can do you one better. Download the XRay connector and classes from Blitz agency and use this link http://www.rockonflash.com/xray/flex/Xray.html and tell me what you think ;) T - Original Message - From: Eric Lee [EMAIL PROTECTED] To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com Sent: Monday, January 08, 2007 5:42 PM Subject: [Flashcoders] Flash Tracer / FF2 For those of you who haven't used it, there's a cool FF plugin called Flash Tracer (https://addons.mozilla.org/firefox/3469/) that lets you view any traces generated by a SWF within firefox. My problem is that, since upgrading to FF2, I haven't been able to get it to work properly. Has anyone had similar issues / know of a fix? Thanks! -Eric ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Drag on a specific angle
I did something similar awhile back for a site with a diagonal scrollbar. First, I tried the clip rotation and then rotating a container clip to the inverse rotation method. This created some pretty ugly jaggies which were unacceptable. Second, I did some Flash trickery and created an invisible box above the graphic that would be dragged with no constraint and would indirectly control the x and y of the clip being dragged using some basic math based on its position. That was ok, but it wasn't very smooth because Flash tended to jump twips too much when it was being dragged slowly. Finally, I did some smoke and mirrors by making the graphic as wide as the draggable diagonal and masking its visible area along the diagonal path we wanted it to follow and forced the graphic to drag on a vertical constraint. Looked and performed great. -Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Switching sound between boxes and headphones
You can't do that with Flash. In fact, the only types of applications I know that support that are professional audio suites like Cubase, Logic, and ProTools and even then you have to spend time configuring them. From: [EMAIL PROTECTED] on behalf of Dennis - I Sioux Sent: Thu 1/4/2007 12:36 AM To: Flashcoders mailing list Subject: Fw: [Flashcoders] Switching sound between boxes and headphones Hey, I need to be able to switch sound between boxes(minijack) and headphones(usb) within flash (or 3th party).. mutch like you can switch your mic/cam source. Has anyone got a suggestion? Many thanks, Dennis ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://www.figleaf.com/ http://training.figleaf.com http://training.figleaf.com/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Remove elements from Array
That's a fantastic example of over-architecting if I ever saw one. Put away your epeen! ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Arindam Dhar Sent: Friday, December 22, 2006 12:10 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Remove elements from Array function removeElements(arr, level) { for (var i = 0; iarr.length; i++) { var tempArr = arr[i]; if(Number(tempArr[1] ) Number(level)) { arr.splice(i, 1); arguments.callee(arr, level); } } } removeElements(myArray1, 0); trace( myArray1); Arindam ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] undocumented || usage
Saw this recently in code and was surprised that it worked but it's pretty cool. a = foo; b = bar; c = a || b; trace(c); -- foo a = 0; // or a = ; // or a = false; // or a = null; // or a is undefined b = bar; c = a || b; trace(c); -- bar It will return b if a is an empty string, false, null, 0 or undefined. Interesting shortcut. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Senior Developer Posisition
We are currently looking for a senior flash developer The Salary is between 35K - 40K. Yeah, good luck with that. It's a seller's market right now. I wouldn't take a senior level position for less than $US 85K a year. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Good External Actionscript Editor for Mac?
(pc - that term is a bit oldskool IMO) Apple doesn't seem to think so. ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Senior Developer Posisition
http://www.citymayors.com/features/cost_survey.html World: #1 Moscow, #2 Seoul, #3 Tokyo, #4 Hong Kong, #5 London USA: #10 New York, #29 Los Angeles, #34 San Francisco As of 2006, London is one of the most expensive places to live in the world. It's #1 among Western cities, #5 overall. According to online COL calculators, if you got paid $80K USD per year in NYC, the equivalent pay in London would be roughly $93K USD. NYC is the most expensive city to live in in the US, though. If you got paid $80K USD per year in San Francisco, another expensive city in the US, the equivalent pay in London would be roughly $123K USD. Reverse the math from London at $80K. NYC: $69K, SF: $52K Both of which are far less than what a senior level flash dev should be making in this market. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Senior Developer Posisition
Ok, so you've pointed out the issues with the various online Cost Of Living Comparison Calculators I used to derive those numbers (I used two different ones and took the average). That's all well and good and I certainly can't defend any of the numbers since I was just putting them up as an example and I have no clue how accurate they are. I'm glad you pointed out the discrepancies, though. Keep in mind these aren't my figures. I wouldn't vouch for anything found on the internet, I was just passing it along as a rough estimate. The bottom line is it's a $78K USD/year position in one of the most expensive cities in the world. It's only less expensive than a few cities in Asia and is far more expensive than any city in the USA. Can we all agree on that and not bother with which city should be ranked 34? ;) The question at hand is whether you think $78,000 USD per year is a competitive salary for London. Given the current market demand for and the scarcity of truly Senior level Flash developers, I think it's a bit low, though I might negotiate for a little more for the opportunity to live in London for awhile if I had never been there. ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Good External Actionscript Editor for Mac?
TextMate is the best script editor for the Mac, period, hands down. Integrates with MTASC, auto-completion, macros, actions, command line access, etc. etc. If you take the time to learn all the cool stuff it will become an invaluable tool for you. http://www.macromates.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Re: MVC pattern problem
If you want an easy way to learn MVC, pick up this book and go through the tutorial: Agile Web Development with Rails The Ruby on Rails MVC structure is easy to implement and understand and it will set you on your way in MVC. They've got great naming conventions, too. You should use the MVC design pattern with companion patterns like Decorator and/or Observer. Also, Flash blurs the lines between Controller and View and sometimes it's not worth over-architecting and over-abstracting things. At the end of the day, you need to get the project done while keeping your codebase managable. Most of the time, you're not going to be swapping out too many pieces of your MVC, and so MVC becomes a tool for organizing your code into logical pieces. An example of swapping out would be if you changed the model from using XML to Remoting. Or you change the view from using combo boxes to some custom UI implementation. The events/data they pass should stay (basically) the same even if their internal implementation changes completely. One strength of MVC is to decouple the model from the view from the controller such that you can replace any single one of them at any time and not have to touch the code in the other two. Your code example uses direct references to the view from the model, which is counter to this purpose, and event dispatchers and/or accessor methods will fix that. The model just says I've updated to whoever is listening and the view(s) that are listening receive that event and takes appropriate action. The model doesn't know or care what the view or controller is or anything about how they work. It only cares about managing the data and dispatching events when that data is created, modified, updated, deleted, etc.. Here is a simple class that Decorates Movieclips with event dispatchers. I extend my Controller and View classes with this class. My Model class is the same but it doesn't extend MovieClip since Models are just data. import mx.events.EventDispatcher; class com.stevensacks.mvc.ViewController extends MovieClip { public var addEventListener:Function; public var removeEventListener:Function; private var dispatchEvent:Function; function ViewController () { EventDispatcher.initialize(this); } } In the model class, you dispatch events. Views will add themselves as listeners to those events and take appropriate action. In MVC, the Controller renders the View, the View listens to the Model and talks to the Controller, which updates the Model, which broadcasts an event that it has updates for any views that are listening. Here is a trivial example, and I am using direct access to certain methods for sake of brevity, but you could have event listeners and delegated events between the M V and C to decouple them completely. / import com.stevensacks.mvc.Model; class com.clientname.MyModel extends Model { private var data:Object; function MyModel() { super(); } private function doUpdate():Void { dispatchEvent({type:update, data:data}); } public function set someProperty(str:String):Void { data.someProperty = str; doUpdate(); } } import com.clientname.MyModel; import com.clientname.MyView; import com.stevensacks.mvc.ViewController; class com.clientname.MyController extends ViewController { private var model:MyModel; private var view:MyView; function MyController() { super(); model = new MyModel(); model.addEventListener(update, view); view.controller = this; } function changeProperty(str:String):Void { // do something with the data // or just pass it through to the model model.someProperty = str; } } / import class com.clientname.MyController; import com.stevensacks.mvc.ViewController; class com.clientname.MyView extends ViewController { public var controller:MyController; private var TXT_Field:TextField; function MyView() { super(); } function update(evt:Object):Void { // receive the data when the model updates draw(evt.data); } private function draw(data:Object):Void { // draw the view with the data } function makeSomeChange():Void { // something is changed controller.changeProperty(TXT_Field.text); } } // It's important to note that with the Composition pattern, you might not have every view listen to the model, but instead have a parent object (composite) listen and it will
RE: [Flashcoders] Good External Actionscript Editor for Mac?
I'm not a fan of Eclipse. I don't like that Flex Builder is based on Eclipse, but I can't seem to get the ANT compiler working with Flash Develop, so I'm stuck using the Flash IDE or Flex Builder 2 for my AS3 projects for now. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Good External Actionscript Editor for Mac?
Yeah, I followed Keith's step by step instructions, I've followed other people's step by step instructions, John Grden has walked me through it, and it still isn't working on my box. I get a java command line error every time I try to compile. My computer is cursed or something. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ben gomez farrell Sent: Wednesday, December 13, 2006 12:16 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Good External Actionscript Editor for Mac? Not to turn this into a Flash Develop conversation cause it's not for OSX, but I had tons of trouble getting my AS3 projects to work with ANT in Flash Develop, but I finally took the time and followed http://www.bit-101.com/blog/?p=849 step by step, and I've been using Flash Develop for AS3 playing for about a month now. ben ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Re: TextArea: shutting off selection?
that would be if( x == duh){ :) duh. ;) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] flashing first frame
How can we avoid this? stop(); getURL(mypage.html); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] frame 1 - stop() not working with simulate download
An empty movieclip has a size of 4 bytes so you check to see if the bytesTotal 4 in addition to the percent loaded == 100. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] loading thumbnails into a scrollable box via AS
First, break it up into different pieces. The first piece is the XML parsing, the second piece is drawing the thumbnails, and the third piece is scrolling the thumbnails. I'll leave the XML parsing out of this and focus on drawing the thumbnails. Here's the most straightforward way to do this. We could do it all with code but let's mix it up a little since it's your first time. 1) Make an empty movie clip. Name it MC_Empty. 2) Draw a 50x50 pixel red square on the stage. Delete the border. Select the square and hit F8. Name it MC_Square. 3) Make two layers in the timeline. Name the top layer MC_Mask and name the bottom layer MC_Container. 4) Put MC_Square on the MC_Mask layer and name it MC_Mask. 5) Put MC_Empty on the MC_Container layer and name it MC_Container. 6) Resize MC_Mask to whatever size you want the visible area to be. 7) Turn the MC_Mask layer into a Mask. It should automatically mask MC_Container. 8) Now that your timeline is set up it's time to write some code. I'm going to use some arbitrary values here for example. Season to taste. var imageArray:Array = parsedXmlImageArray; // Set these values var visibleRows:Number = 5; var visibleCols:Number = 4; var gutter:Number = 10; // These are set based on what you set above var colWidth:Number = (MC_Mask._width / visibleCols); var rowHeight:Number = (MC_Mask._height / visibleRows); var thumbWidth:Number = colWidth - gutter; var thumbHeight:Number = rowHeight - gutter; var rows:Number; var cols:Number; function draw() { rows = 0; cols = 0; MC_Container.thumbs.removeMovieClip(); MC_Container.createEmptyMovieClip(thumbs, 10); var i:Number = imageArray.length; while (i--) { var mc:MovieClip = MC_Container.thumbs.createEmptyMovieClip(item + i, i); mc._x = cols * colWidth; mc._y = rows * rowHeight; mc.createEmptyMovieClip(img, 10); mc._visible = false; mc.img.loadMovie(imageArray[i]); mc.onEnterFrame = function() { if (this.img._width 0) { this._width = thumbWidth; this._height = thumbHeight; this._visible = true; delete this.onEnterFrame; } }; if (++cols == visibleCols) cols = 0; if (cols == 0) rows++; } } This is a simple example. First, we set up some initial variables that you can play with. Decide how many visible rows and columns you want and how much space you want in between the thumbnails (gutter). It will then determine the sizes of the thumbnails, rows and columns based on the dimensions of MC_Mask. In this way, you can resize it easily by setting the width and height of MC_Mask and calling draw() again. The draw function: Creates an empty movieclip inside MC_Container called thumbs. This makes it easier to refresh the view by simply removing the thumbs clip rather than removing every single movieclip inside it. Then we loop through the array of image paths you got from parsing your XML. In the loop, we create a reference to an empty movieclip. The name of the clip is item + i (item1, item2, etc.) and its depth is set to i. We also make it invisible. We set its _x to the number of columns times the width of the columns and its _y to the number of rows times the height of the rows. Inside that clip we create an empty movieclip to load the image into, and tell it to load movie. Then, we put an onEnterFrame on the movieclip (not the image clip because when you loadMovie, when it's done loading it will overwrite onEnterFrame) that checks to see when the image has loaded, and then resizes the image to the thumbWidth and thumbHeight we set above. Then it makes the clip visible. We do this so the image doesn't show until it's done loading and resized. Then we increment cols and see if it's equal to the visibleCols. If it is, we reset it back to 0 so it draws from the left position again. If cols is equal to 0, then we know it's a new row so we increment rows. That's all there is to it. Doing a scrollbar is a different discussion, and you could just as easily throw all of this into a movieclip and put that movieclip into a scrollpane. You'll need to use the undocumented command setScrollProperties on the scrollpane once the images are finished loading, though, so keep that in mind (google it for more info). Hope this helps, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] preloader not completely preloading...
stop(); function checkLoad() { var c = mc.getBytesLoaded(); var t = mc.getBytesTotal(); var p = (c / t) * 100; MC_LoaderBar._xscale = p; TXT_Load.text = Math.floor(p + %); if (p == 100 t 4) { delete this.onEnterFrame; mc.gotoAndPlay(main); } } this.onEnterFrame = checkLoad; Doesn't get much simpler. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Why does this work in Flash 6 Actionscript 2 butnot Flash 7 Actionscript 2 ...
Why does the following work when published as Flash 6 Actionscript 2, but not Flash 7 actionscript 2 (or Flash 8 Actionscript 2).var nInt:Number;var oMain:Object = {};var nCounter:Number;var sClipName:String;var nClipDepth:Number;function spawnClip():Void{var mcTemp:MovieClip = this.attachMovie(mcCircle, mcCircle+nCounter, nCounter, oMain);mcTemp._x = Math.random()*600;mcTemp._y = Math.random()*400; nCounter++;}nInt = setInterval(this, spawnClip, 500); Posting code without carriage returns makes baby Jesus cry. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Which technique do you use ...
Neither. I use the technique where you put carriage returns after each line of code. I'm not bragging. I know it's a pretty advanced concept but I think anyone is capable of getting their head around it if they put in the time. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com