[Flashcoders] font embedding hell

2006-05-12 Thread August Gresens

Sorry to bug ya with a newbie question, but the figleaf server seems
to be down so I couldn't search the archive.

I'm failing miserably to embed any font - as a library or otherwise -
for a dynamic or static text field.

I tried two ways:

* Using the embed button and choosing the characters.
* Embedding the font as a symbol.

I've tried alternate fonts, and these do not seem to embed either.
I've tried two fonts so far - I'm attempting to embed them on a
Macintosh computer.

Berthold Akzidenz Grotes
Helvetica Neu Bold Condensed.

In either case - I get the missing font dialogue when I open the flash
file containing the text fields mapped to these fonts.

Are there any known workarounds/remedies for common problems with this.

Thanks,

August

--
-


August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

-

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] font embedding hell

2006-05-12 Thread MBDI ICSC Rodrigo E. Curiel Salazar

Hi !

You must have the font installed in the system where you are developing.


On 5/12/06, August Gresens [EMAIL PROTECTED] wrote:


Sorry to bug ya with a newbie question, but the figleaf server seems
to be down so I couldn't search the archive.

I'm failing miserably to embed any font - as a library or otherwise -
for a dynamic or static text field.

I tried two ways:

* Using the embed button and choosing the characters.
* Embedding the font as a symbol.

I've tried alternate fonts, and these do not seem to embed either.
I've tried two fonts so far - I'm attempting to embed them on a
Macintosh computer.

Berthold Akzidenz Grotes
Helvetica Neu Bold Condensed.

In either case - I get the missing font dialogue when I open the flash
file containing the text fields mapped to these fonts.

Are there any known workarounds/remedies for common problems with this.

Thanks,

August

--
-


August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

-

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


FW: [Flashcoders] sprouts data structure

2006-05-12 Thread André Goliath
FWIW if have written some AS2 classes some time ago that implement a graph
by using adjacenty lists.
If it would help you let me know

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Weldon
MacDonald
Sent: Thursday, May 11, 2006 2:49 PM
To: Flashcoders mailing list
Subject: [Flashcoders] sprouts data structure

I have a request for a game called sprouts. The game starts with a few
randomly distributed dots. There is one move and 2 restrictions.
Move:   draw a line for a dot to itself (a loop) or to another dot.
Any line drawn has a new dot on it.
Restriction 1: no more than 3 lines from any dot.
Restriction 2: no lines can cross.

Simple game, but the data structure to keep track of the game and in
particular to handle restriction 2 is a bear. How do you tell when a
dot has been encircled by a line?

The game is, of course based on graph theory, and you can represent a
graph in several ways, but how to determine that it remains planar?

I haen't begun to think about the visual part of this, if I don't have
a reasonable data structure I can't teach a computer to play the game.

Any ideas? Hints? Wildly improbable ideas?

-- 
Weldon MacDonald
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Loader, LockRoot and diferences

2006-05-12 Thread Juan Anzaldo

Hi list, almost I already finish this interactive and
have some simple questions.

http://www.movimiento-digital.com/discovery/pa_runwayInteractivo/ensamblado9b.html


1. which is the best method for load my content, 
internal loader or external. at this time the
interactive has internal loader but the text and the
loaded animation appear until the eighty percent, I
gess that is because I have a lot of attach movies in
my code, Q. which parameters I need to add so that the
text and loader animation appear from the beginning?
or I unavoidably need to use an external loader.

2. Still I do not understand very well the lockRoot
function, somebody can give a simple explanation of
its operation?

3. Wich are the diferences betwen the SWFObject and
the method from Adobe?, which recommends to me to use?

If you have recommendations about the interactive I
apreciate.

tnx



Ing. Juan Anzaldo
Tel Cel. 614 427-6523
Blog : http://janzaldo.blogspot.com

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Loader, LockRoot and diferences

2006-05-12 Thread Thomas Fowler

1. I use the Loader component exclusively, just because of its inherent
callback methods. It's much easier to code for than using
createEmptyMovieClip and all that stuff.

2. _lockroot, when set to true for a particular movieclip, specifies that
_root refers to its _root as opposed to referring to the _root of the
movieclip that loads it. In other words, if you have MovieA.swf that loads
MovieB.swf and you set this._lockroot to true in MovieB.swf, any reference
to _root in MovieB will reference only MovieB's root. If _lockroot is set to
false in MovieB then any reference to _root will bubble up to MovieA's root.

3. I would definitely recommend using SWFObject as opposed to Adobe's
solution. Adobe's solution is not as robust and doesn't do anything in the
way of automatically activating the Flash Player in IE nor does it allow you
to easily specify which version of the Flash Player the swf is slated for.

