Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 12:07 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ]  Bookmark and Share
Author Message
 Post subject: i have a serious problem, you can help easily
PostPosted: Wed Aug 26, 2009 11:35 am 
Offline

Joined: Wed Aug 26, 2009 11:33 am
Posts: 1
I am in uni and i only have a short while to reprogram this ****ty application. if i fail then i will have wasted over £16000 on uni and will fail the course and woin't be able to go back to university ever again... please help!!!!!!!

1) I need to make the images move form left to right rather than right to left.

2) i need to add a set of radio buttons to my form so that instead of 4 random cars being added, you manually select cars instead.

if you need anything else please let me know, if you can help me please do... PLEASE!!!

basic description- [there are four cars that are selected at random by clicking the "btnSelectCars" which appear on the right side of the form. when you click the "btnStartRace" they race from right to left until one of them reaches the end and a label appears which just says winner or sumthing. i'll post the form inactive and the form active so you can view the pictures]

PLEASE IF YOU CAN HELP ME PLEASE HELP ME!!!!

here's the code. if you need anything else to help me please let me know asap!
---

Public Class frmWackyRaces

Private Sub btnSelectCars_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelectCars.Click
For Each pct As PictureBox In pnlRaceTrack.Controls
Select Case Int(Rnd() * 11)
Case 0
pct.Image = My.Resources.ArkansasChugABug
Case 1
pct.Image = My.Resources.ArmySurplusSpecial
Case 2
pct.Image = My.Resources.BoulderMobile
Case 3
pct.Image = My.Resources.BulletProofBomb
Case 4
pct.Image = My.Resources.BuzzWagon
Case 5
pct.Image = My.Resources.Compact*****Cat
Case 6
pct.Image = My.Resources.ConvertACar
Case 7
pct.Image = My.Resources.CreepyCoupe
Case 8
pct.Image = My.Resources.CrimsonHayBailer
Case 9
pct.Image = My.Resources.MeanMachine
Case 10
pct.Image = My.Resources.TurboTerrific
End Select
Next
btnStartRace.Enabled = True
End Sub

Private Sub btnStartRace_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStartRace.Click
btnSelectCars.Enabled = False
tmrRace.Enabled = True
btnStartRace.Enabled = False
End Sub

Private Sub tmrRace_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrRace.Tick
For Each pct As PictureBox In pnlRaceTrack.Controls
pct.Left = pct.Left - Int(Rnd() * 30)
If pct.Left <= 0 Then
tmrRace.Enabled = False
btnReset.Enabled = True
lblWinner.Left = pct.Left + pct.Width
lblWinner.Top = pct.Top + pct.Height / 2
lblWinner.Visible = True
End If
Next
End Sub

Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
For Each pct As PictureBox In pnlRaceTrack.Controls
pct.Image = Nothing
pct.Left = pnlRaceTrack.Width - pct.Width
Next
btnSelectCars.Enabled = True
btnReset.Enabled = False
lblWinner.Visible = False
End Sub

Private Sub frmWackyRaces_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Randomize()
End Sub
End Class
---
here are some images of the form i am working on-
http://i176.photobucket.com/albums/w...rminactive.jpg

http://i176.photobucket.com/albums/w...formactive.jpg


Top
 Profile  
 
 Post subject: Re: i have a serious problem, you can help easily
PostPosted: Sun Nov 01, 2009 6:17 pm 
Offline
50+ Club
User avatar

Joined: Tue Mar 27, 2007 2:07 pm
Posts: 73
Location: St Helens, England
I'm not sure what your programming in I get the feeling its cpp with visual studio or something of which I haven't a clue about, but when programming games in SDL for movement left to right theirs usually an x movement varible which depending on how far you want it to move is 1+

now if you want it to move right to left its the same except you find the varible which you wish to change and replace its positive number with a negative, -1 or -15 yet again depends on how much you want it to move.

Hope this helps and sorry I can't help any further

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley