RE: [Flashcoders] HashMap?

2006-05-13 Thread Scott Hyndman
Well, yes. Now that I think about it my test didn't make much sense, since there would be no way of determining how keys are generated by insertions alone...I was assuming a uniform distribution, and it can't be done without knowing more. But I believe that the Flash uses a tree to implement it

[Flashcoders] netStream.close()

2006-05-13 Thread aaron smith
does anyone know how to close down an open netstream and stop it from downloading data? so after I call a netStream.play(flv) if I call netStream.close() it doesnt seem to stop it from dlownloading data. or even do what the livedocs say it should for that matter. kinda sketchy.. what if I call

Re: [Flashcoders] Stop loading

2006-05-13 Thread Patrick Matte
I guess you're right about the getBytesLoaded method. Another test we should do is just deleting the Sound object like Ash said in is reply. - Original Message - From: "Marc Hoffman" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Sunday, May 14, 2006 12:50 AM Subject: Re: [

Re: [Flashcoders] Stop loading

2006-05-13 Thread Marc Hoffman
Well, Sound.getBytesLoaded() wouldn't show if a sound was continuing to load into cache after starting to load a new (or even missing) sound file into the same sound object. It would just show loading for the new sound. But I just ran a test which shows that loading a new sound into a sound

Re: [Flashcoders] Stop loading

2006-05-13 Thread Patrick Matte
Thanks. I had not tried that one. No need to load another sound then. It is so simple, i guess i was looking too far : ) - Original Message - From: "Ash Warren" <[EMAIL PROTECTED]> To: "'Flashcoders mailing list'" Sent: Sunday, May 14, 2006 12:05 AM Subject: RE: [Flashcoders] Stop loa

Re: [Flashcoders] Stop loading

2006-05-13 Thread Patrick Matte
You can watch a sound loading with an interval tracing the Sound.getBytesLoaded method. - Original Message - From: "Marc Hoffman" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Saturday, May 13, 2006 11:46 PM Subject: Re: [Flashcoders] Stop loading How do you know the soun

RE: [Flashcoders] Stop loading

2006-05-13 Thread Ash Warren
I thought that I read someplace that this method worked (Where 'audio' is a created sound object): this.audio.stop (); // delete this.audio.onSoundComplete; // this.audio = null; // The only way to stop a sound from downloading is to delete it

Re: [Flashcoders] Stop loading

2006-05-13 Thread Marc Hoffman
How do you know the sound is no longer loading? At 07:32 PM 5/13/2006, you wrote: Yes thats exactly what i found, loading another sound is the only way to stop a sound from loading once its started. - Original Message - From: "Gerry Creighton" <[EMAIL PROTECTED]> To: "Flashcoders maili

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

2006-05-13 Thread Rich Rodecker
i should say i am using flash 8, but exporting to flash 7. On 5/13/06, Rich Rodecker <[EMAIL PROTECTED]> wrote: im using flash 8. i am embedding the fonts by doing a setStyle() on the TextInput's global style definition, and exporting the font in the text field on the stage. On 5/12/06, S

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

2006-05-13 Thread Rich Rodecker
im using flash 8. i am embedding the fonts by doing a setStyle() on the TextInput's global style definition, and exporting the font in the text field on the stage. On 5/12/06, Steven Sacks <[EMAIL PROTECTED]> wrote: refreshPane reloads the content of the pane. This is different than it used

Re: [Flashcoders] Stop loading

2006-05-13 Thread Patrick Matte
Yes thats exactly what i found, loading another sound is the only way to stop a sound from loading once its started. - Original Message - From: "Gerry Creighton" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Saturday, May 13, 2006 6:21 PM Subject: Re: [Flashcoders] Stop loa

RE: [Flashcoders] MovieClipLoader Script Timeout Bug?

2006-05-13 Thread jim
I have had this problem too, I don't know of a way in code to get rid of it, but there are tools around that you can lengthen the script timeout of a flash movie to whatever you want. Obviously this is a bit dangerous, but if you are careful you can get the results you desire. Jim -Original M

Re: [Flashcoders] Restrict textarea

2006-05-13 Thread Jonathan Berry
Thank you, Matthew. I will adapt this. On 5/13/06, Matthew Simpson <[EMAIL PROTECTED]> wrote: add in the special chars you want removed... class Text { static function trim(str:String):String { //trace("Text.trim called: " + str); if (typeof str != "string") return "";

Re: [Flashcoders] Stop loading

2006-05-13 Thread Gerry Creighton
What about using the following code... s.loadSound("",true); var s:Sound = new Sound(); s.loadSound("Finish Line.mp3" , true); s.start(999,1); function stopSong(){ //s.stop(); s.loadSound("",true); clearInterval(myTimer); trace("stopSong called"); } myTimer= setInt

Re: [Flashcoders] Stop loading

2006-05-13 Thread Gerry Creighton
True...I didn't cover that. On May 13, 2006, at 6:01 PM, Patrick Matte wrote: Your code will actually stop the streaming sound from playing, but not from being downloaded from the server. Le 13/05/06 17:14, « Gerry Creighton » <[EMAIL PROTECTED]> a écrit : I just tested this code and

Re: [Flashcoders] Fwd: sprouts data structure

2006-05-13 Thread Weldon MacDonald
unfortunately he only has the byte code for download. I'm trying a few sources for some clue On 5/13/06, David Rorex <[EMAIL PROTECTED]> wrote: Do you mean this site? http://www.math.utah.edu/~alfeld/Sprouts/ It appears to not have any AI, however it does appear to check the rules, so it may be

Re: [Flashcoders] Stop loading

2006-05-13 Thread Patrick Matte
Your code will actually stop the streaming sound from playing, but not from being downloaded from the server. Le 13/05/06 17:14, « Gerry Creighton » <[EMAIL PROTECTED]> a écrit : > I just tested this code and it worked as it should. > > var s:Sound = new Sound(); > s.loadSound("Finish Line.mp3

Re: [Flashcoders] Stop loading

2006-05-13 Thread Gerry Creighton
I just tested this code and it worked as it should. var s:Sound = new Sound(); s.loadSound("Finish Line.mp3" , true); s.start(999,1); function stopSong(){ s.stop(); clearInterval(myTimer); trace("stopSong called"); } myTimer= setInterval(stopSong , 1); I of course pu

[Flashcoders] Proxy for Express Install

2006-05-13 Thread Asai
Adobe still hasn't fixed the problem (it seems to be coming from them anyway) which is preventing me and others from other parts of the country (and world) from being able to download the Flash Player using the express install feature (or simply trying to download it direct from their site). H

Re: [Flashcoders] Stop loading

2006-05-13 Thread Patrick Matte
It seems the only way to stop a sound from loading is to start loading another sound in the same Sound Object. You can even load a sound that doesn't actually exists on the server, it creates an error but it stops the sound from loading. For MovieClipLoader, the unloadClip method works fine althou

Re: [Flashcoders] Fwd: sprouts data structure

2006-05-13 Thread David Rorex
Do you mean this site? http://www.math.utah.edu/~alfeld/Sprouts/ It appears to not have any AI, however it does appear to check the rules, so it may be a good starting point. This is an interesting topic to me, please be sure to keep us updated if you have any success! -David R On 5/13/06, Weld

Re: [Flashcoders] Stop loading

2006-05-13 Thread Gerry Creighton
Have you researched the livedocs yet? http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/ common/html/wwhelp.htm?context=Flash_MX_2004&file=0364.html#77315 On May 13, 2006, at 3:23 PM, Patrick Matte wrote: Whats the best way to stop a sound from loading ? I fired the Soun

Re: [Flashcoders] Stop loading

2006-05-13 Thread Johannes Nel
afaik there is no way to stop the actual load. On 5/13/06, Patrick Matte <[EMAIL PROTECTED]> wrote: Whats the best way to stop a sound from loading ? I fired the Sound.loadsound() method but suddenly for a reason, I need to stop the loading right away. Same thing with MovieClipoader. Will the

[Flashcoders] Stop loading

2006-05-13 Thread Patrick Matte
Whats the best way to stop a sound from loading ? I fired the Sound.loadsound() method but suddenly for a reason, I need to stop the loading right away. Same thing with MovieClipoader. Will the MovieClipLoader.unloadClip method simply stop the downloading of the image ? _

Re: [Flashcoders] HashMap?

2006-05-13 Thread Ron Wheeler
Wouldn't it be true to say that hash maps will get slower as the probability of collisions increase? As the primary area fills up, there will be more occasions when the new key to be added, hashes to a storage location already occupied and a link structure will be needed to store the key(s) in

Re: [Flashcoders] HashMap?

2006-05-13 Thread Johannes Nel
the dictionary object in as3 allows you to use a class as the key. it also uses weak references for the keys (but not for the values). ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figle

RE: [Flashcoders] HashMap?

2006-05-13 Thread Scott Hyndman
You could figure out how it's implemented by doing some experiments. Dynamic hash maps have constant insertion (amortized) and lookup time. If the map is implemented using a B-Tree, then you'll see O(log(n)) times (so just see if the more properties you add increase the amount of time it takes t

Re: [Flashcoders] Equidistant points on an ellipse!

2006-05-13 Thread Ron Wheeler
Not that hard on CPU. It only got to 63% on my old 1 GHz Windows PC. Ron Glenn Mitchell wrote: 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 inter

Re: [Flashcoders] HashMap?

2006-05-13 Thread Ron Wheeler
Bernard Poulin wrote: 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/Associ

RE: [Flashcoders] Restrict textarea

2006-05-13 Thread Matthew Simpson
add in the special chars you want removed... class Text { static function trim(str:String):String { //trace("Text.trim called: " + str); if (typeof str != "string") return ""; var whiteSpace = " \r\n\t\f"; //Make sure str is a string var startPos = 0; //

[Flashcoders] Fwd: sprouts data structure

2006-05-13 Thread Weldon MacDonald
Good news, I just found some code on the U of Utah site. I';ts in java, but it should allow me work out my own implimentation in action script -- Forwarded message -- From: Weldon MacDonald <[EMAIL PROTECTED]> Date: May 11, 2006 8:48 AM Subject: sprouts data structure To: Flashcod

Re: FW: [Flashcoders] sprouts data structure

2006-05-13 Thread Weldon MacDonald
Yes, and the idea isn't difficult, but can be computationally expensive. Generate a tree of possible moves and number them recursively, starting with 0 at the leaves of the tree (note the leaves are winning positions as there are no further moves). Then work back up the tree numbering each level

RE: [Flashcoders] XML attributes with "-" in the name

2006-05-13 Thread Adrian Lynch
Yes, that's the way I've been getting at attributes. No problems so far. Adrian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rifled Cloaca Sent: 12 May 2006 20:09 To: Flashcoders mailing list Subject: [Flashcoders] XML attributes with "-" in the name Al

Re: [Flashcoders] Accessibility, MSAA & Screenreaders

2006-05-13 Thread Jove
Hi Jamie, I am working on several Flash RIAs and recently focus on the accessibility support (screen reader, keyboard navigation, colorblind, high contrary, etc..). For some reason, the only screen reader we officially support is IBM Home Page Reader 3.04+. Same as you, I find even I change th