On 5/12/06, Juan Anzaldo [EMAIL PROTECTED] wrote:



Hi list, almost I already finish this interactive and
have some simple questions.


http://www.movimiento-digital.com/discovery/pa_runwayInteractivo/ensamblado9b.html


1. which is the best method for load my content,
internal loader or external. at this time the
interactive has internal loader but the text and the
loaded animation appear until the eighty percent, I
gess that is because I have a lot of attach movies in
my code, Q. which parameters I need to add so that the
text and loader animation appear from the beginning?
or I unavoidably need to use an external loader.

2. Still I do not understand very well the lockRoot
function, somebody can give a simple explanation of
its operation?

3. Wich are the diferences betwen the SWFObject and
the method from Adobe?, which recommends to me to use?

If you have recommendations about the interactive I
apreciate.

tnx



Ing. Juan Anzaldo
Tel Cel. 614 427-6523
Blog : http://janzaldo.blogspot.com

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: FW: [Flashcoders] sprouts data structure

2006-05-12 Thread Weldon MacDonald

My first thought was an adjacency list with something to indicate
forbidden edges (for a dot  inside a cycle), so it might help. The
problem isn't that simple though, as more and more moves are made
whose in what cycle and can make waht move is a good deal less than
clear.

On 5/12/06, André Goliath [EMAIL PROTECTED] wrote:

FWIW if have written some AS2 classes some time ago that implement a graph
by using adjacenty lists.
If it would help you let me know

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Weldon
MacDonald
Sent: Thursday, May 11, 2006 2:49 PM
To: Flashcoders mailing list
Subject: [Flashcoders] sprouts data structure

I have a request for a game called sprouts. The game starts with a few
randomly distributed dots. There is one move and 2 restrictions.
Move:   draw a line for a dot to itself (a loop) or to another dot.
Any line drawn has a new dot on it.
Restriction 1: no more than 3 lines from any dot.
Restriction 2: no lines can cross.

Simple game, but the data structure to keep track of the game and in
particular to handle restriction 2 is a bear. How do you tell when a
dot has been encircled by a line?

The game is, of course based on graph theory, and you can represent a
graph in several ways, but how to determine that it remains planar?

I haen't begun to think about the visual part of this, if I don't have
a reasonable data structure I can't teach a computer to play the game.

Any ideas? Hints? Wildly improbable ideas?

--
Weldon MacDonald
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--
Weldon MacDonald
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] font embedding hell

2006-05-12 Thread Doug Tangren

This should work.

On the machine were the fonts are installed. create a new flash file,  
create a font symbols for your target fonts.  Right click on them in  
your library, and click on Linkage properties and make sure the  
Export for actionscript and export of runtime sharing are checked  
fill in the url for the name of the swf file and an identifier for  
the font. I did this before and called mine fontlib.swf.  Export that  
movie.


In your target movie go to File  Import  Open External Library and  
point to the flash file where the target font symbol was created.  
Copy the font symbol from that library to your target movie's  
library. And if you click on the font symbol in your library the  
check box for  Import for runtime sharing should be and the URL  
should point to the swf files with the font embedding.  If haven't  
tested this using two different platforms, but essentially the font  
should be embedded in that external swf file so it should be there  
where ever you take it.


If that works, when you choose a font the identifier of that font  
symbol should show up in the font list with a * star beside it.



On May 12, 2006, at 1:58 PM, MBDI ICSC Rodrigo E. Curiel Salazar wrote:


Hi !

You must have the font installed in the system where you are  
developing.



On 5/12/06, August Gresens [EMAIL PROTECTED] wrote:


Sorry to bug ya with a newbie question, but the figleaf server  
seems

to be down so I couldn't search the archive.

I'm failing miserably to embed any font - as a library or otherwise -
for a dynamic or static text field.

I tried two ways:

* Using the embed button and choosing the characters.
* Embedding the font as a symbol.

I've tried alternate fonts, and these do not seem to embed either.
I've tried two fonts so far - I'm attempting to embed them on a
Macintosh computer.

Berthold Akzidenz Grotes
Helvetica Neu Bold Condensed.

In either case - I get the missing font dialogue when I open the  
flash

file containing the text fields mapped to these fonts.

Are there any known workarounds/remedies for common problems with  
this.


Thanks,

August

--
-


August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

-

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] XML attributes with - in the name

2006-05-12 Thread Rifled Cloaca

All,

I'm reading a SMIL file, and it has regions with - in an attribute
name (z-index).

Obviously, if I refer to the attrib explicitly, like
XMLnode.attributes.z-index, it'll read that as a minus.  Should I use
XMLNode.attributes[z-index]?  Is this kosher?

Thanks!
-g
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] XML attributes with - in the name

