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 the _accProps.name and call
Accessibility.updateProperties(), the screen reader never
automatically read the flash content. Instead, the user has to press
Enter key to focus the Home Page Reader to read current item.

I set focusSimple=true to the root accProps. When the flash movie is
loaded for the first time, I will set some welcome messages and the
basic information to the accProps name. Then every time the focused
movie clip is changed, I reset the accProps to crossponding data. So
after pressing ENTER key, the screen reader is able to read different
messages. Even the Flash movie loads external data at runtime,
crossponding new elemetns can be read.

Let me know if you need further information.

On 5/11/06, Jamie Owen [EMAIL PROTECTED] wrote:


Hello All.

I am experimenting with Accessibility and trying to discover how
screenreaders ( say JAWS ) respond to subsequent calls to
Accessibility.updateProperties() after the swf is loaded and first read by
the reader.

I'm no expert user of JAWS and all i've managed to get working is : HTTP
response  JAWS starts reading  reaches flash file  Reads out content
based on tab order and accProps  If i try and clear the accProps then
renew their values ( as what would happen if the swf content changes ) and
make a call to updateProperties() the content seems to stay the same.

Is there anyway to make the reader start reading the new content straight
away as what happens when a new page loads?

Is anyone an expert screenreader user or knows how the average screen reader
user handles a flash file?

Or can anyone shed some light on the whole Microsoft Active Accessibility
and flash / screen reader business?

Cheers

Jamie

_
Are you using the latest version of MSN Messenger? Download MSN Messenger
7.5 today! http://join.msn.com/messenger/overview

___
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] 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


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: 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 with the lowest interger, which
is not the number of the next lower level. This means winning
positions are 0's, the level above is non-0, the level above that must
be 0 again  Once you have all the positions labeled, the winning
strategy is simple. Move to a 0 position. Once on a 0 position you can
leap frog through the game from 0 position to 0 position until you
win. this is a class of games called Impersonal, 2 person games, or
I2p.
Mathematicians love these things. Since this recursive numbering grows
by a power function, on the number of possible moves, it's often only
feasible to run smaller, simplier cases, and then try to find winning
strategies that can be extended to more general cases. The goal is of
course a proof which may teach him something about graph theory.


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

 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 

[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: Flashcoders mailing list flashcoders@chattyfig.figleaf.com


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


--
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] 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;
  //Note: if 0 length string startPos will be 0
  var endPos = str.length-1;
  //Note: if 0 length string endPos will be -1
  while (startPosstr.length) {
 if (whiteSpace.indexOf(str.charAt(startPos))0) {
break;
 } else {
startPos++;
 }
  }
  while (endPos-1) {
 if (whiteSpace.indexOf(str.charAt(endPos))0) {
break;
 } else {
endPos--;
 }
  }
  if (startPosendPos) {
 return ;
  }
  return str.substring(startPos, endPos+1);
   }

   static function strip(str:String):String {
  //trace(Text.strip called:  + str);
  var whiteSpace = \r\n\t\f;
  var tempStr = ;
  for (var i = 0; i  str.length; i++){
 var c = str.charAt(i);
 if (whiteSpace.indexOf(c) == -1) {
tempStr += c;
 }
  }
  return tempStr;
   }
   
}


-Original Message-
From: [EMAIL PROTECTED] on behalf of Jonathan Berry
Sent: Sat 5/13/2006 1:08 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Restrict textarea
 
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


___
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-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/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.

I would hope that it is efficient but hashing adds a lot of overhead and 
wasted space for small arrays and really needs to be tuned to get the 
desired results for larger arrays.
If the arrays are stored in sorted order, then the normal key lookup can 
be done as a binary lookup which will be a lot quicker than an 
exhaustive search. The price is paid when a new associative entry is added.


Nothing is free.

None of my work has required has involved large associative arrays where 
hashing would add a significant improvement in speed but it would be 
nice to have such a class available for those who need it.


In the early days (1960s) when I was taking Computer Science at 
University, we spent a lot of time worrying about these things since 
memory was scarce (64K word (36 bits per word) computer cost a million 
dollars and supported 16 users) and CPU speeds where not very fast (a 
1MIP computer was state of the art).


If really had to look carefully at how things got stored and retrieved, 
it you had a large number of them.

...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 

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 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@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-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 to add 
them).

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Ron Wheeler
Sent:   Sat 5/13/2006 10:43 AM
To: Flashcoders mailing list
Cc: 
Subject:Re: [Flashcoders] HashMap?



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/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.

I would hope that it is efficient but hashing adds a lot of overhead and 
wasted space for small arrays and really needs to be tuned to get the 
desired results for larger arrays.
If the arrays are stored in sorted order, then the normal key lookup can 
be done as a binary lookup which will be a lot quicker than an 
exhaustive search. The price is paid when a new associative entry is added.

Nothing is free.

None of my work has required has involved large associative arrays where 
hashing would add a significant improvement in speed but it would be 
nice to have such a class available for those who need it.

In the early days (1960s) when I was taking Computer Science at 
University, we spent a lot of time worrying about these things since 
memory was scarce (64K word (36 bits per word) computer cost a million 
dollars and supported 16 users) and CPU speeds where not very fast (a 
1MIP computer was state of the art).

