Re: [Flashcoders] Re: Sending 2 HTTP requests from a webchat-like app

2009-08-17 Thread Mick G
You might want to think about using something more robust like smartfoxserver so you can not have the restrictions of http requests. I've been using is on a chat/whiteboard app for a while and it's an enormous performance increase over any http requests. On Sun, Aug 16, 2009 at 3:26 PM, Alexander

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread ekameleon
Hello :) Use an argument in the constructor of you class to passed-in the parent reference of your display public function MyDisplay( target:DisplayObjectContainer = null ) { if ( target != null ) { target.addChild( this ) ; } } PS : your code isn't valid in the constructor

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread ACE Flash
ekameleon, you are the man! so sweet. Thanks On Mon, Aug 17, 2009 at 1:54 PM, ekameleon ekamel...@gmail.com wrote: Hello :) Use an argument in the constructor of you class to passed-in the parent reference of your display public function MyDisplay( target:DisplayObjectContainer = null ) {

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Steven Sacks
I don't understand why you would not want to write a single line of code in the class where it would provide the most clarity, and instead write MORE code in another class obscuring the behavior that is going on. In other words, you're writing more code to write the same code. You're going to

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread dr.ache
why? BTW, Ekameleon, you should use if (target) Instead of if (target != null) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread ekameleon
Hello :) i prefere use (target != null) ;) question of visibility and to keep the default value of the argument in the constructor. EKA+ :) 2009/8/17 Steven Sacks flash...@stevensacks.net I don't understand why you would not want to write a single line of code in the class where it would

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Dave Watts
BTW, Ekameleon, you should use if (target) Instead of if (target != null) Lots of people hate implicit Boolean conversion, and see it as a sin against God and nature. I'm not one of those people, but I think it's a mistake to say that implicit Boolean conversion is superior and everyone

Re: [Flashcoders] How to add a DisplayObject into a container withoutusing addChild() method.

2009-08-17 Thread Muzak
Not to mention, a class adding itself to its parent ?? eeew.. - Original Message - From: Steven Sacks flash...@stevensacks.net To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, August 17, 2009 10:53 PM Subject: Re: [Flashcoders] How to add a DisplayObject

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Steven Sacks
if (Boolean) Everything inside an if statement is automatically coerced into a Boolean. Either it is or it isn't. It's not more clear to write != null because an if statement cannot possibly be anything other than true or false. In this case, null or not null. Writing it out is redundant

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Steven Sacks
Dave Watts wrote: Lots of people hate implicit Boolean conversion, and see it as a sin against God and nature. I'm not one of those people, but I think it's a mistake to say that implicit Boolean conversion is superior and everyone should use it. Code bloat is one of the seven deadly sins

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Dave Watts
Code bloat is one of the seven deadly sins (gluttony). This is why we all name our variables things like x, y, etc instead of giving them recognizable names, right? And gluttony, really? I'm not going to EAT my code. Luxuria is a better fit, even though we actually call it lust nowadays. Dave

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Gregory Boland
if someone handed me some code and the worst thing that they had done is wrote expressions long-handed, I would consider myself extremely lucky. lets get over ourselves... greg On Mon, Aug 17, 2009 at 5:44 PM, Dave Watts dwa...@figleaf.com wrote: Code bloat is one of the seven deadly sins

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Steven Sacks
It's called artistic license. ;) And you are eating code, through your eyes and brain. :) Dave Watts wrote: Code bloat is one of the seven deadly sins (gluttony). This is why we all name our variables things like x, y, etc instead of giving them recognizable names, right? And gluttony,

Re: [Flashcoders] rotationX not working In Flex actionscript Projects

2009-08-17 Thread Latcho
Funny just came out of this issue. Turned out the v10.0.1-something debugplayer distributed with my flex_sdk was not a nice one. In my browser the rotX/Y/Z worked like a charm, but on flashdevelop with that mentioned player I got the same issues. I'm on windows so don't know how to do it on

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Dave Watts
And you are eating code, through your eyes and brain. Ā :) ... and I must therefore excrete code from my fingertips. And the usefulness of this metaphor reaches a disgusting end. All that said, my point was simply that opinions differ on whether implicit Boolean conversion is good or bad, no

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Steven Sacks
James Gosling got his Doctorate in CS in 1983. Programming has changed quite a bit since then. new old ;) Dave Watts wrote: And you are eating code, through your eyes and brain. :) ... and I must therefore excrete code from my fingertips. And the usefulness of this metaphor reaches a

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Dave Watts
James Gosling got his Doctorate in CS in 1983. When did you get yours? Same time I got mine (never)? Programming has changed quite a bit since then. new old That must be why ActionScript moved from a prototype-based, loosely-typed language to a class-based, strongly-typed language, right?

[Flashcoders] Next big 'speedy' thing ?

