![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I changed it somewhat to
Sub Globals Height=5: LastHeight=5: dY=5 Width=5: LastWidth=5: dX=5 HeightMin = 5: HeightMax = Form1.Height-5 WidthMin = 5: WidthMax = Form1.Width-5 End Sub Sub App_Start Form1.Show Form1.ForeLayer=True BounceBall End Sub Sub BounceBall Height = Rnd(HeightMin,HeightMax) Width = Rnd(WidthMin,WidthMax) FOR x=1 to 1000 For y=1 to 1000 NEXT DoEvents LastWidth=Width LastHeight=Height Form1.FErase(LastWidth-5,LastHeight-5,LastWidth+5,LastHeight+5) Height=Height+dY Width=Width+dX Form1.FCircle(Width,Height,5,cRed,F) IF Height>=HeightMax Then Height = HeightMax dY = -dY END IF IF Height<=HeightMin Then Height = HeightMin dY=-dY END IF IF Width >= WidthMax then Width = WidthMax dX = -dX END IF IF Width <= WidthMin then Width = WidthMin dX = -dX END IF NEXT End Sub |
|
|||
|
Sub Globals
Height=10: Dim g End Sub Sub App_Start g=1.05 Form1.Show Form1.Line(0,200,Form1.Width,200,cBlack) SetTransparentColor=cGreen Form1.ForeLayer=True Form1.FCircle(Form1.Width/2,Height,10,cBlack,F) Timer1.Interval =50 Timer1.Enabled=True End Sub Sub Timer1_Tick Form1.FCircle(Form1.Width/2,Height,10,cGreen,F) direction=direction*g Height=Height*g If Height>190 Then Height=190 g=0.95 End If If Height<=10 Then g=1.05 Form1.FCircle(Form1.Width/2,Height,10,cBlack,F) End Sub |
|
||||
|
Isn't there already a Sprite library?
(...rummages through boxes looking...) I'm sure there's a Sprite library in here somewhere... Gary
__________________
PC: Windows XP Pro SP3 / Basic4PPC v6.5 PPC: HTC 8925 (AT&T Tilt) / Windows Mobile 6 |
|
||||
|
Yes, it is here:
Sprite library - V1.1
__________________
Klaus Switzerland |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drawing and moving a Character Transparently (Not a Sprite) | Drewpeu | Questions & Help Needed | 2 | 10-08-2008 04:15 PM |
| Diff GPS values without moving GPS mouse | Georg | Questions & Help Needed | 1 | 04-22-2008 07:58 AM |
| moving a sprite? | colin9876 | Questions & Help Needed | 7 | 11-27-2007 05:10 PM |
| XYCalc -graphs an equation or editable table of figures in regular, bar or pie chart | HarleyM | Code Samples & Tips | 2 | 11-24-2007 08:21 AM |
| Error when moving treeview to a tabcontrol | Peter | Questions & Help Needed | 2 | 05-15-2007 07:36 AM |