Re: [Flashcoders] ...Friday, 5:38 pm

2008-07-28 Thread Steven Sacks
Word. laurent wrote: hahahah awesome! Lukas Ruebbelke a écrit : This list would just die because Steven Sacks would have nothing to complain about. :D -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allandt Bik-Elliott (Receptacle) Sent: zaterdag

Re: [Flashcoders] ...Friday, 5:38 pm

2008-07-25 Thread Steven Sacks
I'm still here. ;) allandt bik-elliott (thefieldcomic.com) wrote: it brings up a serious point tho - can flash survive with the amount of animosity there is towards it? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.f

Re: [Flashcoders] You cannot debug this SWF because it does not contain any Actionscript

2008-07-24 Thread Steven Sacks
Yeah, what you should do is the 50 percent recursive deletion. Delete half the items and test. Then delete half of the half that has the bad library item in it and test. Repeat until you hone in on it. ___ Flashcoders mailing list Flashcoders@chatty

Re: [Flashcoders] You cannot debug this SWF because it does not contain any Actionscript

2008-07-23 Thread Steven Sacks
Helmut Granda wrote: > The question now is, how do files in the library can become so corrupted? > This would help to avoid it I hope. Because Flash, like a lot of software, ain't perfect. There's no reliable way to make an image get corrupted. Sometimes, the corruption is simple, like it says

Re: [Flashcoders] AS3 shop

2008-07-23 Thread Steven Sacks
Is you or ain't you a developer? If you know AS3, and you found an AS2 solution, why don't you port it to AS3? If you're making an online shop though, might I recommend Flex, which has lots of great libraries available for e-commerce. Here's a bonus - it's AS3! :) ___

Re: [Flashcoders] Release camera driver...

2008-07-23 Thread Steven Sacks
And when I mean you cannot get rid of a connection to either one, what I mean is if you load a swf that opens a connection to Camera or Microphone, YOU CAN NEVER UNLOAD IT, even with stopAndUnload(). ___ Flashcoders mailing list Flashcoders@chattyfig.

Re: [Flashcoders] Release camera driver...

2008-07-23 Thread Steven Sacks
Now why would Adobe do that? Why would they want to play nice with others? Give you, the developer, an option to release the camera or microphone? That just makes too much sense, like being able to unload swfs in AS3. And be aware that while Adobe might have this stopAndUnload() method coming

Re: [Flashcoders] You cannot debug this SWF because it does not contain any Actionscript

2008-07-23 Thread Steven Sacks
Welcome to the seedy underbelly of Flash development. What you've got here is the case of a corrupted library item. It happens sometimes and there's only one thing you can do about it. Not too long ago, my team inherited a Flash 8 file with a corrupted library item that was so terribly corru

Re: [Flashcoders] The Charges Against ActionScript 3.0

2008-07-16 Thread Steven Sacks
Ashim D'Silva wrote: Flash is not a toy. You can't pick it up, with no prior knowledge, and expect to have a app 2 hours later. --- This is where we part ways. Flash used to be a toy, and, up until Flash 8, it still could be. Now, with AS3, Flash has ceased to be a child's toy and is now on

Re: [Flashcoders] The Charges Against ActionScript 3.0

2008-07-16 Thread Steven Sacks
Everyone forgets their roots. Nobody remembers what it was like when they were first learning Flash and learning the basics of programming. Colin Moock forgot his roots when six months ago he wrote an article about how easy AS3 was to learn and how n00bs should be learning it right out the ga

Re: [Flashcoders] Overriding the trace command

2008-07-14 Thread Steven Sacks
Even if you could (which I don't think you can), you absolutely should not for the same reason you should never overwrite Object.prototype or MovieClip.prototype. You're changing the way Flash works at a low-level and you will produce unexpected behavior for everyone other than yourself. This

Re: [Flashcoders] Error #1009 and gotoAndStop()

2008-07-12 Thread Steven Sacks
Creat a function that does the setting on the TextField and call it from that frame. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Saffron Modeler - what happened to it

2008-07-09 Thread Steven Sacks
On 30 Jun 2008, at 17:11, Sidney de Koning wrote: there is loads of activity on sam's twitter account http://twitter.com/SamuelAgesilas Ugh. His twitter is the reason I hate twitter. You know why Saffron isn't getting done? Because Sam's got a twitter account and he's using it. A LOT. __

Re: [Flashcoders] Netstream fails to close

2008-07-09 Thread Steven Sacks
Move to AS3. ;) Alexander, Mary wrote: Does anyone have a solution for AS2? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Nested SWFs