2006-05-12 Thread Thomas Fowler

I would use the XPath for AS2 class from xfactorstudio.com. This will allow
you to do a much more elegant retrieval of the attribute in question.

TF

On 5/12/06, Rifled Cloaca [EMAIL PROTECTED] wrote:


All,

I'm reading a SMIL file, and it has regions with - in an attribute
name (z-index).

Obviously, if I refer to the attrib explicitly, like
XMLnode.attributes.z-index, it'll read that as a minus.  Should I use
XMLNode.attributes[z-index]?  Is this kosher?

Thanks!
-g
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Re: Loader, LockRoot and diferences

2006-05-12 Thread Juan Anzaldo


If I use _level0 instead of _root, its the same
behavior? 

Ing. Juan Anzaldo
Tel Cel. 614 427-6523
Blog : http://janzaldo.blogspot.com

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Listener: 'Best Practice'

2006-05-12 Thread Doug Coning
Greetings Experts,

I'm writing to ask a 'best practice' question for how I should add a
Stage Listener to trigger a function that resizes components nested
throughout my project to fit inside the resized window.  Which of these
is considered 'best practice'? 

1) Attach a single Stage Listener to the _root level that triggers a
single function, which in turns, calls a resize function in every
MovieClip that I need to resize an object?
 
OR

2) Place a Stage listener in each and every Movie Clip that contains an
object that will need to be resized so that it is triggered in the movie
clip?

OR

3) Does it not matter?
 
Thank you, thank you, thank you...

Doug Coning 
Senior Web Development Programmer
FORUM Solutions, LLC
 
This e-mail and any attachment(s) are intended for the specified recipient(s) 
only and are legally protected.  If you have received this communication in 
error, please reply to sender's e-mail address with notification of the error 
and then destroy this message in all electronic and physical forms.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] good JSFL Newsgroup or Message Forum?

2006-05-12 Thread khair
I'm looking for a good JSFL Newsgroup or Message Forum.
Please give me good recommendations.

--Keith H--
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

RE: [Flashcoders] good JSFL Newsgroup or Message Forum?

2006-05-12 Thread Julian Dolce
Extend Flash is really good
http://lists.flashguru.co.uk/mailman/listinfo/extendflash



Julian Dolce | Senior Creative Technologist
 
FUEL INDUSTRIES
tel: 613.224.6738 x241
www.fuelindustries.com
blog.fuelindustries.com
www.fuelgames.com
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 12, 2006 4:06 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] good JSFL Newsgroup or Message Forum?

I'm looking for a good JSFL Newsgroup or Message Forum.
Please give me good recommendations.

--Keith H--

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] MovieClipLoader Script Timeout Bug?

2006-05-12 Thread clark slater

Posted this yesterday but it looks like there was a problem with the list,
sorry if some people get it twice.

I think I may have come across a bug in the intrinisc MovieClipLoader class.
When loading a large file using an instance of this class on a slow
connection, the script timeout error is thrown if the content takes longer
than ~ 1 minute to load. Replacing the MovieClipLoader with old fashioned
loadMovie resolves the issue.

This can be demonstrated with the following code:

- Empty FLA with emptymovieclip on stage instance name container

import mx.utils.Delegate;

class ContentLoader extends Object {

   private var mcl:MovieClipLoader;

   public function ContentLoader () {
   loadContent ();
   }

   private function loadContent () : Void {
   mcl = new MovieClipLoader ();
   mcl.onLoadProgress = Delegate.create (this, onLoadProgress);
   mcl.loadClip (myFile.swf, _level0.container);
   }

   private function onLoadProgress (target:MovieClip, loadedBytes:Number,
totalBytes:Number) : Void {
   trace (bytesLoaded:  + bytesLoaded);
   }

}

Anyone else encounter this issue? Kinda freaks me out because I have used
MovieClipLoader a LOT in past projects and now I'm thinking users with very
slow connections might be encountering this issue.

Clark
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: FW: [Flashcoders] sprouts data structure

2006-05-12 Thread Bernard Poulin

(I am re-sending this message - somehow, I got a disk full error message
from the flashcoders server)
--

Not sure what you mean by:   How do you tell when a dot has been encircled
by a line?  I do not understand why we need to keep track of cycles?  What
is the relation with your game constraints?  I am assuming these are
straight lines, right?  ...or can they be of any shape?

Essentially what you (seem to) want is simply checking if any line crosses
when the user interacts with a dot or a line. In other words, block the user
from drawing a line that will cross another one.  Just for that, you do not
need to keep track of all the possibilities in advance...

A straight array of dots and lines should be enough for this. ...or I must
be missing something.

I know that doing an intersection check on a complete graph can be a lengthy
task but:

