Another reason the anonymous function technique is not recommended for
event handlers is that the 'this' keyword in an anonymous function
refers to the global object whereas if you use a method, the 'this'
keyword refers to that method's associated object.
Francis
It is documented, in two places:
1) ActionScript Language Reference:
http://www.adobe.com/livedocs/flex/201/langref/flash/events/EventDispatc
her.html
In the method detail for flash.events.EventDispatcher.addEventListener()
see the description of the priority parameter:
If two or more
You should be able to add properties to function objects, just as the
docs suggest. Unfortunately, it looks like this isn't working in strict
mode anymore. Oddly, it does work in standard mode, but that may not be
a viable workaround for you. I had a brief discussion about this with
the engineers
Hi Jason,
This is a mistake in the documentation.
Thanks for pointing it out. Ill file a documentation bug to ensure that
it gets fixed.
Thanks,
Francis Cheng | Senior Technical Writer |
Adobe Systems, Inc.
From: flexcoders@yahoogroups.com [mailto:flexcoders
Dont forget that the Array.sort()
method sorts using string values by default, so even when sorting an array of
numbers or ints, they will be sorted as if they were strings. To get numeric
sorting, so that 10 comes after 2, use the
Array.NUMERIC sort option, e.g.:
Its probably because there is a
difference between fixed properties and properties added at runtime. Fixed
properties are variables, methods, or constants that you define as part of a
class definition. These are fixed in the sense that you cannot remove them or
replace them at runtime.
Title: is delete really the best/only way to remove a node in e4x?
The E4X standard allows the addition of
APIs in certain circumstances, but not this one. The standard explicitly prohibits
the addition of methods to the XML or XMLList prototype objects, which are where
the other methods
In ActionScript 3.0, the delete operator
only works on properties of objects, not on instances of a class. Setting the ping
variable to null is the way to go. As long as the variable ping
is the only reference to the PingTime instance you created in your init() function,
you can make the
Hi Sergio,
Perhaps I'm misunderstanding your question, but I can't reproduce issue
#1. The following call to the filter method returns a multidimensional
array:
import flash.display.Sprite;
var arr:Array = [[-1,-2,-3],[3,5,4], foo];
function isArray(elem:*, index:int, arr:Array):Boolean {
ActionScript 3.0 does have a hash class, named Dictionary, which you can
find in the flash.utils package. You can rewrite your o Object as a
Dictionary, but ActionScript 3.0 doesn't have the equivalent of the
'sort' keyword in Perl where you can do something like:
// Perl code
foreach $key
() {}
}
--- In flexcoders@yahoogroups.com, Francis Cheng [EMAIL PROTECTED]
wrote:
That works in C# because the default access specifier for class
members
in C# is private. It won't work in ActionScript 3.0 because the
constructor is always public, whether or not you declare it as
such.
Francis
Flash Player 8.5 is still in beta, and we'd greatly appreciate any
feedback about problems you are having with it. If you have a minute,
there is a brief web form you can use to report these kinds of errors:
http://www.macromedia.com/go/fp_public_beta_feedback
Thanks,
Francis
-Original
Its a doc bug that its
missing from the Statements, Keywords and Directives page. Ill
add it soon.
Francis
From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schmalle
Sent: Friday, March 10, 2006 11:36
AM
To: flexcoders@yahoogroups.com
13 matches
Mail list logo