[Flashcoders] RSS Reader Component for Flash

2007-03-06 Thread Phil Dupré

I'm looking for a RSS Reader component that can syndicate the first couple
of sentences from web pages elsewhere, which will be text from a blog for
example.  Ideally, I'd like the feeder to display quick links and a few
sentences of content in a similar manner as www.popurl.com.

Anyone reccommend any good components or suggestions for an alternative?  I
noticed this on flashloaded, but I'm not totally sold on it.
http://www.flashloaded.com/flashcomponents/rssreader/
___
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] clearInterval(0);

2007-03-06 Thread Muzak
or:

var num:Number = Number.NaN;
trace(isNaN(num));

regards,
Muzak

- Original Message - 
From: "Andy Herrman" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, March 06, 2007 6:37 PM
Subject: Re: [Flashcoders] clearInterval(0);


>I would suggest initializing the interval value as NULL instead of 0,
> since I think 0 is a valid ID.  That way you can be sure you don't
> accidentally clear an interval that you don't want to.
>
>   -Andy
>


___
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] RE: Cache Killer... is it bulletproof ???

2007-03-06 Thread Steven Sacks | BLITZ
> A: deny a user from hotlinking 

Meaning?

B: deny cacheing of swf files and content

Impossible.

> C: deny playability locally. 

Check for domain at launch. If domain doesn't match, don't play.


"Cache Killer" isn't about keeping something from being cached (which
you can't do), it's about forcing the browser to not load the cached
version but instead get the latest version from the server.
___
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] Why doesn't the arrays display

2007-03-06 Thread Andy Andersson
Hi List,
I have a problem with loading the arrays I'm getting back from a database
(web service). I trace the arrays and they show up perfect in the output
window, but when I try to assign them to a text area component to display in
there, nothing shows up inside the Text Component.

I don't have really much experience with this kind of flash work, so any
help or guidelines would be really helpful.

I did not post the actual URL, because the url is behind a firewall, so no
one will access it from outside. And also I pass a fixed params, I left that
blank for the same reason.

Thanks
Andy

// I have the component inside my lib so it's not that kind of a problem.//

//AS Code//
import mx.data.components.WebServiceConnector;
import mx.controls.TextArea;
import mx.data.binding.*;

var commTA:TextArea = createClassObject(TextArea, "text_txt",
this.getNextHighestDepth());
commTA.setSize(290, 100);
commTA.move(1, 1);
commTA.wordWrap = true;

var wsComment:WebServiceConnector = new WebServiceConnector();
var WSListener:Object = new Object();
WSListener.send = function(evtObj:Object):Void {
//trace ("sending data");
}
WSListener.result = function(evtObj:Object):Void {
var bindingResults:Array = evtObj.target.results;

trace("Starting to display comment data");
for(var i = 0; i < bindingResults.articles.length; i++) {

trace("");
// Article info
trace("Article Info");
trace(bindingResults.articles[i].articleTitle);
trace(bindingResults.articles[i].articleDate);
trace(bindingResults.articles[i].countComments);



// Poster Info
trace("Poster Info");
trace(bindingResults.articles[i].posterInfo.userId);
trace(bindingResults.articles[i].posterInfo.firstName);
trace(bindingResults.articles[i].posterInfo.lastName);

// Fourm URL to the comment post
trace("Forum URL");
trace(bindingResults.articles[i].forumUrl);

}


};
wsComment.addEventListener("send", WSListener);
wsComment.addEventListener("result", WSListener);

wsComment.WSDLURL = "THE URL HERE";
wsComment.operation = "getActivityComments";
wsComment.multipleSimultaneousAllowed = false;
wsComment.suppressInvalidCalls = true;
wsComment.params = ["a fixed params here"];

wsComment.trigger();


var fromBinding:EndPoint = new EndPoint();
var toBinding:EndPoint = new EndPoint();
fromBinding.component = wsComment;
fromBinding.property = "results";
toBinding.component = commTA;
toBinding.property = "text";
var newBinding:Binding = new Binding(fromBinding, toBinding);




___
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] FileReference.dowload() Open/Save Dialog?

2007-03-06 Thread Battershall, Jeff
When downloading using FileReference, is it possible to get the standard
open/save dialog you normally see in IE? It would seem not, but I'm just
checking.

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)
___
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] AS3 parseFloat issue?

2007-03-06 Thread Jim Cheng

Fumio Nonaka wrote:

2 floating point numbers are NOT "close enough".  That IS the problem.

var _str:String = "1.2e+51";
var n:Number = parseFloat(_str);
trace((n-1.2e+51) > 1000);  // true


In ActionScript 3, the native Number data type is internally represented 
as a IEEE-754 double-precision floating-point number.  Due to the way 
that the IEEE-754 standard defines how the bits are used to represent 
the number, the accuracy of the mantissa precision (always 52 bits, or 
16 decimal digits) changes depending on the exponent (always 11 bits).