Since this an interactive, human-driven game - you can reduce the
verification processing by just checking one move at a time. The processing
time will be at least linear (e.g. not exponential). So it should not be too
too bad - especially if the number of segments should fit on a screen in a
human-readable form ( 200 ?).

my 0,02$
B.


2006/5/12, Weldon MacDonald [EMAIL PROTECTED]:


My first thought was an adjacency list with something to indicate
forbidden edges (for a dot  inside a cycle), so it might help. The
problem isn't that simple though, as more and more moves are made
whose in what cycle and can make waht move is a good deal less than
clear.

On 5/12/06, André Goliath [EMAIL PROTECTED] wrote:
 FWIW if have written some AS2 classes some time ago that implement a
graph
 by using adjacenty lists.
 If it would help you let me know

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Weldon
 MacDonald
 Sent: Thursday, May 11, 2006 2:49 PM
 To: Flashcoders mailing list
 Subject: [Flashcoders] sprouts data structure

 I have a request for a game called sprouts. The game starts with a few
 randomly distributed dots. There is one move and 2 restrictions.
 Move:   draw a line for a dot to itself (a loop) or to another dot.
 Any line drawn has a new dot on it.
 Restriction 1: no more than 3 lines from any dot.
 Restriction 2: no lines can cross.

 Simple game, but the data structure to keep track of the game and in
 particular to handle restriction 2 is a bear. How do you tell when a
 dot has been encircled by a line?

 The game is, of course based on graph theory, and you can represent a
 graph in several ways, but how to determine that it remains planar?

 I haen't begun to think about the visual part of this, if I don't have
 a reasonable data structure I can't teach a computer to play the game.

 Any ideas? Hints? Wildly improbable ideas?

 --
 Weldon MacDonald
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com



--
Weldon MacDonald
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] [Job] Nike Jordan team: Blast Radius.com

2006-05-12 Thread Cary Newfeldt
Blast Radius is looking to Hire Senior AS2 OOP Flash developers for our 
Vancouver and possibly San Francisco Offices. If you, or someone you 
know are interested in working with the Nike Jordan brand team ( see 
www.jumpman23.com ), please send a copy of your CV and relevant code 
samples to cary.newfeldt *at* blastradius.com.


Regards,

Cary.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] HashMap?

2006-05-12 Thread Ron Wheeler
I would be a little surprised. There does not seem to be any way to 
control the hash parameters and every array would have a lot of wasted 
space for nothing and without any way to control the hash size and the 
percent utilization, you would not get a lot of advantage for the big 
arrays.


The Java HashMap defaults are pretty modest and would yield less than 
optimal performance with a big array.
You can set the parameters if you have a big array and know a bit about 
the randomness of your keys to get fast lookups with a reasonable 
trade-off in wasted space


Perhaps someone who knows the Flash Player internals could tell for sure.

Ron


Bernard Poulin wrote:

mmm... Are you implying that ActionScript objects are not hashmaps?
I thought they were *all* hashmaps (even Arrays are hashmaps). Every 
method

call that you do involves at least one hash lookup.

B.

2006/5/10, Ron Wheeler [EMAIL PROTECTED]:


It appears that a HashMap is a Java class that uses a hash on the key
to store its keys and values.
http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html
This would speed up lookup if you have a large set of keys.
If you do not need the speed or do not have a large collection of keys
to store, an array object would seem to give the same functionality in
ActionScript.
This leaves the implementation of the array to Flash and it is likely a
simple structure that has to be searched sequentially (by the Flash VM)
to get the associated value.

It you really need a hashing array that can handle large numbers of
key/value pairs, you probably have to write one. This is an old concept
and you can likely find a few design ideas and probably some code if you
search for it.

If you are converting code and want to create a HashMap class that has
the same methods as HashMap in Java, you could fake the internal storage
technology with a simple Array. it would be faster for a small set of
values and would get a bit slower as the number of keys increased.
You could start with a dumb HashMap class and then make it a true
hashing data store later without having to rewrite your code.
HashMap was only added to Java in Java 1.1 and they lived without it
before then.

Ron

Joshua Graham wrote:
 Bit strange, but that works, thanks.

 Joshua

 On 10 May 2006, at 12:06, Lee McColl-Sylvester wrote:

 Well, in AS2, it's called an object ;)

 Lee



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of 
Joshua

 Graham
 Sent: 10 May 2006 11:19
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] HashMap?

 Is there an AS3 equivalent of the java HashMap?

 Basically, I just need the ability to set key/value pairs quickly/
 easily.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com




 



 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Equidistant points on an ellipse!

2006-05-12 Thread Glenn Mitchell

Hi again,

got distracted by this last night,

here is some VERY messy code to dash a line on an elipse

