home *** CD-ROM | disk | FTP | other *** search
Wrap
//////////////////////////////// // Sample script sound_test: if SOUND_DEVICE set condition 30 ///////////////////////////// install_icon: $target = "formula" $title = "Formula Graphics" $destdir = get directory DDE "PROGMAN" string "[DeleteGroup(",$title,")]" DDE "PROGMAN" string "[CreateGroup(",$title,")]" DDE "PROGMAN" string "[ShowGroup(1)]" DDE "PROGMAN" string "[AddItem(",$destdir,"\",$target,".exe,",$title,",",$destdir,"\",$target,".exe,0)]" ///////////////////////////// init_balls: ball_list = new list ball = new script "ball.sxt" ball_list add ball $name = "ball_red.gif" ball call init: @name,0,0,5,2 ball = new script "ball.sxt" ball_list add ball $name = "ball_grn.gif" ball call init: @name,0,360,2,-5 ball = new script "ball.sxt" ball_list add ball $name = "ball_blu.gif" ball call init: @name,0,180,-4,3 free ball timer_count = TIME ///////////////////////////////////////// play_balls: mess, wparam, loword, hiword if timer_count < TIME - 1 for n = 0 to 2 ball = ball_list get n ball call show free ball update sprites timer_count = TIME //////////////////////////////// clear_balls: free ball_list update sprites /////////////////////////// next_hyperpage: page = strval getrange "700/710" page = page + 1 if page > 703 then page = 700 set condition "-700/710,",page /////////////////////////// show_edit_boxes: set editbox "edit box 1" = "Formula" $abc = "Using the Formula Graphics high level object oriented language, you can write text to the contents of an edit box. You can also read the information typed into an edit box. The information can then be analysed in any way imaginable." set editbox "edit box 2" = $abc element_list = new byte[20][30] $element_list[0] = "Picture";"Animation";"Sound";"Video";"Text";"Picture Button";"Text Button";"Hot Area";"Hot Color";"Hypertext";"Edit box";"List Box";"Graph" for n = 0 to 12 index = listbox "list box 1" add $element_list[n] ///////////////////////// setup_graph: colors = new byte[3][3] colors[0][0] = 200,130,100 colors[1][0] = 100,180,130 colors[2][0] = 100,160,210 /////////////////////////// graph_data: data = new float[3][4] for n,m = 0,0 to 2,3 data[n][m] = 10 + rnd 90 return @data, @colors, 0, 100, 10 /////////////////////////// pie_graph_data: data = new float[3] max = 0 for n = 0 to 2 data[n] = 20 + rnd 80 max = max + data[n] for n = 0 to 2 data[n] = floor (data[n] / max * 1000) / 10 return @data, @colors, 0, 100, 0 /////////////////////////// play_game: killer = new script "killmain.sxt" killer call start free killer update sprites /////////////////////////////////// /////////////////////////////////