See:  http://en.wikipedia.org/wiki/IEEE_754

This is to say, the "close enough" value that you need to compare the 
absolute difference between the two Numbers scales in magnitude with the 
exponent.  This can be particularly bad if you need arbitrary precision, 
(e.g. when doing financial or scientific calcuations), as while 1.32e+36 
is paltry compared to 1.2e+51, no one would want to be swindled out of 
1.32e+36 dollars due to faulty floating point comparisons, hence the 
need for arbitrary precision integer libraries for such applications as 
was recently mentioned on this list.


Fortunately however, if you don't need this kind of exact precision, but 
simply need to match large values originally parsed from strings to 
Numbers as per your example, there is a much better and easier way to 
compare very large Numbers in ActionScript 3--by inspecting them at the 
bit level following the IEEE-754 specification.


From previous data packing experiments, I've found that the last nibble 
(4 bits) of a 64-bit Number isn't reliable when you're casting to and 
from Numbers (e.g. reading 8 bytes out of a ByteArray into a Number or 
doing round-trips via the toString and parseFloat methods).  I'm not 
sure why this is the case--perhaps someone from Adobe can reply and 
speak to this particular issue.


That being said, all you really need to do for a nearly-equals Number 
comparison is a byte-by-byte comparison save for the last byte, in which 
case you only compare the four most significant bits.  If all bits aside 
from the last nibble match, the Numbers are close enough.


Here's how I do it:



/**
 * Compare two ActionScript 3 Numbers for near-equality.
 *
 * @param  The first Number
 * @param  The second Number
 *
 * @return True on near-equality, false otherwise.
 */
public function closeEnough(a:Number, b:Number):Boolean {
  var ba:ByteArray, i:uint;
  if (a == b) {
// A is explicitly equal to B
return true;
  }
  else {
// A isn't exactly equal to B, so we need to
// check the Numbers' bytes one byte at a time.
ba = new ByteArray();
ba.writeDouble(a);
ba.writeDouble(b);

// If any of the first 7 bytes differ, then
// the two values are not close enough.
for (i = 0; i < 7; i++) {
  if (ba[i] != ba[i + 8]) {
return false;
  }
}

// Mask the last four bits out and compare the
// last byte.  If they match, the Numbers are
// close enough.  The last nibble tends not to
// be reliable enough for comparison, so we
// allow these to differ and the two Numbers
// still be considered close enough.
if ((ba[7] & 0xf0) != (ba[15] & 0xf0)) {
  return false; 
}
  }
  return true;
}



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

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


[Flashcoders] RE: Cache Killer... is it bulletproof ???

2007-03-06 Thread Lone Wolf
I'm very interested in this subject. Most of my searches seem to come up 
short. I've been trying to  A: deny a user from hotlinking B: deny cacheing 
of swf files and content ( gallery images, & descriptions xml file ) C: deny 
playability locally. I've tried several other methods but they seem to be a 
bit glitchy. Could someone give me an AS example on how to impliment this?


_
Rates near 39yr lows!  $430K Loan for $1,399/mo - Paying Too Much? Calculate 
new payment 
http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18226&moid=7581


___
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] AS3 parseFloat issue?

2007-03-06 Thread Fumio Nonaka

2 floating point numbers are NOT "close enough".  That IS the problem.

var _str:String = "1.2e+51";
var n:Number = parseFloat(_str);
trace((n-1.2e+51) > 1000);  // true
_
Ron Wheeler wrote:
If you want to know that 2 floating point numbers are "close enough" to 
be considered as the same value, then subtract them and check to see if 
the absolute value of their difference is less than your criteria for 
"sameness".



elibol wrote:

I came to this specific value from 6.3e51. Here are some more tests:

var test1_str:String = "6.3e51"; //6.3e+51 outputs same result.
var n1:Number = parseFloat(test1_str);



trace(n1-(6.3e51));

//AS3



1.32922799578491e+36



On 3/5/07, Fumio Nonaka <[EMAIL PROTECTED]> wrote:

I am not sure whether it is a bug or by design, though.

var test0_str:String = "6.30e+51";
var n0:Number = parseFloat(test0_str);



trace(n0-(6.30e+51));
// ActionScript 3.0



1.32922799578491e+36
// ActionScrpt 2.0



0


Good luck,
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books
Flash community

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

2007-03-06 Thread Laurent CUCHET
How can I do to convert Datagrid Accent ?
I got a function name “replaceAccents” convert Textfield accent but I don’t
find the way to done it with datagrid as show after.

Thank you for your tips