ummm, there's no comments there either ... but I'll rewrite it with  
comments if anyone's interested :)


(the angular segments are also shown for reference)

it's a CPU hog, probably not good at all for anything animated, but  
if you're just creating static images ...



http://www.pixelassembly.com/testing/ellispeSegs.swf

http://www.pixelassembly.com/testing/ellispeSegs.fla

cheers,
glenn



On 11/05/2006, at 11:49 AM, pixelassembly wrote:


Hi,

 just to clarify,
are you trying to get the equal sided polygon into your elipse,
or are you wanting the points equal distance along the circumfrence
?

also why are you not getting accurate results when using a large  
point set ?

a) you need a crazy level of accuracy ?
b) the maths doesn't quite work ?

with a large point set, are you calculating the cumulative distance  
(point

to point around the circumference)
or the direct distance between points (for an equal sided polygon)


sorry, no answers, only questions :)

glenn


- Original Message -
From: Peter Gehring [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, May 11, 2006 4:31 AM
Subject: [Flashcoders] Equidistant points on an ellipse!


I'm really hoping someone can help...

I need to plot points at an equal distance along the circumfrence  
of an

Ellipse.
As it turns out, I'm pretty bad at geometry, which doesn't help.

I can plot the ellipse, but because I'm using sine/cos and  
incrementing with

theta the points are crunched towards the outside of the major radius.
I've tried a bunch of different approaches- recording lots (5000)  
of points,
then stepping through each to compare actual distance but I'm not  
getting

nearly accurate results this way.
I've looked at drawing dotted/dashed curves from drawing api/custom  
classes

but no luck.

If I could affect theta at the same rate the ellipse is plotted I  
think I'd

be ok, but I can't quite grasp it.

I've read all sorts of impossiblilites about this,and a lot of  
people having
miserable experience with this sort of thing (one guy spent 8 years  
trying

to fit an equal-sided polygon in to an ellipse).

But- at the end of the day I can go to the Flash IDE and draw an  
ellipse and

stroke it with an equally spaced dotted line!  I just need to do this
dynamically and record the points...

Any thoughts?

Thanks much,

Peter

[sorry if this is a duplicate]
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Restrict textarea

2006-05-12 Thread Jonathan Berry

Hello all,
I googled and read the livedocs and searched the archives for this to no
avail. How can one restrict carriage returns and newlines in TextInput and
TextArea components? I tried
input_ti.restrict = \u0020-\u007F; and input_ti.restrict =
^\u-\u0019;
but no luck with those. There appears to be some sort of carriage returns or
new line characters that are getting through. Hope you can advise or send me
a link. Thanks in advance.
--
Jonathan Berry, M.A.
IT Consultant
619.306.1712(m)
[EMAIL PROTECTED]
www.mindarc.com

---

This E-mail is covered by the Electronic Communications Privacy Act, 18
U.S.C. ?? 2510-2521 and is legally privileged.
This information is confidential information and is intended only for
the use of the individual or entity named above. If the reader of this
message is not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.

---
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: FW: [Flashcoders] sprouts data structure

2006-05-12 Thread Weldon MacDonald

The reqiurement is that the software be able to play the game, so I
need a data structure to store the game position for analysis. The
intersection check is moot until I can store the current state of the
game, update it, and analyze the potential moves.
If moves are made that create a cycle, then the possibility of a
vertex, or even a subgraph, being contained by that cycle exists,
which removes the possibility of edges to a vertex outside the cycle,
but not to the vertexes in the cycle. That would have to be
incorperated into the data structure.
I think the adjacency list might store the position, but then the AI
for the game will be very tough to do.
As for the intersection check this will work to prevent an illegal
move, but the tougher part will be making the computer move if the
best move is a line that loops around other vertices. Or maybe I
should forget programming and try my hand at cartooning!

On 5/12/06, Bernard Poulin [EMAIL PROTECTED] wrote:

(I am re-sending this message - somehow, I got a disk full error message
from the flashcoders server)
--

Not sure what you mean by:   How do you tell when a dot has been encircled
by a line?  I do not understand why we need to keep track of cycles?  What
is the relation with your game constraints?  I am assuming these are
straight lines, right?  ...or can they be of any shape?

Essentially what you (seem to) want is simply checking if any line crosses
when the user interacts with a dot or a line. In other words, block the user
from drawing a line that will cross another one.  Just for that, you do not
need to keep track of all the possibilities in advance...

A straight array of dots and lines should be enough for this. ...or I must
be missing something.

I know that doing an intersection check on a complete graph can be a lengthy
task but:

Since this an interactive, human-driven game - you can reduce the
verification processing by just checking one move at a time. The processing
time will be at least linear (e.g. not exponential). So it should not be too
too bad - especially if the number of segments should fit on a screen in a
human-readable form ( 200 ?).

my 0,02$
B.


2006/5/12, Weldon MacDonald [EMAIL PROTECTED]:

 My first thought was an adjacency list with something to indicate
 forbidden edges (for a dot  inside a cycle), so it might help. The
 problem isn't that simple though, as more and more moves are made
 whose in what cycle and can make waht move is a good deal less than
 clear.

 On 5/12/06, André Goliath [EMAIL PROTECTED] wrote:
  FWIW if have written some AS2 classes some time ago that implement a
 graph
  by using adjacenty lists.
  If it would help you let me know
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Weldon
  MacDonald
  Sent: Thursday, May 11, 2006 2:49 PM
  To: Flashcoders mailing list
  Subject: [Flashcoders] sprouts data structure
 
  I have a request for a game called sprouts. The game starts with a few
  randomly distributed dots. There is one move and 2 restrictions.
  Move:   draw a line for a dot to itself (a loop) or to another dot.
  Any line drawn has a new dot on it.
  Restriction 1: no more than 3 lines from any dot.
  Restriction 2: no lines can cross.
 
  Simple game, but the data structure to keep track of the game and in
  particular to handle restriction 2 is a bear. How do you tell when a
  dot has been encircled by a line?
 
  The game is, of course based on graph theory, and you can represent a
  graph in several ways, but how to determine that it remains planar?
 
  I haen't begun to think about the visual part of this, if I don't have
  a reasonable data structure I can't teach a computer to play the game.
 
  Any ideas? Hints? Wildly improbable ideas?
 
  --
  Weldon MacDonald
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 


 --
 Weldon MacDonald
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your 

RE: [Flashcoders] Restrict textarea

2006-05-12 Thread Matthew Simpson
Jonathon,

I'm not sure I understand...A user is inputting the special characters as they 
type?

Matthew


-Original Message-
From: [EMAIL PROTECTED] on behalf of Jonathan Berry
Sent: Fri 5/12/2006 6:24 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Restrict textarea
 
Hello all,
I googled and read the livedocs and searched the archives for this to no
avail. How can one restrict carriage returns and newlines in TextInput and
TextArea components? I tried
input_ti.restrict = \u0020-\u007F; and input_ti.restrict =
^\u-\u0019;
but no luck with those. There appears to be some sort of carriage returns or
new line characters that are getting through. Hope you can advise or send me
a link. Thanks in advance.
-- 
Jonathan Berry, M.A.
IT Consultant
619.306.1712(m)
[EMAIL PROTECTED]
www.mindarc.com

---

This E-mail is covered by the Electronic Communications Privacy Act, 18
U.S.C. ?? 2510-2521 and is legally privileged.
This information is confidential information and is intended only for
the use of the individual or entity named above. If the reader of this
message is not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.

---
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

[Flashcoders] scrollpane, dynamic forms, and refreshPane issues

2006-05-12 Thread Rich Rodecker

I am building a dynamic foom inside of a ScrollPane.  I am actually
using ScrollPane.contentPath and setting it to a blank clip from the
library, and then targeting that blank clip to build the form in by
using ScrollPane.content.

So I build the forms fields and assign some default text for the
TextInput components i've attached.  The first few fields the show
their text fine, but the ones lower down in the form (that you need to
scroll down to see) dont show their text, even though I know they are
being assigned ok since they trace out ok.

So ScrollPane.refreshPane() sounded like what I need, except that when
I do a refreshPane, I lose everything...all of my form fields
disappear.

Anyone know the right way to go about this scenario?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] scrollpane, dynamic forms, and refreshPane issues

