Anna,
Whether it's MouseEvent or Event makes no difference - since the
MouseEvent class is derived from Event, either will do unless you
actually want to access properties/methods defined only in MouseEvent.
Sajid,
As Latcho says, you need something graphical to click on. You could
use the
Hey list,
does anyone know the cool rationale behind the fact that the compiler won't
allow me to execute a completely sane piece of code such as:
private function _demo():void {
for (var i:Number = 0; i 10;i++) {
//evil stuff here
}
for (var i:Number = 0; i 10;i++) {
//evil stuff here
}
JC,
AS3 has no block scope.
Whenever you write 'var x' inside a method, that declaration
(effectively) gets moved to the 'top' of the method.
So at a compiler level, this:
private function _demo():void {
for (var i:Number = 0; i 10;i++) {
//evil stuff here
}
for (var i:Number = 0;
ok thanks, as i expected then.
Glad we agree it's counterintuitive, and although mtasc \^^\ oo /^^/ ROCKS,
i like as3 too much to go back though:))
thanks Ian
On Tue, Aug 18, 2009 at 10:43 AM, Ian Thomas i...@eirias.net wrote:
JC,
AS3 has no block scope.
Whenever you write 'var x'
On Tue, Aug 18, 2009 at 6:22 AM, Sajid Saiyedsajid.fl...@gmail.com wrote:
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
On Mon, Aug 17, 2009 at 10:36 AM, Mick Gmix...@gmail.com wrote:
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
Anyone know how? Like if I want to dupe an entire function sig.
--
--Joel Stransky
stranskydesign.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
don't know about multiple lines, but to duplicate a simple line just use
CTRL+D
--
Pedro Taranto
Joel Stransky wrote:
Anyone know how? Like if I want to dupe an entire function sig.
___
Flashcoders mailing list
; furthermore I was
talking about the xml-code outcome of this process:
http://www.gotoandlearn.com/play?id=110
Yes, I got that, but not sure I get what you're asking about it. Yes,
FXG is a new graphics format for Adobe graphic files. Catalyst will
produce your MXML with interactivity for you
Seems like it'd be an incredibly useful feature.
On Tue, Aug 18, 2009 at 9:40 AM, Pedro Taranto ptara...@gmail.com wrote:
don't know about multiple lines, but to duplicate a simple line just use
CTRL+D
--
Pedro Taranto
Joel Stransky wrote:
Anyone know how? Like if I want to dupe an
Know of any good workarounds for when you need to set the scale to negative?
as in mySprite.scaleX = -1; //scaleX only accepts positive integers.
--
--Joel Stransky
stranskydesign.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
You might look at Spring Roo to see where the generation of code is going.
It is very slick. It works very nicely from the UML model.
Document the classes and atomic properties.
Document the relationships. Order has a property which is a set of
Order Details and Order Details has a reference to
Yeah it is, they call it copy-pasting ;-) The key command is CTRL-C to
copy and CTRL-V to paste... Think it even works on a mac too...
One extra key command, but still incredibly usefull! ;-)
Sorry couldn't help it ... :-)
On Aug 18, 2009, at 4:46 PM, Joel Stransky wrote:
Seems like it'd
Document the classes and atomic properties.
What's an atomic property?
Jason Merrill
Bank of America Global Learning
Shared Services Solutions Development
Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of America Flash Platform Community
Using negative scales works... I've just double checked.
Cheers
Juan Pablo Califano
2009/8/18 Joel Stransky j...@stranskydesign.com
Know of any good workarounds for when you need to set the scale to
negative?
as in mySprite.scaleX = -1; //scaleX only accepts positive integers.
--
--Joel
I highly suggest reading Practices of an Agile Developer
http://www.pragprog.com/titles/pad/practices-of-an-agile-developer
Use KISS. Stay DRY. Code less. Code smart (code S-Mart).
Use smart shortcuts when they're available to you. Implicit boolean
coercion is one such shortcut, among many
What's an atomic property?
A property that is a primitive type (string, int, Boolean, etc), I think.
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,
Why not just call it a primitive then?
Jason Merrill
Bank of America Global Learning
Shared Services Solutions Development
Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of America Flash Platform Community
-Original Message-
From:
Dave Watts wrote:
What's an atomic property?
A property that is a primitive type (string, int, Boolean, etc), I think.
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
Merrill, Jason wrote:
Why not just call it a primitive then?
That would have been exactly the right thing to say/write.
Sorry.
Couldn't think of the right word at the time. Just getting old, I guess.
Ron
Jason Merrill
Bank of America Global Learning
Shared Services Solutions
No, it won't work on Macs ;)
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Sidney de Koning wrote:
Yeah it is, they call it copy-pasting ;-) The key command is CTRL-C to
copy and CTRL-V to paste... Think it even works on a mac too...
One extra key command, but still incredibly usefull! ;-)
Why not just call it a primitive then?
That would have been exactly the right thing to say/write.
Sorry. Couldn't think of the right word at the time.
Just getting old, I guess.
Ah, np, I thought maybe it was some hip new term or something I hadn't
heard of!
Jason Merrill
Bank of America
Why not just call it a primitive then?
Well, while they're generally the same sort of thing, they can be
different - in many languages, a string isn't really a primitive type
but represents an instance of a String object or an array of
characters, etc. I think the point of calling them atomic is
Ugh, then you go and use an if statement without brackets, and on the same
line to boot! I for one, would not want to maintain your code.
This is in jest of course. I am not going to say doing things shorthand is
wrong, but there are some very valid merits to not doing the shorthand
methods.
On
Oh shiite ... on a mac its CMD :-)
On Aug 18, 2009, at 5:49 PM, Kenneth Kawamoto wrote:
No, it won't work on Macs ;)
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Sidney de Koning wrote:
Yeah it is, they call it copy-pasting ;-) The key command is CTRL-C
to copy and CTRL-V to paste...
Ugh, then you go and use an if statement without brackets, and on the same
line to boot! I for one, would not want to maintain your code.
Hey, you're just lucky he's not using the ternary operator! After all,
that would be the simplest approach.
Dave Watts, CTO, Fig Leaf Software
(atomic == indivisible).
You need to do some reading on string theory. :)
Jason Merrill
Bank of America Global Learning
Shared Services Solutions Development
Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of America Flash Platform Community
On Tue, Aug 18, 2009 at 4:20 PM, Dave Wattsdwa...@figleaf.com wrote:
Again, I'm not saying there's anything wrong with implicit Boolean
evaluation, I just think it's a mistake to believe it's inherently
superior to an explicit, slightly longer Boolean expression, to the
point of telling
One for which you shouldn't call the setter unless you're wearing a
lead apron and goggles. ;-)
Ian
On Tue, Aug 18, 2009 at 3:52 PM, Merrill,
Jasonjason.merr...@bankofamerica.com wrote:
Document the classes and atomic properties.
What's an atomic property?
Jason Merrill
For the record, I love these get your nerd on, see if you can out-nerd
others discussions related to Actionscript. Bring it!
Jason Merrill
Bank of America Global Learning
Shared Services Solutions Development
Monthly meetings on the Adobe Flash platform for rich media experiences
-
And I'd love to see all your shorthands, unesthaetic as hell !
Get your darkest bitwises out.
Don't forget to add in the disclaimer:
This shorthand and the accompanying code are provided as-is. You may use
it as you please. You may *not* hold me liable for any damage caused to
you, your
Thanks, you're a big help champ.
On Tue, Aug 18, 2009 at 11:58 AM, Sidney de Koning
sid...@funky-monkey.nlwrote:
Oh shiite ... on a mac its CMD :-)
On Aug 18, 2009, at 5:49 PM, Kenneth Kawamoto wrote:
No, it won't work on Macs ;)
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Sidney
I didn't see a reponse from Ash. Yet another email lost to the ether. :(
Dave Watts wrote:
And as much as I like Ash, I'm not sure I want to take coding advice
from the guy who couldn't remember klaatu barada nikto - maybe he
was too enamored of shortcuts?
Dave Watts, CTO, Fig Leaf Software
That was supposed to be a winky, not a frowny.
Steven Sacks wrote:
I didn't see a reponse from Ash. Yet another email lost to the ether. :(
Dave Watts wrote:
And as much as I like Ash, I'm not sure I want to take coding advice
from the guy who couldn't remember klaatu barada nikto - maybe
Dave, come on. Take a stand on the issue. Stop straddling the fence.
Pick a side. Im or Ex?
I'm not about writing cryptic PERL-like statements, but writing != null is a
waste of time. It's obviously a null comparison (by nature of it being an
instance). Calling it out as such is redundant.
Then let me be your champ today.
http://greencollective.nl/blog/?p=24
Latcho
Joel Stransky wrote:
Thanks, you're a big help champ.
On Tue, Aug 18, 2009 at 11:58 AM, Sidney de Koning
sid...@funky-monkey.nlwrote:
Oh shiite ... on a mac its CMD :-)
On Aug 18, 2009, at 5:49 PM, Kenneth
Back when I was using AS2 and Javascript || operator was useful to me.
I was so glad when AS3 brought default parameters.
var value:String = foo || bar;
-- Keith H --
www.keith-hair.net
Steven Sacks wrote:
Dave, come on. Take a stand on the issue. Stop straddling the fence.
Pick a side.
Dave, come on. Take a stand on the issue. Stop straddling the fence.
Pick a side. Im or Ex?
I think you're missing the point. You're asking a pacifist which army
he should join. I really don't have a strong opinion either way.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig
The reason you're comfortable straddling the fence is because you don't
experience the pain or discomfort associated with a picket sticking into your
crotch. Why would that be? ;)
How do YOU code? Do you use implicit or explicit?
Dave Watts wrote:
I think you're missing the point. You're
The reason you're comfortable straddling the fence is because you don't
experience the pain or discomfort associated with a picket sticking into
your crotch. Why would that be? ;)
Because I used to be in the military, where you routinely get screwed
on a daily basis. BOHICA.
How do YOU
Dave Watts wrote:
snip
It really depends on the language. Since I'm moving (more or less)
from Java to AS3, more or less, I'm usually using explicit expressions
because that's what people do in Java. On the other hand, in the
ColdFusion code I've written, I usually use implicit Boolean
A good CODER must go beyond a good CODE be fast when needed. That's MHO, and
It gets clear when we compare the number of lines we use to express
ourselves.
Leandro Ferreira
Sent from Brasília, Brazilian Federal District, Brazil
On Tue, Aug 18, 2009 at 18:17, Paul Andrews p...@ipauland.com
brevity == BAD
So then wouldn't you mean to write, I would consider brevity to be a
bad thing... instead? ;)
Jason Merrill
Bank of America Global Learning
Shared Services Solutions Development
Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of
That is awesome!
On Tue, Aug 18, 2009 at 3:15 PM, Latcho spamtha...@gmail.com wrote:
Then let me be your champ today.
http://greencollective.nl/blog/?p=24
Latcho
Joel Stransky wrote:
Thanks, you're a big help champ.
On Tue, Aug 18, 2009 at 11:58 AM, Sidney de Koning
Merrill, Jason wrote:
brevity == BAD
So then wouldn't you mean to write, I would consider brevity to be a
bad thing... instead? ;)
LOL.
Jason Merrill
Bank of America Global Learning
Shared Services Solutions Development
Monthly meetings on the Adobe Flash platform for
I think you're right, but I saw one guy here at work writing something like
this for readability he said!
if (value != null) {
;
} else if (value == null) {
;
}
From: Paul Andrews p...@ipauland.com
Reply-To: Flash Coders List flashcoders@chattyfig.figleaf.com
Date: Tue, 18 Aug 2009
We might want to change the subjet line.
Our ACElash-friend must have gotten scared from the responses on his
question
how he should do a parent.addchild(self) :)
Anyways in my perception a long list of if elses is not always my ideal
of readable code.
time to suspend i...@toolshop.de I'd say
i...@toolshop.de wrote:
Wir haben vom 10.08.2009 - 21.08.2009 Betriebsferien.
Alle Anfragen werden wir danach umgehend beantworten.
Vielen Dank für Ihr Verständnis.
###
We are closed for vacation from Aug 10, 2009 until
I think you're right, but I saw one guy here at work writing something like
this for readability he said!
if (value != null) {
;
} else if (value == null) {
;
}
There's a difference between verbose and just plain dumb.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig
Can I get a copy of this thread in paperback? You can not find this
stuff anywhere else in the world. I was actually going to ask where I
could get some info on coding best practices and go buy a book, but I
am glad I saved my money.
;)
Karl
Sent from losPhone
On Aug 18, 2009, at 4:58
some great optimalistations can be found here:
http://mindprod.com/jgloss/unmain.html
for ex.
class Truth
{
boolean isTrue ( boolean assertion )
{
if ( assertion != false )
{
return assertion;
}
else
{
return assertion;
}
}
Yes, a socket server would make my app easier to program,
but it would also make it unusable for too many users
(those behind corporate firewalls).
Does this help wrt tunnelling through firewalls? Seems to allow a
socket to be established on Port 80
2009/8/19 Leandro Ferreira dur...@gmail.com:
A good CODER must go beyond a good CODE be fast when needed. That's MHO, and
It gets clear when we compare the number of lines we use to express
ourselves.
Indeed. And you unintentionally help to illustrate the point. Paul's
post, though long, is
Writing readable code writing less code.
That is what it comes down to. Most coders can understand both of the
following:
if(myObj){;}
and
if(myObj != null){;}
I would opt for the latter method always, as otherwise you are relying on
renderer specific logic to handle the conversion, as
That's plain bad english, I assure you :)A good CODER must go beyond a good
CODE and be fast when needed.
Leandro Ferreira
On Tue, Aug 18, 2009 at 22:02, Peter B pete...@googlemail.com wrote:
2009/8/19 Leandro Ferreira dur...@gmail.com:
A good CODER must go beyond a good CODE be fast
Taka,
When you're done building your Straw Man, you let me know and I'll happily
continue the discussion with you.
Cheers,
Steven
Taka Kojima wrote:
Writing readable code writing less code.
That is what it comes down to. Most coders can understand both of the
following:
if(myObj){;}
Whoohoo, a lot of explicit coders here :D
Steven Sacks wrote:
Taka,
When you're done building your Straw Man, you let me know and I'll
happily continue the discussion with you.
Cheers,
Steven
Taka Kojima wrote:
Writing readable code writing less code.
That is what it comes down to.
This remainds me of a utility method written by a former coworker at my
previous job, that rightfully belongs in the daily WTF.
public static function mtd_validarVar (variable : Object) :Boolean
{
if (
variable == false ||
variable == undefined ||
variable == ||
variable == null
WTF comes from trying to plan for worse case scenarios.
I did not write this. My doppleganger did :)
var WorstCaseSenario:*= 0x00 ;
trace(toBoolean(WorstCaseSenario) == false);
function toBoolean(bool:*):Boolean
{
if (bool == || !bool) {
return false;
}
if (bool is Boolean
59 matches
Mail list logo