2008-07-09 Thread Steven Sacks
http://blogs.adobe.com/rgonzalez/2006/06/applicationdomain.html ApplicationDomain is the solution, but even the designer of the class acknowledges it's tricky. Each choice has mutually exclusive consequences. Gaia provides an easy way to manage the domain of loaded swfs, but I can't make it

Re: [Flashcoders] Netstream fails to close

2008-07-08 Thread Steven Sacks
And it's worth mentioning this works for AS3 Flash Player 9.0.47 only. It does not work for AS2. The first link you provided was from 2004 with Flash Player 7. The second link didn't look like it had any solution. The third link shows how bad the bug is, and I'm well aware this was part of t

Re: [Flashcoders] Netstream fails to close

2008-07-08 Thread Steven Sacks
Barry, FYI, I didn't just throw out an idea and pull some code out of my ass. I have tackled this exact issue for a client that needed to stop a stream from downloading when they closed the stream, and couldn't actually kill streams when the user interaction resulted in spamming new NetStrea

Re: [Flashcoders] Netstream fails to close

2008-07-05 Thread Steven Sacks
The only bug with NetStream that I know of is if you're spamming it with new streams too quickly. The solution is to throttle the requests. A safe time to wait between changing the streams is 250ms. It's really simple to write a queueing system that does this. You just overwrite the same var

Re: [Flashcoders] Netstream fails to close

2008-07-05 Thread Steven Sacks
You have to pause() before you close(). Jason Van Cleave wrote: sounds like a scope issue where you have multiple netstream objects On Thu, Jul 3, 2008 at 9:54 PM, Barry Hannah <[EMAIL PROTECTED]> wrote: I'm trying to fix a bug in a video player. Selecting a new video to play from a play

Re: [Flashcoders] E4X question

2008-07-02 Thread Steven Sacks
Just because you CAN do it (as this document is just that, documentation), it doesn't mean you SHOULD. I mean, you CAN put underscores in class names. You CAN start class names with lower case characters. You can make all your variable names ALL CAPS even if they're not constants. You can p

Re: [Flashcoders] E4X question

2008-07-02 Thread Steven Sacks
Fair enough, Rich. :) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] E4X question

2008-07-02 Thread Steven Sacks
My point is that the source (XHTML) was following best practices for XHTML, including using strict mode. By contrast, the OP's source was XML, but it was not following best practices, so Flash had some issues with hyphens, which aren't supposed to be there. I guess I was just saying that it

Re: [Flashcoders] E4X question

2008-07-02 Thread Steven Sacks
llenges due to XML expecting XML not XHTML. Rich Shupe wrote: He may be working with a source he can't change, like your parsing HTML without using CDATA tags. On 7/2/08 1:56 PM, "Steven Sacks" <[EMAIL PROTECTED]> wrote: You might want to try following XML standards and be

Re: [Flashcoders] Actionscript Virtual Machine-1

2008-07-02 Thread Steven Sacks
http://flasm.sourceforge.net/ Everything you ever wanted to know about AVM1. Have fun seeing how far down the rabbit hole goes. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] E4X question

2008-07-02 Thread Steven Sacks
You might want to try following XML standards and best practices by not using hyphens in XML node or attribute names. The only time I've seen hyphens in XML is when salespeople and other laymen end up writing XML schemas. Why they're ever given authority to do such things is beyond me. If i

Re: [Flashcoders] Warning: 3596: Duplicate variable definition.

2008-07-01 Thread Steven Sacks
Kerry, You should turn Strict mode on your FLAs in the publish profile settings. If you click on the language (the place you set your class paths and if you want Flash to auto-declare stage instances), you should see a checkbox for strict mode. Turn it on. The reason you want strict mode i

Re: [Flashcoders] Warning: 3596: Duplicate variable definition.

2008-07-01 Thread Steven Sacks
Why? You already set buttons to _menuButtons. Now you're going to set it again? Besides, that ternary is not DRY because you are setting buttons = twice. However, it can be compacted even more, and in 2 lines, instead of 3, by reusing clip and a ternary in the var declaration, like so: var

Re: [Flashcoders] Warning: 3596: Duplicate variable definition.