2006-05-12 Thread Steven Sacks
refreshPane reloads the content of the pane.  This is different than it used
to be in Flash MX.  The undocumented way to to refresh the contents of the
pane is:

sp.setScrollProperties(sp.content._width, 1, sp.content._height, 1);

That doesn't help with your issue of text not appearing, though.   Are you
using embedded fonts?  Scrollpanes use masking and sometimes this might
cause an issue.  Are you using Flash 7 or Flash 8?

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] [Q] What's the relationship with the setFocus and the ComboBox component???

2006-05-12 Thread Jason

Howdy...  :)

Maybe there is something I am missing here but I've been scratching my head 
off for a couple hour, so I thought that I'd ask here and keep scraching...


Okay...  Open up a new Flash file in Flash MX 2004...
Create an input textField on the stage and give it an instance name of 
'test_txt'...

Add this simple script in another layer...

this.test_txt.onSetFocus = function ()
{
trace(onSetFocus :  + this.text);
}

this.test_txt.onKillFocus = function ()
{
trace(onKillFocus :  + this.text);
}

Test movie and you should see that both events get fired when you click 
inside/outside of the textField...


Now, wicked part...  Add a V2 ComboBox component to the stage from the 
Components panel...  Delete it from the stage so that the library can have 
the component...


Do the test movie again...  Click inside the textField and you will get 
onSetFocus...  Click outside the textField and you will see the onKillFocus 
AND onSetFocus at the same time...  So, the textField gets focused again...


