This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 2f28e44a72f0fb60a239072bc8a200a9eb1d02bc Author: Alex Harui <[email protected]> AuthorDate: Sun Dec 2 21:58:23 2018 -0800 assigments to int are not currently checked to see if the value is an int so if it isn't you have to force floats to int. Flash runtime seems to use floor and not round --- .../mxroyale/tourdeflexmodules/src/spark/controls/DataGroupExample.mxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mxroyale/tourdeflexmodules/src/spark/controls/DataGroupExample.mxml b/examples/mxroyale/tourdeflexmodules/src/spark/controls/DataGroupExample.mxml index 14a54cd..8a51c7b 100644 --- a/examples/mxroyale/tourdeflexmodules/src/spark/controls/DataGroupExample.mxml +++ b/examples/mxroyale/tourdeflexmodules/src/spark/controls/DataGroupExample.mxml @@ -40,7 +40,7 @@ // create a collection of random flights for (var i:int = 0; i < nItems; i++){ var temp:Object = new Object(); - var random:int = Math.random() * 5; + var random:int = Math.floor(Math.random() * 5); temp.start = sources[random]; temp.end = destinations[random];