If really had to look carefully at how things got stored and retrieved, 
it you had a large number of them.
 ...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 

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.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-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 the overflow.
Similarly, lookups will start to hit links rather than data which will 
require that the links into the overflow area be followed.


This is where tuning comes in.

The fact that there are no tuning options makes it unlikely that hashing 
is used.
Defaults would be hard to set without wasting space or turning the whole 
thing into a small set of linked lists which work be long to search.
It would not be seem to be a very good choice for a default 
implementation of Arrays.


Ron

Scott Hyndman wrote:

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 to add 
them).

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Ron Wheeler
Sent:   Sat 5/13/2006 10:43 AM
To: Flashcoders mailing list
Cc: 
Subject:Re: [Flashcoders] HashMap?



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/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.


I would hope that it is efficient but hashing adds a lot of overhead and 
wasted space for small arrays and really needs to be tuned to get the 
desired results for larger arrays.
If the arrays are stored in sorted order, then the normal key lookup can 
be done as a binary lookup which will be a lot quicker than an 
exhaustive search. The price is paid when a new associative entry is added.


Nothing is free.

None of my work has required has involved large associative arrays where 
hashing would add a significant improvement in speed but it would be 
nice to have such a class available for those who need it.


In the early days (1960s) when I was taking Computer Science at 
University, we spent a lot of time worrying about these things since 
memory was scarce (64K word (36 bits per word) computer cost a million 
dollars and supported 16 users) and CPU speeds where not very fast (a 
1MIP computer was state of the art).


  


If really had to look carefully at how things got stored and retrieved, 
it you had a large number of them.


should have been written as

One really had to look carefully at how things got stored and retrieved, 
if you had a large number of them.



...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 

[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 ?


___
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] 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 MovieClipLoader.unloadClip method
simply stop the downloading of the image ?


___
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





--
j:pn
http://www.lennel.org
___
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] 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_2004file=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
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 ?


___
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] 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, Weldon MacDonald [EMAIL PROTECTED] wrote:


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: Flashcoders mailing list flashcoders@chattyfig.figleaf.com


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


--
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


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 although it doesn't
fire the onLoadError method like it says it should in the help docs.


Le 13/05/06 15:26, « Johannes Nel » [EMAIL PROTECTED] a écrit :

 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 MovieClipLoader.unloadClip method
 simply stop the downloading of the image ?
 
 
 ___
 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] 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).  However, when I use our remote server to 
get it, not from my own personal broadband connection, there is no 
problem.  Does anyone (Geoff Stearns, perhaps?) know how I could rig 
up the express install code to use our server as a proxy?


---asai 


___
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] Stop loading

2006-05-13 Thread Gerry Creighton

I just tested this code and it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test this.
I used the setInterval just to do a quick test that it shuts off  
after 10 seconds.


Gerry
 
...

http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
 
...


On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip  
method

simply stop the downloading of the image ?


___
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] 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.
 code
 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);
 /code
 
 I of course put the swf and the mp3 in the same directory to test this.
 I used the setInterval just to do a quick test that it shuts off
 after 10 seconds.
 
 Gerry
 
 ...
 http://www.thespikeranch.com
 Certified Macromedia Flash MX Designer
 
 ...
 
 On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
 method
 simply stop the downloading of the image ?
 
 
 ___
 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] 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 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, Weldon MacDonald [EMAIL PROTECTED] wrote:

 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: Flashcoders mailing list flashcoders@chattyfig.figleaf.com


 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


 --
 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] 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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  
this.

I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. 
...

...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. 
...

...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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] Stop loading

2006-05-13 Thread Gerry Creighton

What about using the following code... s.loadSound(,true);
code
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= setInterval(stopSong , 5000);
/code

This would load nothing.
Gerry



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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  
this.

I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. 
...

...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. 
...

...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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] 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 ;
  var whiteSpace =  \r\n\t\f;
  //Make sure str is a string
  var startPos = 0;
  //Note: if 0 length string startPos will be 0
  var endPos = str.length-1;
  //Note: if 0 length string endPos will be -1
  while (startPosstr.length) {
 if (whiteSpace.indexOf(str.charAt(startPos))0) {
break;
 } else {
startPos++;
 }
  }
  while (endPos-1) {
 if (whiteSpace.indexOf(str.charAt(endPos))0) {
break;
 } else {
endPos--;
 }
  }
  if (startPosendPos) {
 return ;
  }
  return str.substring(startPos, endPos+1);
   }

   static function strip(str:String):String {
  //trace(Text.strip called:  + str);
  var whiteSpace = \r\n\t\f;
  var tempStr = ;
  for (var i = 0; i  str.length; i++){
 var c = str.charAt(i);
 if (whiteSpace.indexOf(c) == -1) {
tempStr += c;
 }
  }
  return tempStr;
   }

}


-Original Message-
From: [EMAIL PROTECTED] on behalf of Jonathan
Berry
Sent: Sat 5/13/2006 1:08 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Restrict textarea

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




___
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





