Re: Generating Random number
Is there anyone who would be willing to help me to code the following screen? 2 bouncing 3D balls and a random number appearing in between the balls everytime the user clicks on a button. I have already done what i wanted in Macromedia flash, but i wanted to take the chance to show an alternative to my CEO by using Curl. The effort to do this screen in Macromedia flash is about 2 hours. If it takes just about the same amount of effort in Curl, then would appreciate if someone help me with this. It will help to push adoption of Curl. PangTeeKamal Bhatt <[EMAIL PROTECTED]> wrote: For 3D graphics kindly refer to the documentation on Ren derer3d and Scene. There are some examples of spheres. In my last example the ball will not be visible if I move it outside the bounds of the Canvas that contains it. Note that in Curl there are two differnt kinds of Boxes. One that can contain only one child (e.g. Frame) and the other that can contain more than one children (e.g. Canvas). Kindly read the documentation on Canvas to see how to add children to it. Here is one way of doing it. {let frame:Frame = {Frame font-size = 14pt, font-weight = "bold", background = "" }} {let c1:Canvas= {Canvas background = "", width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } }} {do {c1.add frame, x = 2cm, y = 2cm}} {CommandButton label = "bounce", {on Action do let random:RolledRandom = {RolledRandom 0, 5} {frame.add {random.next-roll}, replace? = true} }} {value c1}- Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Monday, December 19, 2005 11:21 AM Subject: Re: Generating Random numberThanks. COuld you advise on how to make the bouncing ball 3D? Also, after the ball has finished bouncing, why does the ball disappear sometimes? How do i make the random number generated appear in the box with nice big font. Thanks, PangTeeKamal Bhatt <[EMAIL PROTECTED]> wrote: Note that RectangleShape creates a rectangle shape and EllipseShape creates an elliptical shape. In the code below I am using EllipseShape to dyaw a ball (See canval c2). I need a CommandButton to click to, to start animation. For the animation purpose I am using a Timer that goes off every .1s, 30 times (for 3s). Note that that inside the timer event I am changing the position of the ball using a random number, to show you how you can generate number numbers. --Kamal {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"} {import * from CURL.GUI.SHAPES} {let c1:Canvas= {Canvas background = "", width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", &n bsp; translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } }} {value c1} {hrule} {let e1:EllipseShape = {EllipseShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968" }} {e1.apply-translation 0cm, 1cm}{let c2:Canvas= {Canvas background = "", width = 9cm, height = 8cm, e1 }} {value c2} {let f:Frame = {Frame}}{value f}{CommandButton label = "bounce", {on Action do let random:RolledRandom = {RolledRandom 0, 5} {let t:Timer = {Timer interval = .1s, repeat = 30, {on TimerEvent do let delta:int = {random.next-roll} {f.add delta, repla ce? = true} {c2.move-to-xy e1, 1cm, delta * 1cm} } } } }} ----- Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Monday, December 19, 2005 12:21 AM Subject: Re: Generating Random numberHi Duke, Ok. I have changed the code to below and I am getting 2 rectangles showing up. But I dont see the random number generated anywhere in the displayed applet. How to display the random number generated? How
Re: Generating Random number
For 3D graphics kindly refer to the documentation on Renderer3d and Scene. There are some examples of spheres. In my last example the ball will not be visible if I move it outside the bounds of the Canvas that contains it. Note that in Curl there are two differnt kinds of Boxes. One that can contain only one child (e.g. Frame) and the other that can contain more than one children (e.g. Canvas). Kindly read the documentation on Canvas to see how to add children to it. Here is one way of doing it. {let frame:Frame = {Frame font-size = 14pt, font-weight = "bold", background = "" }} {let c1:Canvas= {Canvas background = "", width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } }} {do {c1.add frame, x = 2cm, y = 2cm}} {CommandButton label = "bounce", {on Action do let random:RolledRandom = {RolledRandom 0, 5} {frame.add {random.next-roll}, replace? = true} }} {value c1} - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Monday, December 19, 2005 11:21 AM Subject: Re: Generating Random number Thanks. COuld you advise on how to make the bouncing ball 3D? Also, after the ball has finished bouncing, why does the ball disappear sometimes? How do i make the random number generated appear in the box with nice big font. Thanks, PangTeeKamal Bhatt <[EMAIL PROTECTED]> wrote: Note that RectangleShape creates a rectangle shape and EllipseShape creates an elliptical shape. In the code below I am using EllipseShape to dyaw a ball (See canval c2). I need a CommandButton to click to, to start animation. For the animation purpose I am using a Timer that goes off every .1s, 30 times (for 3s). Note that that inside the timer event I am changing the position of the ball using a random number, to show you how you can generate number numbers. --Kamal {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"} {import * from CURL.GUI.SHAPES} {let c1:Canvas= {Canvas background = "", width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } }} {value c1} {hrule} {let e1:EllipseShape = {EllipseShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968" }} {e1.apply-translation 0cm, 1cm}{let c2:Canvas= {Canvas background = "", width = 9cm, height = 8cm, e1 }} {value c2} {let f:Frame = {Frame}}{value f}{CommandButton label = "bounce", {on Action do let random:RolledRandom = {RolledRandom 0, 5} {let t:Timer = {Timer interval = .1s, repeat = 30, {on TimerEvent do let delta:int = {random.next-roll} {f.add delta, replace? = true} {c2.move-to-xy e1, 1cm, delta * 1cm} } } } }} - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Monday, December 19, 2005 12:21 AM Subject: Re: Generating Random number Hi Duke, Ok. I have changed the code to below and I am getting 2 rectangles showing up. But I dont see the random number generated anywhere in the displayed applet. How to display the random number generated? How do i change the rectangles into bouncing spheres? I would like the bouncing sp
Re: Generating Random number
Thanks. COuld you advise on how to make the bouncing ball 3D? Also, after the ball has finished bouncing, why does the ball disappear sometimes? How do i make the random number generated appear in the box with nice big font. Thanks, PangTeeKamal Bhatt <[EMAIL PROTECTED]> wrote: Note that RectangleShape creates a rectangle shape and EllipseShape creates an elliptical shape. In the code below I am using EllipseShape to dyaw a ball (See canval c2). I need a CommandButton to click to, to start animation. For the animation purpose I am using a Timer that goes off every .1s, 30 times (for 3s). Note that that inside the timer event I am changing the position of the ball using a random number, to show you how you can generate number numbers. --Kamal {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"} {import * from CURL.GUI.SHAPES} {let c1:Canvas= {Canvas background = "", width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } }} {value c1} {hrule} {let e1:EllipseShape = {EllipseShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968" }} {e1.apply-translation 0cm, 1cm}{let c2:Canvas= {Canvas background = "", width = 9cm, height = 8cm, e1 }} {value c2} {let f:Frame = {Frame}}{value f}{CommandButton label = "bounce", {on Action do let random:RolledRandom = {RolledRandom 0, 5} {let t:Timer = {Timer interval = .1s, repeat = 30, {on TimerEvent do let delta:int = {random.next-roll} {f.add delta, replace? = true} {c2.move-to-xy e1, 1cm, delta * 1cm} } } } }} - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Monday, December 19, 2005 12:21 AM Subject: Re: Generating Random number Hi Duke, Ok. I have changed the code to below and I am getting 2 rectangles showing up. But I dont see the random number generated anywhere in the displayed applet. How to display the random number generated? How do i change the rectangles into bouncing spheres? I would like the bouncing spheres to bounce for 3 secs before a new random number is generated everytime the user clicks on a button to generate a new number. Thanks,PT {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"}{import * from CURL.GUI.SHAPES} {let v:View = {View {Canvas width = 9cm, he i ght = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } } }} {v.show} {value let random:RolledRandom = {RolledRandom 1, 1328} {random.next-roll} } Duke Briscoe <[EMAIL PROTECTED]> wrote: On Dec 18, 2005, at 10:39 PM, pang tee wrote:> Thanks Kamal,> > I tried to combine the two codes together, but ended with the errors > attached in randomgenerator.doc.> > Actually i just to get the screen to appear like in > randomgenerator.jpg if anyone can help. The shape that is in the code > here is calling rectangles not spheres.> > Thanks,> PTThe error is telling you that a View can only have one graphical child, while you have two, one is the random number and the other is the Canvas. So you need to choose some other layout.***To unsubscribe from this list, send a mail to:mailto:[EMAIL PROTECTED]To contact a human list administra tor, send a mail to:mailto:[EMAIL PROTECTED]To recieve a list of other options for this list, send a mail to:mailto:[EMAIL PROTECTED]__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Generating Random number
Note that RectangleShape creates a rectangle shape and EllipseShape creates an elliptical shape. In the code below I am using EllipseShape to dyaw a ball (See canval c2). I need a CommandButton to click to, to start animation. For the animation purpose I am using a Timer that goes off every .1s, 30 times (for 3s). Note that that inside the timer event I am changing the position of the ball using a random number, to show you how you can generate number numbers. --Kamal {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"} {import * from CURL.GUI.SHAPES} {let c1:Canvas= {Canvas background = "", width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } }} {value c1} {hrule} {let e1:EllipseShape = {EllipseShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968" }} {e1.apply-translation 0cm, 1cm}{let c2:Canvas= {Canvas background = "", width = 9cm, height = 8cm, e1 }} {value c2} {let f:Frame = {Frame}}{value f}{CommandButton label = "bounce", {on Action do let random:RolledRandom = {RolledRandom 0, 5} {let t:Timer = {Timer interval = .1s, repeat = 30, {on TimerEvent do let delta:int = {random.next-roll} {f.add delta, replace? = true} {c2.move-to-xy e1, 1cm, delta * 1cm} } } } }} - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Monday, December 19, 2005 12:21 AM Subject: Re: Generating Random number Hi Duke, Ok. I have changed the code to below and I am getting 2 rectangles showing up. But I dont see the random number generated anywhere in the displayed applet. How to display the random number generated? How do i change the rectangles into bouncing spheres? I would like the bouncing spheres to bounce for 3 secs before a new random number is generated everytime the user clicks on a button to generate a new number. Thanks,PT {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"}{import * from CURL.GUI.SHAPES} {let v:View = {View {Canvas width = 9cm, hei ght = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } } }} {v.show} {value let random:RolledRandom = {RolledRandom 1, 1328} {random.next-roll} } Duke Briscoe <[EMAIL PROTECTED]> wrote: On Dec 18, 2005, at 10:39 PM, pang tee wrote:> Thanks Kamal,> > I tried to combine the two codes together, but ended with the errors > attached in randomgenerator.doc.> > Actually i just to get the screen to appear like in > randomgenerator.jpg if anyone can help. The shape that is in the code > here is calling rectangles not spheres.> > Thanks,> PTThe error is telling you that a View can only have one graphical child, while you have two, one is the random number and the other is the Canvas. So you need to choose some other layout.***To unsubscribe from this list, send a mail to:mailto:[EMAIL PROTECTED]To contact a human list administra tor, send a mail to:mailto:[EMAIL PROTECTED]To recieve a list of other options for this list, send a mail to:mailto:[EMAIL PROTECTED] __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Generating Random number
Hi Duke, Ok. I have changed the code to below and I am getting 2 rectangles showing up. But I dont see the random number generated anywhere in the displayed applet. How to display the random number generated? How do i change the rectangles into bouncing spheres? I would like the bouncing spheres to bounce for 3 secs before a new random number is generated everytime the user clicks on a button to generate a new number. Thanks,PT {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"}{import * from CURL.GUI.SHAPES} {let v:View = {View {Canvas width = 9cm, hei ght = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } } }} {v.show} {value let random:RolledRandom = {RolledRandom 1, 1328} {random.next-roll} } Duke Briscoe <[EMAIL PROTECTED]> wrote: On Dec 18, 2005, at 10:39 PM, pang tee wrote:> Thanks Kamal,> > I tried to combine the two codes together, but ended with the errors > attached in randomgenerator.doc.> > Actually i just to get the screen to appear like in > randomgenerator.jpg if anyone can help. The shape that is in the code > here is calling rectangles not spheres.> > Thanks,> PTThe error is telling you that a View can only have one graphical child, while you have two, one is the random number and the other is the Canvas. So you need to choose some other layout.***To unsubscribe from this list, send a mail to:mailto:[EMAIL PROTECTED]To contact a human list administra tor, send a mail to:mailto:[EMAIL PROTECTED]To recieve a list of other options for this list, send a mail to:mailto:[EMAIL PROTECTED] __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Generating Random number
On Dec 18, 2005, at 10:39 PM, pang tee wrote: Thanks Kamal, I tried to combine the two codes together, but ended with the errors attached in randomgenerator.doc. Actually i just to get the screen to appear like in randomgenerator.jpg if anyone can help. The shape that is in the code here is calling rectangles not spheres. Thanks, PT The error is telling you that a View can only have one graphical child, while you have two, one is the random number and the other is the Canvas. So you need to choose some other layout. *** To unsubscribe from this list, send a mail to: mailto:[EMAIL PROTECTED] To contact a human list administrator, send a mail to: mailto:[EMAIL PROTECTED] To recieve a list of other options for this list, send a mail to: mailto:[EMAIL PROTECTED]
Re: Generating Random number
I am not sure what this code was supposed to do. There are some syntax error here, e.g. a. view should be View b. The import statement should be outside of the View constructor. c. Also note that there are some "," related bugs. d. Lastly you are not showing the View, so you will not see it and so its contents. Try this: {let v:View = {View {Canvas width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } } }} {v.show} {value let random:Random = {Random} {random.next-in-range 1, 1328}} - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Saturday, December 17, 2005 5:09 AM Subject: Re: Generating Random number Hi, Ultimately, I hope to get the random number appearing between 2 bouncing balls displayed in an applet and a new random number shows up everytime someone clicks on a button. I tried the code below but does not seem to be working. Is there something i am missing. Also, do you know how i can create bouncing balls in Curl? Thanks, PangTee {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"}{applet manifest = "file:///c:/manifest.mcurl", {compiler-directives careful? = true}} {view{import * from CURL.GUI.SHAPES}{Canvas width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } {value let random:Random = {Random} {random.next-in-range 1, 1328}}, } }pang tee <[EMAIL PROTECTED]> wrote: Thanks. I wrote the below code but would like to try to change it to use RolledRandom.next-roll instead. Can someone guide me with the change? I keep getting syntax errors. {View{value let random:Random = {Random} {random.next-in-range 1, 1328}}, visibility = "normal", {on WindowClose do {exit} }} Thanks, PangTeeKamal Bhatt <[EMAIL PROTECTED]> wrote: Use the class Random. {value let random:Random = {Random} {random.next-float} } Note that Random had several methods to get a random int16, int32, uint8, etc - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Friday, December 16, 2005 6:29 AM Subject: Re: MenuManager and MenuItem.get-prev does anyone have a simple example of a random number generator created and displayed in Curl? I want to replace the current usage of _javascript_ Math object to generate and display a random number. __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Generating Random number
What syntax error you are getting? Try this: {View {value let random:RolledRandom = {RolledRandom 1, 1328} {random.next-roll} }, visibility = "normal", {on WindowClose do {exit} }} --Kamal - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Saturday, December 17, 2005 4:32 AM Subject: Re: Generating Random number Thanks. I wrote the below code but would like to try to change it to use RolledRandom.next-roll instead. Can someone guide me with the change? I keep getting syntax errors. {View{value let random:Random = {Random} {random.next-in-range 1, 1328}}, visibility = "normal", {on WindowClose do {exit} }} Thanks, PangTeeKamal Bhatt <[EMAIL PROTECTED]> wrote: Use the class Random. {value let random:Random = {Random} {random.next-float} } Note that Random had several methods to get a random int16, int32, uint8, etc - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Friday, December 16, 2005 6:29 AM Subject: Re: MenuManager and MenuItem.get-prev does anyone have a simple example of a random number generator created and displayed in Curl? I want to replace the current usage of _javascript_ Math object to generate and display a random number. __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Generating Random number
Hi, Ultimately, I hope to get the random number appearing between 2 bouncing balls displayed in an applet and a new random number shows up everytime someone clicks on a button. I tried the code below but does not seem to be working. Is there something i am missing. Also, do you know how i can create bouncing balls in Curl? Thanks, PangTee {curl 4.0 applet}{curl-file-attributes character-encoding = "windows-latin-1"}{applet manifest = "file:///c:/manifest.mcurl", {compiler-directives careful? = true}} {view{import * from CURL.GUI.SHAPES}{Canvas width = 9cm, height = 8cm, {ShapeGroup translation = {Distance2d 0cm, 7cm}, {RectangleShape {GRect 0cm, 1cm, 1cm, 0cm}, color = "#006968", translation = {Distance2d (1.1cm * 1), 0cm} }, {RectangleShape {GRect 0cm, 1cm, 5cm, 0cm}, color = "#2462a2", translation = {Distance2d (1.1cm * 6), 0cm} } } {value let random:Random = {Random} {random.next-in-range 1, 1328}}, } }pang tee <[EMAIL PROTECTED]> wrote:Thanks. I wrote the below code but would like to try to change it to use RolledRandom.next-roll instead. Can someone guide me with the change? I keep getting syntax errors. {View{value let random:Random = {Random} {random.next-in-range 1, 1328}}, visibility = "normal", {on WindowClose do {exit} }} Thanks, PangTeeKamal Bhatt <[EMAIL PROTECTED]> wrote:Use the class Random. {value let random:Random = {Random} {random.next-float} } Note that Random had several methods to get a random int16, int32, uint8, etc - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Friday, December 16, 2005 6:29 AM Subject: Re: MenuManager and MenuItem.get-prevdoes anyone have a simple example of a random number generator created and displayed in Curl? I want to replace the current usage of _javascript_ Math object to generate and display a random number. __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Generating Random number
Thanks. I wrote the below code but would like to try to change it to use RolledRandom.next-roll instead. Can someone guide me with the change? I keep getting syntax errors. {View{value let random:Random = {Random} {random.next-in-range 1, 1328}}, visibility = "normal", {on WindowClose do {exit} }} Thanks, PangTeeKamal Bhatt <[EMAIL PROTECTED]> wrote:Use the class Random. {value let random:Random = {Random} {random.next-float} } Note that Random had several methods to get a random int16, int32, uint8, etc - Original Message - From: pang tee To: curlbreaker-l@curl.com Sent: Friday, December 16, 2005 6:29 AM Subject: Re: MenuManager and MenuItem.get-prevdoes anyone have a simple example of a random number generator created and displayed in Curl? I want to replace the current usage of _javascript_ Math object to generate and display a random number. __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com