Random Code

Robert Sabo viper4559 at yahoo.com
Sat Dec 25 14:07:20 EST 2004


Hello Everyone
 
I was just wondering if anyone could help me with this. I am working on creating a program that randomly ouputs a number from 1-55. I have everything done except I cannot get it to print how I want it to.
 
I made a scrolling field and a button. here is the button code
 
<--------------------------------------------------------------------------------->

global RandNum

on mouseUp

put random(55) into RandNum

reply field"Output" with RandNum

end mouseUp

<--------------------------------------------------------------------------------->

The only thing I have in the scrolling field code is

global RandNum

What I am trying to do is once the button is pressed down it will pick a random number from 1-55 then assign RandNum the value of the number picked. From there I wanted the RandNum value to be placed in some type of display field above the button. I picked the scrolling field(not sure if I should use this one or not). However I cannot get the text to display in this field. I messed with the answer command however I do not want the pop up to come up. I want it to just print in the scrolling field.

 

Anyone help me out here I would appreciate it.

 

Thanks,

 

Viper

 

__________________________________________________
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 


More information about the use-livecode mailing list