--
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: [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 Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of clark slater
Sent: 12 May 2006 21:43
To: [FlashCoders]
Subject: [Flashcoders] MovieClipLoader Script Timeout Bug?

 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

___
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] 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 flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 6:21 PM
Subject: Re: [Flashcoders] Stop loading


What about using the following code... s.loadSound(,true);
code
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= setInterval(stopSong , 5000);
/code

This would load nothing.
Gerry



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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  this.
I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. ...
...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. ...
...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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] 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
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@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-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, Steven Sacks [EMAIL PROTECTED] wrote:
 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@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] 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 mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 6:21 PM
Subject: Re: [Flashcoders] Stop loading


What about using the following code... s.loadSound(,true);
code
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= setInterval(stopSong , 5000);
/code

This would load nothing.
Gerry



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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  this.
I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. ...
...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. ...
...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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] 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):

code

this.audio.stop ();
//
delete this.audio.onSoundComplete;
//
this.audio = null;
// The only way to stop a sound from downloading is to delete it
delete this.audio;

/code



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Hoffman
Sent: Saturday, May 13, 2006 10:47 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Stop loading

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 mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 6:21 PM
Subject: Re: [Flashcoders] Stop loading


What about using the following code... s.loadSound(,true);
code
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= setInterval(stopSong , 5000);
/code

This would load nothing.
Gerry



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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  this.
I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. ...
...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. ...
...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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

___
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] 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 flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 11:46 PM
Subject: Re: [Flashcoders] Stop loading


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 mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 6:21 PM
Subject: Re: [Flashcoders] Stop loading


What about using the following code... s.loadSound(,true);
code
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= setInterval(stopSong , 5000);
/code

This would load nothing.
Gerry



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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  this.
I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. ...
...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. ...
...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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 


___
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] 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' flashcoders@chattyfig.figleaf.com
Sent: Sunday, May 14, 2006 12:05 AM
Subject: RE: [Flashcoders] Stop loading


I thought that I read someplace that this method worked (Where 'audio' is a
created sound object):

code

this.audio.stop ();
//
delete this.audio.onSoundComplete;
//
this.audio = null;
// The only way to stop a sound from downloading is to delete it
delete this.audio;

/code



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Hoffman
Sent: Saturday, May 13, 2006 10:47 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Stop loading

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 mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 6:21 PM
Subject: Re: [Flashcoders] Stop loading


What about using the following code... s.loadSound(,true);
code
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= setInterval(stopSong , 5000);
/code

This would load nothing.
Gerry



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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  this.
I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. ...
...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. ...
...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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

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

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 object does, in fact, 
curtail an earlier loading of a different sound into the same object:


http://www.dartfrogmedia.com/stopSoundLoad/index.html

In this test, press the first button to start 
streaming a 5.7 MB MP3 (just a long pink noise) 
via a Sound object. Then immediately press the 
second button, which attempts to load a 
non-existent MP3 into the same Sound object. Wait 
a minute and check your browser cache and you'll 
see the first sound (longSound.mp3) never 
loaded. If you then click the first button again 
but DON'T click the second button, and wait a 
minute or so (depending on connection speed), 
you'll see that longSound.mp3 DOES show in the browser cache.


Marc Hoffman

At 09:28 PM 5/13/2006, you wrote:
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 flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 11:46 PM
Subject: Re: [Flashcoders] Stop loading


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 mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 6:21 PM
Subject: Re: [Flashcoders] Stop loading


What about using the following code... s.loadSound(,true);
code
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= setInterval(stopSong , 5000);
/code

This would load nothing.
Gerry



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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  this.
I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. ...
...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. ...
...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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] 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 flashcoders@chattyfig.figleaf.com
Sent: Sunday, May 14, 2006 12:50 AM
Subject: Re: [Flashcoders] Stop loading


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 object does, in fact,
curtail an earlier loading of a different sound into the same object:

http://www.dartfrogmedia.com/stopSoundLoad/index.html

In this test, press the first button to start
streaming a 5.7 MB MP3 (just a long pink noise)
via a Sound object. Then immediately press the
second button, which attempts to load a
non-existent MP3 into the same Sound object. Wait
a minute and check your browser cache and you'll
see the first sound (longSound.mp3) never
loaded. If you then click the first button again
but DON'T click the second button, and wait a
minute or so (depending on connection speed),
you'll see that longSound.mp3 DOES show in the browser cache.

Marc Hoffman

At 09:28 PM 5/13/2006, you wrote:
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 flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 11:46 PM
Subject: Re: [Flashcoders] Stop loading


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 mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, May 13, 2006 6:21 PM
Subject: Re: [Flashcoders] Stop loading


What about using the following code... s.loadSound(,true);
code
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= setInterval(stopSong , 5000);
/code

This would load nothing.
Gerry



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 it worked as it should.
code
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);
/code

I of course put the swf and the mp3 in the same directory to test  this.
I used the setInterval just to do a quick test that it shuts off
after 10 seconds.

Gerry
. 
...

...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
. 
...

...

On May 13, 2006, at 3:23 PM, Patrick Matte 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 MovieClipLoader.unloadClip
method
simply stop the downloading of the image ?


___
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