Now, delete the ComboBox from the library and do the test movie again... 
It's back to normal...


What am I missing here???  Anybody???  :confused:

CyanBlue 



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] [Q] What's the relationship with the setFocus and the ComboBox component???

2006-05-12 Thread Vivek lakhanpal

Hi,

This doens't occur only if you put up a V2 component on stage. But you try
to do with any of the component. Put any component on stage and then remove
that from stage. you input text field won't leave the focus even after you
click outside. i.e. It will fire kill focus and then again set focus.

But if you create any small movie cilp and remove that from stage and then
try this it textfield will not except the focus again. i.e. if you click
outside the textfield it won't fire set focus again.

Moreover it's not occuring in case you put V1 i.e. MX component on stage and
then remove from stage.


The reason why it occurs in case of V2 components only is a bit strange to
me as well.

It can be due the classes/scripting written for V2 components?
Might be someone who has done some deeper coding with V2 components can
comment on it.

Thanks,
Vivek
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: FW: [Flashcoders] sprouts data structure

2006-05-12 Thread Bernard Poulin

oh my apologies, I really did not realize that you had to implement an
actual player and thus do all the AI. Actually had no clue about what this
game really looked like. I understand it a bit better now: The game plays
with 2 players, lines are not straight, new dots can be placed anywhere on
the line, one wins when its opponent cannot do a move.

Interestingly enough, the outcome is somehow deterministic: from Wikipedia:
http://en.wikipedia.org/wiki/Sprouts_(game)

[]By enumerating all possible moves, one can show that the first player is
guaranteed a win in games involving three, four, or five spots. The second
player can always win a game started with one, two, or six spots.

At Bell Labs http://en.wikipedia.org/wiki/Bell_Labs in
1990http://en.wikipedia.org/wiki/1990,
David 
Applegatehttp://en.wikipedia.org/w/index.php?title=David_Applegateaction=edit,
Guy 
Jacobsonhttp://en.wikipedia.org/w/index.php?title=Guy_Jacobsonaction=edit,
and Daniel Sleator http://en.wikipedia.org/wiki/Daniel_Sleator used a lot
of computer http://en.wikipedia.org/wiki/Computer power to push the
analysis out to eleven spots. They found that the first player has a winning
strategy when the number of spots divided by six leaves a remainder of
three, four, or five, and conjectured that this pattern continues beyond
eleven spots.[]
Regards,
B.

2006/5/12, Weldon MacDonald [EMAIL PROTECTED]:


The reqiurement is that the software be able to play the game, so I
need a data structure to store the game position for analysis. The
intersection check is moot until I can store the current state of the
game, update it, and analyze the potential moves.
If moves are made that create a cycle, then the possibility of a
vertex, or even a subgraph, being contained by that cycle exists,
which removes the possibility of edges to a vertex outside the cycle,
but not to the vertexes in the cycle. That would have to be
incorperated into the data structure.
I think the adjacency list might store the position, but then the AI
for the game will be very tough to do.
As for the intersection check this will work to prevent an illegal
move, but the tougher part will be making the computer move if the
best move is a line that loops around other vertices. Or maybe I
should forget programming and try my hand at cartooning!

On 5/12/06, Bernard Poulin [EMAIL PROTECTED] wrote:
 (I am re-sending this message - somehow, I got a disk full error
message
 from the flashcoders server)
 --

 Not sure what you mean by:   How do you tell when a dot has been
encircled
 by a line?  I do not understand why we need to keep track of
cycles?  What
 is the relation with your game constraints?  I am assuming these are
 straight lines, right?  ...or can they be of any shape?

 Essentially what you (seem to) want is simply checking if any line
crosses
 when the user interacts with a dot or a line. In other words, block the
user
 from drawing a line that will cross another one.  Just for that, you do
not
 need to keep track of all the possibilities in advance...

 A straight array of dots and lines should be enough for this. ...or I
must
 be missing something.

 I know that doing an intersection check on a complete graph can be a
lengthy
 task but:

 Since this an interactive, human-driven game - you can reduce the
 verification processing by just checking one move at a time. The
processing
 time will be at least linear (e.g. not exponential). So it should not be
too
 too bad - especially if the number of segments should fit on a screen in