2008-06-30 Thread Steven Sacks
Even better, 3 lines. var clip:* = e.target; var buttons:Array = _menuButtons; if (e.target.buttonType == 1) buttons = _subMenuButtons; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcod

Re: [Flashcoders] Warning: 3596: Duplicate variable definition.

2008-06-30 Thread Steven Sacks
You see that you're declaring clip (and buttons) twice (causing the error), and as two different types (not causing the error but will cause another shortly). Because you want one variable to act as either a Main or Sub, you need to either cast clip as an abstract version that both of those ex

Re: [Flashcoders] switch statement more efficient than if...else?

2008-06-25 Thread Steven Sacks
One thing that nobody who writes switch statements seemed to know (me included) is you can (and, apparently, should) write them like this: switch (n) { case 0: { foo(); break; } case 1: { bar(); return; } case 2: { baz(); return

Re: [Flashcoders] switch statement more efficient than if...else?

2008-06-25 Thread Steven Sacks
I disagree that switch statements are more readable than if else statements, at least if you put your braces on their own lines. if (true) { // something } else if (true) { // something else } else if (true) { // yet another outcome } I don't think either is more readable than the othe

Re: [Flashcoders] as2 - method losing scope when called from timeline.

2008-06-23 Thread Steven Sacks
Also, I'm not sure what you are trying to do with 'this.clip = clip;', but you cannot instantiate or associate a MovieClip inside an Object (which Test is), and have successful access to its properties and methods. He's using composition, which is sometimes preferable to extending MovieClip i

Re: [Flashcoders] as2 - method losing scope when called from timeline.

2008-06-23 Thread Steven Sacks
It's a "rare" bug that is unacknowledged by Macromedia/Adobe. If you name the package folder that contains your class the same as your class name (case doesn't matter), AS2 will behave like a dumbass. It does randomly buggy behavior, and it's impossible to track down what it is because there'

Re: [Flashcoders] as2 - method losing scope when called from timeline.

2008-06-23 Thread Steven Sacks
Because of the way everything in AS2 is centred around the MovieClip class, in order to create any kind of MVC architecture, which I gather you are trying to do, it's all about the MovieClip. You can have your Model be an Object, but your View and Controller classes, and any other visual disp

Re: [Flashcoders] Converting simple XML data into Array

2008-06-20 Thread Steven Sacks
class net.stevensacks.utils.XML2AS { public static function parse(n:Object, r:Object):Void { var a:Object, d:Object, k:Object; 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.fi

Re: [Flashcoders] How to avoid fake data being sent to server?

2008-06-18 Thread Steven Sacks
This isn't even open for debate. If you don't run your logic on the server, you have zero security. End of story. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Exclude classes

2008-06-17 Thread Steven Sacks
In AS3, there is no exclude.xml. Whether this was an oversight or, for some reason, not possible, you cannot do this in AS3. You can, however, use the Bridge pattern. http://www.stevensacks.net/2008/01/23/update-gaia-bridge-pattern-api/ In a nutshell, you: 1. Make an Interface for the class

[Flashcoders] Gaia 2.2.0 now available

2008-06-16 Thread Steven Sacks
I'd like to let everyone on the list know about the latest major release of my free, open-source, front-end Flash framework, Gaia. http://www.gaiaflashframework.com/forum/index.php/topic,542.0.html Gaia 2.2.0 is a major release and contains many awesome improvements and upgrades! First off,

[Flashcoders] Unhandled IOError and IOErrorEvent when closing browser during load

2008-06-12 Thread Steven Sacks
I posted this to Flash_tiger but it seems to be down or something, so I'm xposting it here. Am I missing something, or is this a bug with the Flash player (9.0.124)? If you're loading something and during the load you close the browser, the Flash player spits out an Error #2044, from either io

Re: [Flashcoders] Is it possible to display "&" in the xml file

2008-06-12 Thread Steven Sacks
If you put ampersands in attributes, the XML will not parse correctly in any browser. Ampersands (and other special characters) should go inside CDATA tags to maintain valid XML. :) Cedric Muller wrote: or you could set an attribute instead of a node ___

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread Steven Sacks
Maybe this will work? Make two copies of the original MovieClip (if you're loading an image, load it once into the first clip, then when it's done loading, load it into the two others) for a total of three. Mask the left and right pieces to the width you want to show. Mask the middle piece

Re: [Flashcoders] help again.. NaN

2008-05-17 Thread Steven Sacks
You can just cast it as int and it will resolve as 0 if it's empty string or contains non-numeric characters. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] help again.. NaN

2008-05-17 Thread Steven Sacks
Your textfield is probably set to multiline or something like that. Anything like a carriage return will cause parseInt to break. rlyn ben wrote: need to display number to the resultTxt but when i press the first number it displays NaN.. when i enter the second number.. it display the number

Re: [Flashcoders] Best way...

2008-05-13 Thread Steven Sacks
The Flex 3 Debugger is solid. Patrick J. Jankun wrote: .. to debug AS3 [NOT AS2!] Is there any other Debugger then one build in Flash IDE? How do you guys Debug your Proejcts? What are the best practices in debugging? What tools should i consider? Greetings, Patrick

Re: [Flashcoders] FPS limit of flash player inside browser?

2008-05-07 Thread Steven Sacks
Juan Pablo Califano wrote: By the way, in most cases setting a FPS above 30 doesn't make much sense (bear in mind that a NTSC video signal runs at 30 FPS, and a PAL one at 25 FPS). And it will only worsen frame-dropping problem, if you already have one. I'm awfully tired of hearing this argu

Re: [Flashcoders] Why is good to extend an Event Class

2008-05-06 Thread Steven Sacks
It's not really important to understand the "why" behind extending Event in AS3. The reasons become self-evident over time as you use it. There's no reason not to, so best to just do so. The only reason you wouldn't is if you spent considerable time to deeply understand the event system in AS

Re: [Flashcoders] Sr. Flash Developer Position

2008-04-28 Thread Steven Sacks
This is the first (and, unfortunately, I doubt the last) installment of my "Recruiters Who Spam" series. Michael Bright is a spammer. If he has spammed you, as well, won't you share your experience? Here's mine. Michael Bright emailed me twice, and then posted about his position twice in t

Re: [Flashcoders] Determining sound sample rate?

2008-04-21 Thread Steven Sacks
Ben has an open source project on Google code that is the evolution of his old classes called Metaphile. http://code.google.com/p/metaphile/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/f

Re: [Flashcoders] Deleting Flash Vars

2008-04-21 Thread Steven Sacks
Have you tried setting your individual Flash Vars to null? root.loaderInfo.parameters.someValue = null; If you tried that and it didn't work, don't use FlashVars if you need that kind of security. There are many other options to FlashVars. Ketan Anjaria wrote: I am using FlashVars in an AS3

[Flashcoders] Actionscript Exploit very bad news

2008-04-18 Thread Steven Sacks
http://www.matasano.com/log/1032/this-new-vulnerability-dowds-inhuman-flash-exploit/ http://documents.iss.net/whitepapers/IBM_X-Force_WP_final.pdf ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listin

[Flashcoders] Gaia Framework 2.1 - SEO Scaffolding

2008-04-16 Thread Steven Sacks
Just wanted to let everyone know I just launched a major release of my Gaia Framework for Adobe Flash. http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ Gaia 2.1 contains SEO Scaffolding. To find out more about it, check out my blog post and the wiki. Gaia 2.1 co

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-15 Thread Steven Sacks
For the record, I never belittled his English, but rather celebrated his "the internet is serious business" approach, which actually had a greater affect on diffusing my frustration than anything else. :) http://blog.mediacatalyst.com/images/seriousbusiness.jpg

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Laurent wrote: what the f**k is a flash player in the universe god damn it! By the way, Disney just called me, they don't give a s**t... Kerry Thompson wrote: Ouch. Ok, I'm old-fashioned, but, please, Laurent, out of consideration for the more prudish members of the list like myself, coul

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Ha! Paul Andrews wrote: You're saving them the job. If I were reading this thread I'd wonder how anyone had ever done anything with Flash. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/fla

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Laurent, you're my hero! teh internet is serious business INDEED! :) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Ha! I never said I make $300,000 a year. Where did you get such a crazy idea as that? :) The Flash player team knew they were in a pickle and instead of providing "a way to punt something or forcibly shut it down", they opted to not say anything and hope that nobody figured it out. That mi

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Also I want to make clear that I am not putting any words into Grant's mouth. I have not had any discussion with Grant personally on this topic. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinf

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Thanks for the link to Alex Harui's post, Francis. It unquestionably supports my stance that only advanced developers should be using AS3 and everyone else (95% of Flash developers) should stick with AS1/AS2. This issue of not unloading swfs unless you explicitly turn everything off inside it

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Let's get down to brass tax. Grant's post is not some bug report and everyone at Adobe knows it. Coming on here and trying to downplay it isn't going to get you very far because people are going to call bullshit. It's a major problem for Adobe for this to be made public and one reason it was

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Correct, Muzak. They are affected. You might remember I posted about this issue last month. I cannot unload a swf that contains an embedded video on the timeline. The best I can do is stop it. Muzak wrote: My guess is that flv's are not affected.. And guessing some more.. external swf's t

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
Francis Cheng wrote: Grant's post is helpful because he discusses the issue in such detail, but it would be even more helpful to have a concrete test case that exhibits this problem. Francis, With all due respect, the Flash team knows about this, and they don't need any more concrete test c

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
And just a note here, but the blogosphere is starting to come alive with people talking about this issue. Funny that MXNA has been down for the past couple of days. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf

Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-14 Thread Steven Sacks
No they are not. In fact, their absolute refusal to fix it is the reason for Grant's post. If you want it fixed, you're going to have to put pressure on Adobe, which they have certainly earned with this. Talk about it on every online forum and blog. Point to Grant's blog entry. Expose the

Re: [Flashcoders] RE: AS3 memory management - loaded content

2008-04-14 Thread Steven Sacks
On the AIR tip, here's the thing. Desktop application development is an entirely different beast than website application development and Flash website development. You must be extremely conscientious about your memory management with desktop applications because they might be running for day

Re: [Flashcoders] AS3 memory management - loaded content

2008-04-12 Thread Steven Sacks
Dave, One thing, though. The documentation states that you absolutely must remove ALL references inside the swf, including timers, enter frame listeners, stop playback of sounds, etc., basically do a complete cleanup, before you can even remove a loaded swf. The issue that Grant brings up i

Re: [Flashcoders] AS3 memory management - loaded content

2008-04-12 Thread Steven Sacks
Hi Dave, http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html Grant Skinner recently blogged about this. Major issue. What's worse is Adobe really has no intention of fixing it. I believe Grant's blog post was an intention to put mucho pressure on Adobe by exposing how bad the

Re: [Flashcoders] Re: Two for loops and one if statement into one for loop.

2008-04-07 Thread Steven Sacks
Right. I should have set j inside in the if statement each time. var defaultSection:int = 3; var maxSection:int = 6; var i:int = maxSection + 1; var j:int; while (i--) { trace( "i = " + i ); if (defaultSection < maxSection) { j = defaultSection; while (j--) {

Re: [Flashcoders] Re: Two for loops and one if statement into one for loop.

2008-04-07 Thread Steven Sacks
Your if statement is pointless because defaultSection is ALWAYS less than maxSection because you're not altering either of those variables. That being said, this is much faster: var defaultSection:int = 3; var maxSection:int = 6; var i:int = maxSection + 1; var j:int = defaultSection; while (i

Re: [Flashcoders] Calling Listener Functions

2008-04-05 Thread Steven Sacks
I disagree with this approach. It's unnecessary and makes code less manageable. It's cleaner to set the argument as optional (event = null) than write another subroutine. Matt S. wrote: You might want to separate the functions, so you would have myFunction(), which you could call from anyw

Re: [Flashcoders] Calling Listener Functions

2008-04-05 Thread Steven Sacks
If you're not actually accessing any of the properties of the MouseEvent in your listener function, you could do the following: (...args) or you could keep it strict and use (e:MouseEvent = null) Either works fine, though the second one is explicitly cleaner. Omar Fouad wrote: Hi, I've go

Re: [Flashcoders] Seeking example: pop up div with greyed out background

2008-04-04 Thread Steven Sacks
You can't do any legwork first? This is a Flash list and you're asking a non-Flash question. Guess how easy it is to find numerous examples of this: http://www.google.com/search?&q=ajax+modal+dialog Done. Mendelsohn, Michael wrote: Hi list... Does anyone have a good example URLs of a that

Re: [Flashcoders] AIR - Insert header in XML file

2008-04-02 Thread Steven Sacks
myString:String = yourXML.toString(); myString += ""; save(myString, "myString.xml"); An XML file is just a text file with a .xml extension. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/fla

Re: [Flashcoders] AIR - Insert header in XML file

2008-04-02 Thread Steven Sacks
Can't you inject that into your xml string? myXml = "" + myXml; Patrick Matte | BLITZ wrote: I'm saving an xml file with AIR, it works but how can I add at the top of the file? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://c

Re: [Flashcoders] how to check if child exists

2008-04-02 Thread Steven Sacks
If the display object is checking itself, all you have to do is check to see if stage == null. Otherwise, you can see if its parent contains it. parentClip.contains(dispObj); that said, i'd still like to know how to determine if a display object is in the current display list? __

Re: [Flashcoders] removeChild - targeting question

2008-04-01 Thread Steven Sacks
try event.currentTarget ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Interfaces

2008-04-01 Thread Steven Sacks
Interfaces can do much more than just help multiple coders stay on track. In Actionscript 3, they can be used to mimic multiple inheritance, decrease file size of loaded swfs, and clarify your own code. Interfaces are simple, but understanding Interfaces and how and when to use them takes a b

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Steven Sacks
Extending DisplayObject to access some of its native functionality (e.g. event bubbling) seems fine to me, especially if you look at it from the perspective of EventDispatcher has events and DisplayObject extends EventDispatcher and adds bubbling functionality. If you need bubbling, extend the

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Steven Sacks
I don't necessary see extending DisplayObject as a hack. It's creative leveraging of AS3's native architecture. :) Merrill, Jason wrote: I think that's because only display objects can bubble events, I don't think non-visual classes can bubble events (unless they extend a display object lik

Re: [Flashcoders] AS3 MouseEvent target?

2008-03-31 Thread Steven Sacks
> Take off the true flag for bubbling and set mouseChildren = true. This should solve your issue. Er, I meant set mouseChildren = false. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/fla

Re: [Flashcoders] AS3 MouseEvent target?

2008-03-31 Thread Steven Sacks
0,0,pbHeight/2); pb.graphics.endFill(); pb.x = pbX; pb.y = pbY+(pbHeight/2); } pb.rolloverText = pbTitle + "\n" + pbDate; pb.addEventListener(MouseEvent.MOUSE_OVER, pbMouseOverListener, true);

Re: [Flashcoders] AS3 MouseEvent target?

2008-03-31 Thread Steven Sacks
IMO, explaining Event Bubbling as the reason the TextField is the target is complicating the immediate solution he needs, which is mouseChildren = false. Yes, it's Event Bubbling that's causing the target to be the TextField. To understand Event Bubbling, read about it in the docs, or better

Re: [Flashcoders] AS3 MouseEvent target?

2008-03-31 Thread Steven Sacks
mc.mouseChildren = false; or event.currentTarget ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Variable scope within for loops: reusing iteratorvariables

2008-03-27 Thread Steven Sacks
Valid where? If that's in a class function and i is not a class variable, then the compiler will complain that you're using an undeclared variable. Cory Petosky wrote: I guess I should have provided an example when I mentioned no block level scoping. Try this on for size: for (i = 0; i < 10;

Re: [Flashcoders] AMFPHP vs RubyAMF

2008-03-27 Thread Steven Sacks
AMFPHP has been around a long time. It's been optimized and optimized and optimized. RubyAMF is (relatively) new. However, I have not used it, so I don't know how it performs, but I'm going to take an educated guess that AMFPHP is faster, more stable and more flexible only because of its age

Re: [Flashcoders] Outsourcing

2008-03-27 Thread Steven Sacks
If you want freelance work, here's how you do it. Make an account on LinkedIn. Get some recommendations. I get about 10 job offers each week from just that. Some full-time, some project-based. You're missing out if you're not making yourself known. :) Dwayne Neckles wrote: My sentiments

Re: [Flashcoders] Variable scope within for loops: reusing iteratorvariables

2008-03-27 Thread Steven Sacks
function doSomething { var i:int; for(i=0;i++;i<10) { } } Is functionally identical to this: function doSomething { for(var i:int =0;i++;i<10) { } } Wrong. It's not. In the latter example, i is not available after the loop. In the first example, it is. var i:int; for (i = 0

Re: [Flashcoders] JSFL Add a new font

2008-03-27 Thread Steven Sacks
You can do anything you want in C++. Read the JSFL docs on how to use C++ to do more complex JSFL stuff. Hopefully, the time and cost it takes to research it, write the C++, debug and deploy your solution will be less than the time and cost savings of importing a Font into a Flash library. I

Re: [Flashcoders] Tweening Engines for AS3

2008-03-26 Thread Steven Sacks
We are programmers, we can't afford Porsches! Better change that to bike and skate... You're joking, right? Talented Flash developers are in extremely high demand right now. Every day I get 3-5 emails from recruiters or companies. It's a seller's market and people are paying top dollar for

Re: [Flashcoders] Tweening Engines for AS3

2008-03-26 Thread Steven Sacks
A few years ago, I went to work at a company and a guy had written an AS2 variable height data grid component. It was over 2000 lines of code in 3-4 classes. It had bugs and it was slow to render. He had been working on it for over two months. I sat down and wrote a variable height data gri

Re: [Flashcoders] JSFL Add a new font

2008-03-25 Thread Steven Sacks
Here's the #1 way of knowing what's not possible in JSFL. Open your History Panel (CTRL+F10). Do something. If the something you did has a red X in the lower right corner, you can't do it in JSFL. x (Create New Font Symbol) You can't do this with JSFL, unfortunately. ___

Re: [Flashcoders] Sound.loadSound ?isStreaming?

2008-03-25 Thread Steven Sacks
;) ywc Andrew Sinning wrote: Don't you think that a bit too obvious? ;-) Thanks Steven! Steven Sacks wrote: uh. mySound.loadSound(url, true); mySound.stop(); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] Sound.loadSound ?isStreaming?

2008-03-25 Thread Steven Sacks
uh. mySound.loadSound(url, true); mySound.stop(); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Steven Sacks
Dwayne Neckles wrote: ALso Tweener allows you to tween frames in movieclips WITH easy... which is pretty darn useful and amazing if you ask me.. I dunno if tweenlite allows that.. Dwayne TweenLite: *Frame tweening* - you can tween to any frame in a MovieClip, like TweenLite.to(my_m

Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Steven Sacks
e. A few tweens won't produce a difference in terms of framerate. If they do, there's something else wrong. Still, I think we should be glad there are so many alternatives. :) Zeh Steven Sacks wrote: Tweener is proven to be significantly slower than TweenLite, and it's almost 3

Re: [Flashcoders] Tweening Engines for AS3

2008-03-24 Thread Steven Sacks
Tweener is proven to be significantly slower than TweenLite, and it's almost 300% larger (TweenLite is 3k vs Tweener's 8k). I'm not telling you what to do. You're welcome to your preference. I prefer to write better, faster, smaller, more efficient code. Different strokes for different folks,

Re: [Flashcoders] How to expand import "*" statements?

2008-03-24 Thread Steven Sacks
Instead of writing var myVar:WhateverClass in FlashDevelop, you can just say new WhateverClass and it will autocomplete it for you. Less to type, less to erase. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.co

Re: [Flashcoders] Custom MovieClip Classes

2008-03-24 Thread Steven Sacks
Beginners should not be coding AS3. It's really that simple. AS3 requires a whole new level of strict coding practices and is not for beginners. Null pointer exceptions are extremely important to catch because they can cause a Flash app to crash, and the foresight to know where and how those

Re: [Flashcoders] Custom MovieClip Classes

2008-03-23 Thread Steven Sacks
The issue is that in Flash you are using the terrible awful why-did-Adobe-put-it-in-there publish option of "Automatically Declare Stage Instances". It's the worst thing in the world and causes many people headaches. Turn it off. It's the dumbest thing Adobe could have ever made. SHIFT+F12

Re: [Flashcoders] Tweening Engines for AS3

2008-03-22 Thread Steven Sacks
TweenLite and TweenFilterLite are the undisputed kings of Tween engines. They're the most efficient, best performing and most lightweight. I distribute them with my Gaia framework. Jack Doyle is actually working on an improved version of TweenFilterLite right now which should be released soo

Re: [Flashcoders] Custom MovieClip Classes

2008-03-21 Thread Steven Sacks
Do you want to inherit some or all? If you want to inherit all, have RegistrationPanel extend APanel. If you want to inherit some, have RegistrationPanel instantiate APanel and have proxy methods to just the ones you want. -Steven Omar Fouad wrote: List, I have a MovieClip in my Flash Lib

<    1   2   3   4   5   6   7   8   9   10   >