2009-08-17 Thread Latcho
So that FlashBuider is another branch of flexbuilder that parses fxg xml ? And catalyst is our designer handled beloved fxg spawning machine ? Anytime soon we have to crawl trough this 'super modern' and mega lengthy fxg xml's? Or am I interpreting this wrong ? The video tutorials scared me.

RE: [Flashcoders] Next big 'speedy' thing ?

2009-08-17 Thread Merrill, Jason
I'm not sure I follow 75% of what you're saying, but I will say the Flashbuilder is what Flexbuilder was - just renamed for version 4 from Flexbuilder to Flashbuilder. Same tool. Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Keith H
Steven, Maybe its just me but... Just doing a Boolean check on DisplayObjects always put my scripts in high risk of runtime errors. Especially in the case of cleanup operations. Sometimes I might have a function that attempts removing a DisplayObject that has not been added to the stage or

Re: [Flashcoders] Next big 'speedy' thing ?

2009-08-17 Thread Latcho
Okay good to know that they are the same; furthermore I was talking about the xml-code outcome of this process: http://www.gotoandlearn.com/play?id=110 Latcho Merrill, Jason wrote: I'm not sure I follow 75% of what you're saying, but I will say the Flashbuilder is what Flexbuilder was - just

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Steven Sacks
Here's the best way to write that. No try catch required. if (myDO myDO.parent) myDO.parent.removeChild(myDO); Keith H wrote: Steven, Maybe its just me but... Just doing a Boolean check on DisplayObjects always put my scripts in high risk of runtime errors. Especially in the case of

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Latcho
(myDO) (myDO.stage) ( myDO.parent.removeChild(myDO) ) ;) Latcho Keith H wrote: Steven, Maybe its just me but... Just doing a Boolean check on DisplayObjects always put my scripts in high risk of runtime errors. Especially in the case of cleanup operations. Sometimes I might have a

Re: [Flashcoders] mac vs pc

2009-08-17 Thread Steven Sacks
The act of writing Actionscript in FlashDevelop is, IMO, better. FD's code completion and code gen is easier and faster. Because code completion and code gen is the majority of what I do from moment to moment as I'm writing, it's the better tool. Refactoring and debugging are not what I

[Flashcoders] CLICK event not getting fired

2009-08-17 Thread Sajid Saiyed
Hi, Although a bit late, I am making a move to AS3 and facing some issues. After banging my head around a bit, I would like to ask for some help :) My CLICK event is not getting detected from withing my class file. In the code snippets below, the reportClick function is not getting triggered

Re: [Flashcoders] CLICK event not getting fired

2009-08-17 Thread Latcho
try a 'this.buttonMode=true' on MyGesture class Latcho Sajid Saiyed wrote: Hi, Although a bit late, I am making a move to AS3 and facing some issues. After banging my head around a bit, I would like to ask for some help :) My CLICK event is not getting detected from withing my class file. In

Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread Keith H
Thanks. That is a better way to write the check. (Clever! you escaped from using null once again LOL) BTW I just put the try/catch there to demonstrate error. -- Keith H -- www.keith-hair.net Steven Sacks wrote: Here's the best way to write that. No try catch required. if (myDO

Re: [Flashcoders] CLICK event not getting fired

2009-08-17 Thread Sajid Saiyed
HI, I did this: public function MyGesture(){ this.buttonMode=true; } but it still does not fire... Any idea what might be causing this problem? The MyGesture class is instantiated from Mediaplayback.as (which is my

Re: [Flashcoders] mac vs pc

2009-08-17 Thread Matt Gitchell
I figured this is where we'd end up. I code in either environment with comparable speed, honestly, it's just getting used to the workflow. Honest! Now whether that means I code like the freakin' wind in either or am slow as hell in both I'll leave for you to decide. Rather than seeing the

Re: [Flashcoders] CLICK event not getting fired

2009-08-17 Thread Anna
On Mon, Aug 17, 2009 at 9:32 PM, Sajid Saiyed sajid.fl...@gmail.com wrote: Hi, Although a bit late, I am making a move to AS3 and facing some issues. After banging my head around a bit, I would like to ask for some help :) My CLICK event is not getting detected from withing my class file.

[Flashcoders] unsubscribe

2009-08-17 Thread gene matthew
_ HotmailĀ® is up to 70% faster. Now good news travels really fast. http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009___ Flashcoders

Re: [Flashcoders] CLICK event not getting fired

2009-08-17 Thread Latcho
Are you sure there is a graphic in the myGesture movieclip ? You need something to click on. Do you see the handcursor with buttonMode = true ? Otherwise try this as a test in the MyGesture constructor asn make sure you see a square, then check for handCursor, then click it. Mind that the the

Re: [Flashcoders] CLICK event not getting fired

2009-08-17 Thread Sajid Saiyed
Ok, I should have given a bit more background. I am trying to detect a CLICK anywhere on the (blank) stage. Only when the user clicks somewhere on stage, I want to show something. How can I do this? Do I still need to draw something? Sajid On Mon, Aug 17, 2009 at 11:50 AM,