a
 human-readable form ( 200 ?).

 my 0,02$
 B.


 2006/5/12, Weldon MacDonald [EMAIL PROTECTED]:
 
  My first thought was an adjacency list with something to indicate
  forbidden edges (for a dot  inside a cycle), so it might help. The
  problem isn't that simple though, as more and more moves are made
  whose in what cycle and can make waht move is a good deal less than
  clear.
 
  On 5/12/06, André Goliath [EMAIL PROTECTED] wrote:
   FWIW if have written some AS2 classes some time ago that implement a
  graph
   by using adjacenty lists.
   If it would help you let me know
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
Weldon
   MacDonald
   Sent: Thursday, May 11, 2006 2:49 PM
   To: Flashcoders mailing list
   Subject: [Flashcoders] sprouts data structure
  
   I have a request for a game called sprouts. The game starts with a
few
   randomly distributed dots. There is one move and 2 restrictions.
   Move:   draw a line for a dot to itself (a loop) or to another dot.
   Any line drawn has a new dot on it.
   Restriction 1: no more than 3 lines from any dot.
   Restriction 2: no lines can cross.
  
   Simple game, but the data structure to keep track of the game and in
   particular to handle restriction 2 is a bear. How do you tell when a
   dot has been encircled by a line?
  
   The game is, of course based on graph theory, and you can represent
a
   graph in several ways, 

Re: [Flashcoders] Restrict textarea

2006-05-12 Thread Jonathan Berry

Users are copying and pasting from a command line program and we are getting
some special characters that are coming through.

On 5/12/06, Matthew Simpson [EMAIL PROTECTED] wrote:


Jonathon,

I'm not sure I understand...A user is inputting the special characters as
they type?

Matthew


---
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] HashMap?

2006-05-12 Thread Bernard Poulin

I cannot say for AS3 implementation because I never tried it. (Which is the
original subject of this topic.)

In AS1, AS2 and javascript, I am pretty sure that all objects (including
Arrays) are key/value maps. (i.e. Associative arrays)
http://en.wikipedia.org/wiki/Associative_array#JavaScript

It is very possible that the internal implementation is not a hashmap,
but I still think it is a highly efficient map of some sort because this is
so central to the language.

...at least this is what I think.  I might be completely wrong.
B.

2006/5/12, Ron Wheeler [EMAIL PROTECTED]:


I would be a little surprised. There does not seem to be any way to
control the hash parameters and every array would have a lot of wasted
space for nothing and without any way to control the hash size and the
percent utilization, you would not get a lot of advantage for the big
arrays.

The Java HashMap defaults are pretty modest and would yield less than
optimal performance with a big array.
You can set the parameters if you have a big array and know a bit about
the randomness of your keys to get fast lookups with a reasonable
trade-off in wasted space

Perhaps someone who knows the Flash Player internals could tell for sure.

Ron


Bernard Poulin wrote:
 mmm... Are you implying that ActionScript objects are not hashmaps?
 I thought they were *all* hashmaps (even Arrays are hashmaps). Every
 method
 call that you do involves at least one hash lookup.

 B.

 2006/5/10, Ron Wheeler [EMAIL PROTECTED]:

 It appears that a HashMap is a Java class that uses a hash on the key
 to store its keys and values.
 http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html
 This would speed up lookup if you have a large set of keys.
 If you do not need the speed or do not have a large collection of keys
 to store, an array object would seem to give the same functionality in
 ActionScript.
 This leaves the implementation of the array to Flash and it is likely a
 simple structure that has to be searched sequentially (by the Flash VM)
 to get the associated value.

 It you really need a hashing array that can handle large numbers of
 key/value pairs, you probably have to write one. This is an old concept
 and you can likely find a few design ideas and probably some code if
you
 search for it.

 If you are converting code and want to create a HashMap class that has
 the same methods as HashMap in Java, you could fake the internal
storage
 technology with a simple Array. it would be faster for a small set of
 values and would get a bit slower as the number of keys increased.
 You could start with a dumb HashMap class and then make it a true
 hashing data store later without having to rewrite your code.
 HashMap was only added to Java in Java 1.1 and they lived without it
 before then.

 Ron

 Joshua Graham wrote:
  Bit strange, but that works, thanks.
 
  Joshua
 
  On 10 May 2006, at 12:06, Lee McColl-Sylvester wrote:
 
  Well, in AS2, it's called an object ;)
 
  Lee
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
 Joshua
  Graham
  Sent: 10 May 2006 11:19
  To: flashcoders@chattyfig.figleaf.com
  Subject: [Flashcoders] HashMap?
 
  Is there an AS3 equivalent of the java HashMap?
 
  Basically, I just need the ability to set key/value pairs quickly/
  easily.
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 
 
 
 


 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive: