There is another way of doing it as well, FYI, that doesn't use the
delegate class. You can take advantage of the fact that handler
functions can see local variables and use a local variable to make
reference to the class. The line:
var parent = this;
(or fully typed, var
Use removeColumnAt() and addColumn()/addColumnAt()
var dataArray:Array = new Array();
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
dataArray.push({foo:1, bar:2, baz:3});
The line in the constructor:
this._size = 2;
is calling the setter. Maybe you meant to call this.__size = 2;
Setters will trigger regardless of whether the property is set by
code within the class itself or from external code.
Nathan
http://www.nathanderksen.com
On Feb 8, 2006, at 5:31
Sorry, ignore me, I misread the question. setter != getter
Nathan
http://www.nathanderksen.com
On Feb 8, 2006, at 9:58 PM, Nathan Derksen wrote:
The line in the constructor:
this._size = 2;
is calling the setter. Maybe you meant to call this.__size = 2;
Setters will trigger regardless
putting anything into the
field, should solve that issue.
HTH,
Ian
On 2/7/06, Nathan Derksen [EMAIL PROTECTED] wrote:
You need to re-apply setTextFormat() every time you change the .text
or .htmlText properties of a text field:
snip
percent.text = percentNum;
percent.setTextFormat(ldrFormat);
snip
You make it sound like I'm forcing it to work. I'm not forcing it, it
works as a nice byproduct of how I normally setup and group my movie
clips. I see this as being good coding practice. Things that are
grouped together share a parent movie clip, making control of the
group easier and
Then I create a placeholder movie clip in the order I intend for it
to go, then put the new movie clips in that clip later. The parent
clip holds the depth, so no matter how many child clips I create,
they are always ordered relative to the rest of the content as
intended. I always group
No, you will have problems with that implementation. You can't just
add loadedBytes to your total. Say you are loading just one movie
clip, you start off with zero, then 10 bytes come in, so loadedWeight
is now 10. Next, 10 more come in so loadedBytes reports 20, which is
added to your
getNextHighestDepth() is your friend :-)
Nathan
http://www.nathanderksen.com
On Feb 3, 2006, at 2:05 AM, ryanm wrote:
Another little bit of advice you may find useful, don't put
depths right next to each other, leave room between them. When
developing a UI, I often put them 10
Ah yes, that's a fun issue. Unfortunately, once you load an SWF
inside another, there is no way that I know of to get the original
published stage size. I would love to be proved wrong, though, but I
have looked hard for a way to do that as well. All you can really do
is keep xscale and
] on behalf of Nathan
Derksen
Sent: Fri 2/3/2006 11:07 AM
To: Flashcoders mailing list
Cc:
Subject:Re: [Flashcoders] How do you code your Flash applications?
getNextHighestDepth() is your friend :-)
Nathan
http://www.nathanderksen.com
On Feb 3, 2006, at 2:05 AM, ryanm wrote
the _root.
It will give depths at which you can't remove movieclips.
2006/2/3, Scott Hyndman [EMAIL PROTECTED]:
It's not when you don't want the movieclip to be on the highest
depth.
Scott
-Original Message-
From: [EMAIL PROTECTED] on behalf of
Nathan Derksen
Sent: Fri 2/3/2006 11:07
Not that I know of. If the first frame was representative of the size
as a whole, then iterating through the movie clips looking for clips
with negative x/y values could be done, however it's sort of a moot
point as soon as everything moves around in subsequent frames. I also
don't think
. Less
staring at the sun), and se|py has line highlighting that's black,
making the current line invisible ;P Couldn't work with that. Funny
how simple i am.
- Andreas
Nathan Derksen wrote:
Yah, I really like it too, but it does the same thing for me. I
save constantly anyways, so I rarely
This is a problem that has been addressed numerous times. I suggest
that you search the archives at http://chattyfig.figleaf.com/
pipermail/flashcoders/
The summary is that the speed problem usually has little to do with
the actual xml handling and more to do with how you are updating the
line.
On frame one of the root timeline:
_global.APP = {};
Wow. That was so hard.
APP.someglobal
APP.someotherglobal
APP.etc
Nathan Derksen nderksen at sfu.ca wrote:
I generally keep at least one singleton class which is responsible
for storing global properties. I make those properties
Yah, agreed. I just know from experience on the various boards that
one of the most common mistakes for people to make is to update a
combo-box or data grid for each iteration of the xml parsing loop
rather than waiting until the end. That can lock up the player tight,
while if you wait
To answer your question a bit more, there are a couple of approaches.
One approach is to build in the filtering server-side, so that when
you need a subset of the data for something, you send a request to
the server, which does the filtering and only sends what is relevant
as XML. This is
Coolness, I missed that before. The actual page that this is shown is
http://livedocs.macromedia.com/labs/1/flex/langref/migration.html for
those who don't want to search through the docs.
Nathan
http://www.nathanderksen.com
On Feb 1, 2006, at 6:29 PM, David Peek wrote:
Besides, you don't
Take a look in the Flash help panel under Components Language
Reference - UIComponent Class and UIObject Class. Most components
inherit from UIComponent, which in turn inherits from UIObject, so
all the properties/methods/events listed for these two classes will
apply. When you create your
I generally keep at least one singleton class which is responsible
for storing global properties. I make those properties accessible
with getters and setters so that I can allow changes in those
properties to trigger events. You can't really do that if you use
_global to store your data.
Well, regardless of whether or not you use listeners, you still need
to create the data relationship. I don't think encoding the
relationships into 25 listeners is necessarily a good idea, either.
An associative array, indexed by ID, could store the IDs of the other
list items that are
(selectedItemData[i]);
}
}
I hope this helps.
Nathan
http://www.nathanderksen.com
On Jan 30, 2006, at 9:26 AM, Kent Humphrey wrote:
On 30 Jan 2006, at 17:13, Nathan Derksen wrote:
Well, regardless of whether or not you use listeners, you still
need to create the data relationship. I
Yup, works great. I wish there was a version for the Mac as well.
Nathan
http://www.nathanderksen.com
On Jan 22, 2006, at 4:35 PM, Johannes Nel wrote:
not an insatller just an executable and it works like a charm.
On 1/22/06, Adrian Lynch [EMAIL PROTECTED] wrote:
I'm just about to install
A few points: First, you are not actually setting the amMessage and
pmMessage properties anywhere. The variables that you are passing
through the constructor actually obscure those two properties because
they share the same variable name; they don't copy any data. Second,
it's a better
ExternalInterface requires Flash 8, it won't compile back to v7.
You can use the integration kit just fine. There is a distinction
between extending an open source project and using it as a library.
In this case, you are using it unmodified as a library, which does
not require you to make
Yup, fscommand is not supported on many/most Mac browsers:
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14159
Depending on what you want to do, the alternatives are to use getURL
(javascript:foo()); to call a javascript function (no return data
allowed), to use the Flash 8
Have you tried loading them into movie clips instead of levels? I
generally try staying away from levels when at all possible. Also,
you can use the movie clip loader class to make the movie clip loads
sequential, loading the next movie after the previous movie generates
an onLoadInit
A DOM viewer, such as the one that comes with Firefox, can easily
allow you to get the URL of anything on the page, dynamic or not. To
my knowledge, there is no way of hiding from that. You can then put
that URL directly in the address bar, and retrieve the SWF file with
save as...
In the Flash IDE, you can convert movie clips in the library into
compiled clips. Select your movie clips, right click, and select
Convert to Compiled Clip. This will pre-compile these movie clips,
and their linkage IDs (if any) will also remain intact. I've done
this in the past with
I would say to hell with the VB coders (and I used to be one). What
if you want to change your implementation later on? What if this
functionality changes with AS3? Without an API, you open yourself up
to all sorts of fun stuff that may force the user to have to change
their code later on.
Well, consider how an object can be manipulated.
var myObject:Object = new Object();
myObject.foo = bar;
or
var myObject:Object = new Object();
myObject[foo] = bar;
Those are equivalent syntaxes. Everything basically inherits from
Object, so this is valid syntax throughout, including your
On 12/30/05, Nathan Derksen [EMAIL PROTECTED] wrote:
while that is true, i thought that was what the dynamic keyword was
to allow, and without it, you'd get some sort of error...
That's the theory, but as the XML example shows, using the
associative array syntax gets around the compile-time
I haven't seen an up-to-date chart either. You may be interested in
knowing that Macromedia already has two ways for you to do this. The
first is the Flash JavaScript Integration Kit:
http://weblogs.macromedia.com/flashjavascript/
This uses legacy techniques to make what you are doing work
At the end of your change() handler, save the stepper value to a
timeline variable or class property, then next time compare the
stepper value with that previous value. Lather, rinse, repeat.
Nathan
http://www.nathanderksen.com
On Dec 29, 2005, at 12:03 PM, Mike Boutin wrote:
I have a
Yes, when you assign an initial value to a property, it is basically
like a static assignment. Do the initialization in the constructor
instead. This works for me:
class myClass
{
// initialize the array in the declarations
var myArray:Array;
function myClass()
{
myArray =
36 matches
Mail list logo