1. Function
function replaceAccents(fld:TextField, fromArr:Array, toArr:Array):Void {
var txt:String = fld.text;
for (var i = 0; ihttp://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] Number -- how good for use as an integer?

2007-03-06 Thread Douglas Pearson
Thanks guys for the responses.

I'm actually not concerned with arbitrary precision just storing a 32-bit
int (like a database key) and retrieving it accurately.  I guess the only
safe way in AS1/AS2 is to do the whole Math.round(value+0.01) thing.

Doug

-Original Message-
From: Jim Cheng [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 05, 2007 4:35 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Number -- how good for use as an integer?

Douglas Pearson wrote:
> Can someone clarify whether Number is actually just a simple wrapper 
> round a double precision floating point value?
>
> Is this a problem with Flash?  If so, any solutions?

Internally, it's a 32-bit single precision float and doesn't play well if
you need arbitrary precision integer manipulations.  You can see the link
that Mick recommended for a longer discussion of this from Adobe.

This is a fairly common problem across many programming languages.  As such,
most developers needing such functionality (e.g. for financial, scientific
or cryptographic usages) resort to libraries providing for arbitrary
precision integer storage and operations.

While I don't know of any ActionScript specific libraries for this, there
are several that have been written for Javascript and shouldn't be too
difficult to port if you're so inclined.  Among others, see:

http://www.leemon.com/crypto/BigInt.html

http://www-cs-students.stanford.edu/~tjw/jsbn/

Jim Cheng
effectiveUI


___
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] clearInterval(0);

2007-03-06 Thread Andy Herrman

I would suggest initializing the interval value as NULL instead of 0,
since I think 0 is a valid ID.  That way you can be sure you don't
accidentally clear an interval that you don't want to.

  -Andy

On 3/4/07, Alain Rousseau <[EMAIL PROTECTED]> wrote:

Well actually, clearInterval(0) clears the interval ID 0

lets say you have an interval defined :

var myInt:Number = setInterval(this, "doSomething", 1000);

then it is possible that myInt = 0.

The value of myInt is set by calling setInterval, which returns the ID
of the interval,
so doing clearInterval(0) is the same as doing clearInterval(myInt)

but otherwise it doesn't do anything if no interval ID 0 exists

Adam Pasztory wrote:
> Wow, lots of interval questions lately... :)
>
> I don't believe clearInterval(0) does anything.  However, the code you
> posted looks correct.
>
> -Adam
> ___
> 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] haXe 1.12 Released !

2007-03-06 Thread Nicolas Cannasse
Hi lists,

I'm happy to announce the 1.12 Release of haXe !
The two biggest change in that release are :

- AS3 code generator : you can generate AS3 source code from a haXe
program. This enable you to write code in haXe and give some AS3 sources
to your clients. It's also a good way to get better runtime performances
until the native flash9 compiler will get improved.

- Code Completion : code completion is supported directly in the
compiler, and is now available in the haXe FlashDevelop Plugin (see
http://haxe.org/haxefd for screenshots).

You can quickly download and start the installer from http://haxe.org to
either install or upgrade your haXe version.

Enjoy !
Nicolas
___
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] AS3 parseFloat issue?

2007-03-06 Thread Ron Wheeler
Since the dawn of computing in the 1950s, it has clearly been understood 
that

"Thou shalt not compare floating point numbers for equality"

It is not supposed to work.

It only rarely does work(every now and again you will get lucky 
depending on the number that you chose to test). If you change hardware 
architecture or change the implementation of some parsing or 
manipulation your code will change behaviour - not very desirable.


It is not a bug.

You should not do it.

If you want to know that 2 floating point numbers are "close enough" to 
be considered as the same value, then subtract them and check to see if 
the absolute value of their difference is less than your criteria for 
"sameness".
That has been the correct way to compare floating point numbers for 
about 50 years and until we stop using binary components to build 
computers, it will persist.


Ron

elibol wrote:

I came to this specific value from 6.3e51. Here are some more tests:

var test1_str:String = "6.3e51"; //6.3e+51 outputs same result.
var n1:Number = parseFloat(test1_str);
trace(n1);
trace(n1 == (6.3e51));
trace(6.30e+51 == 6.3e+51);
trace(n1-(6.3e51));

//AS3
6.30e+51
false
true
1.32922799578491e+36

It may certainly be by design, but aren't these unexpected results? 
as2 and

java do not behave this way. The parseFloat function is flawed.

I will post a comment on livedocs, and I've submitted the issue as a 
bug at

http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

I am not going over board am I? I just need my program to work correctly.

On 3/5/07, Fumio Nonaka <[EMAIL PROTECTED]> wrote:


I am not sure whether it is a bug or by design, though.

var test0_str:String = "6.30e+51";
var n0:Number = parseFloat(test0_str);
trace(n0);
trace(n0 == (6.30e+51));
trace(n0-(6.30e+51));
// ActionScript 3.0
6.30e+51
false
1.32922799578491e+36
// ActionScrpt 2.0
6.3e+51
true
0

Decrease one digit:

var test1_str:String = "6.3e+51";
var n1:Number = parseFloat(test1_str);
trace(n1 == (6.3e+51));
trace(n1-(6.3e+51));
// ActionScript 3.0
true
0
_
elibol wrote:
> Those who are interested in helping me verify the problem can run this
test
> in actionscript 2.0 and again in actionscript 3.0.
>
> var a:String = "6.30e+51";
> var b:String = "23";
> var c:Number = parseFloat(a)%parseFloat(b);
> trace(c); //outputs 7 in as3, and 18 in as2
> trace(6.30e+51%23); // outputs 18 in both as2 and 3

Good luck,
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books
Flash community

___
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] Flex 360 Conference

2007-03-06 Thread Frederic v. Bochmann
A friend of mine went, but I live at the other end of the continent.

He told me that: http://blog.benstucki.net/ had an interesting talk .. But
then again, I wasn't there.

Cheers
Fredz./
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Phil Dupré
Sent: March 5, 2007 4:23 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Flex 360 Conference

Anyone at this event here in San Jose?

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

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

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

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


[Flashcoders] Re: Flashcoders Digest, Vol 3, Issue 17

2007-03-06 Thread Josh Ettwein
I've been evaluating these myself for some time - best one I've seen  
out of the box (we rolled our own due to spec constraints) is FLV  
Player... I think it meets all your criteria listed below. Not  
positive, but the codebase is really solid. That was my biggest  
concern with a lot of these open/free players - the code is garbage.  
Jeroen's actionscript is really well written and thought out nicely.


http://www.jeroenwijering.com/?item=Flash_Video_Player

HTH,

Josh

On Mar 6, 2007, at 7:12 AM, [EMAIL PROTECTED]  
wrote:



Message: 8
Date: Mon, 5 Mar 2007 13:46:19 -0800
From: Carlos Saenz <[EMAIL PROTECTED]>
Subject: [Flashcoders] Flash video player / modular component
To: flashcoders@chattyfig.figleaf.com
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hey what's up? I'm looking for a flash video player with these
requirements:

1) Can play SWF or FLV
2) Has a nice simple scrubber, like quicktime. (Pause / Play, drag
slider, and that's enough)
3) Generates a list of videos based on an XML file
4) Just put SWFs / FLVs in a folder, put the XML file in there, put
the main player swf on your home page, and bam. Video player with
scrolling list of videos appears.
5) The list of videos should look pretty cool, have a cool scrolling
effect
6) The look should be nice / elegant. Not default flash skin looking
stuff.
7) Flash 6, 7, or 8 compatible. (Flash 6 if possible, but not
required. At least 7.)

Anyone? Best recommendation? Or if someone wants to make some money
putting #1 - 7 above together, let me know. I am SERIOUSLY bogged
down with too much other work to get this video thing done.

I really appreciate anyone's help, information, or time on this one.

Thanks,
-Carlos-






--
Josh Ettwein | Sr. Software Engineer | Eyespot.com | www.eyespot.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] AS3 parseFloat issue?

2007-03-06 Thread elibol

I came to this specific value from 6.3e51. Here are some more tests:

var test1_str:String = "6.3e51"; //6.3e+51 outputs same result.
var n1:Number = parseFloat(test1_str);
trace(n1);
trace(n1 == (6.3e51));
trace(6.30e+51 == 6.3e+51);
trace(n1-(6.3e51));

//AS3
6.30e+51
false
true
1.32922799578491e+36

It may certainly be by design, but aren't these unexpected results? as2 and
java do not behave this way. The parseFloat function is flawed.

I will post a comment on livedocs, and I've submitted the issue as a bug at
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

I am not going over board am I? I just need my program to work correctly.

On 3/5/07, Fumio Nonaka <[EMAIL PROTECTED]> wrote:


I am not sure whether it is a bug or by design, though.

var test0_str:String = "6.30e+51";
var n0:Number = parseFloat(test0_str);
trace(n0);
trace(n0 == (6.30e+51));
trace(n0-(6.30e+51));
// ActionScript 3.0
6.30e+51
false
1.32922799578491e+36
// ActionScrpt 2.0
6.3e+51
true
0

Decrease one digit:

var test1_str:String = "6.3e+51";
var n1:Number = parseFloat(test1_str);
trace(n1 == (6.3e+51));
trace(n1-(6.3e+51));
// ActionScript 3.0
true
0
_
elibol wrote:
> Those who are interested in helping me verify the problem can run this
test
> in actionscript 2.0 and again in actionscript 3.0.
>
> var a:String = "6.30e+51";
> var b:String = "23";
> var c:Number = parseFloat(a)%parseFloat(b);
> trace(c); //outputs 7 in as3, and 18 in as2
> trace(6.30e+51%23); // outputs 18 in both as2 and 3

Good luck,
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books
Flash community

___
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