Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 20th, 2007, 09:25 AM
christianfloto christianfloto is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2007
Posts: 1 christianfloto User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 19 sec
Reputation Power: 0
Help anyone?

ok i'm doing a project for school and i have to program a green globs game here's the majority of my code do u have any suggestions?
The code is in Actionscript for FlashMX

Code:
mag = 80;
wid = 200;
hei = 200;
OX = 0;
OY = 0;
lineStyle(1, 0x000000, 100);
moveTo(0, 200);
lineTo(0, -200);
moveTo(200, 0);
lineTo(-200, 0);
//
//
moveTo(200, 200);
lineTo(200, -200);
moveTo(200, -200);
lineTo(-200, -200);
moveTo(-200, -200);
lineTo(-200, 200);
moveTo(-200, 200);
lineTo(200, 200);
lineStyle(3, 0x0000FF, 100);
for (var c = -1.25; c<=+1.25; c++) {
}
lineStyle(3, 0x000000, 100);
for (var c = -10; c<=+10; c++) {
	moveTo(OX-c*20, OY-1);
	lineTo(OX-c*20, OY+1);
	moveTo(OX-1, OY-c*20);
	lineTo(OX+1, OY-c*20);
}
function onOK() {
	B = b;
	M = M;
	if (M>0) {
		Y1 = (((-M)*10)-B);
		if ((Y1<=10) and (Y1>=-10)) {
			XFin = 200;
			YFin = Y1*20;
		}
		X1 = ((10-B)/(M));
		if ((Y1>=10) or (Y1<=-10)) {
			XFin = X1*20;
			YFin = -200;
		}
		Y2 = (((-M)*-10)-B);
		if ((Y2<=10) and (Y2>=-10)) {
			NXFin = -200;
			NYFin = Y2*20;
		}
		X2 = ((-10-B)/(M));
		if ((Y2>=10) or (Y2<=-10)) {
			NXFin = X2*20;
			NYFin = 200;
		}
	}
	if (M<0) {
		Y1 = (((M)*10)-B);
		if ((Y1<=10) and (Y1>=-10)) {
			XFin = -200;
			YFin = Y1*20;
		}
		if ((Y1>=10) or (Y1<=-10)) {
			X1 = ((10-B)/(-M));
			XFin = -X1*20;
			YFin = -200;
		}
		Y2 = (((M)*-10)-B);
		if ((Y2<=10) and (Y2>=-10)) {
			NXFin = 200;
			NYFin = Y2*20;
		}
		X2 = ((-10-B)/(-M));
		if ((Y2>=10) or (Y2<=-10)) {
			NXFin = -X2*20;
			NYFin = 200;
		}
	}
	if (M == 0) {
		XFin = 200;
		YFin = -B*20;
		NXFin = -200;
		NYFin = -B*20;
	}
	lineStyle(3, 0x000000, 100);
	moveTo(XFin, YFin);
	lineTo(NXFin, NYFin);
	//
	//
	Y3=(((-M*(_root.ball1._x/20))-B)*20)
	Y4=((_root.ball1._y)-Y3)
	if((Y4<12.5) and (Y4>-12.5)){
	_root.ball1.gotoAndPlay("break");
	}
	Y5=(((-M*(_root.ball2._x/20))-B)*20)
	Y6=((_root.ball2._y)-Y5)
	if((Y6<12.5) and (Y6>-12.5)){
	_root.ball2.gotoAndPlay("break");
	}
	Y7=(((-M*(_root.ball3._x/20))-B)*20)
	Y8=((_root.ball3._y)-Y7)
	if((Y8<12.5) and (Y8>-12.5)){
	_root.ball3.gotoAndPlay("break");
	}
	Y9=(((-M*(_root.ball4._x/20))-B)*20)
	Y10=((_root.ball4._y)-Y9)
	if((Y10<12.5) and (Y10>-12.5)){
	_root.ball4.gotoAndPlay("break");
	}
	Y11=(((-M*(_root.ball5._x/20))-B)*20)
	Y12=((_root.ball5._y)-Y11)
	if((Y12<12.5) and (Y12>-12.5)){
	_root.ball5.gotoAndPlay("break");
	}
	Y13=(((-M*(_root.ball6._x/20))-B)*20)
	Y14=((_root.ball6._y)-Y13)
	if((Y14<12.5) and (Y14>-12.5)){
	_root.ball6.gotoAndPlay("break");
	}
	Y15=(((-M*(_root.ball7._x/20))-B)*20)
	Y16=((_root.ball7._y)-Y15)
	if((Y16<12.5) and (Y16>-12.5)){
	_root.ball7.gotoAndPlay("break");
	}
	Y17=(((-M*(_root.ball8._x/20))-B)*20)
	Y18=((_root.ball8._y)-Y17)
	if((Y18<12.5) and (Y18>-12.5)){
	_root.ball8.gotoAndPlay("break");
	}
	Y19=(((-M*(_root.ball9._x/20))-B)*20)
	Y20=((_root.ball9._y)-Y19)
	if((Y20<12.5) and (Y20>-12.5)){
	_root.ball9.gotoAndPlay("break");
	}
	Y21=(((-M*(_root.ball10._x/20))-B)*20)
	Y22=((_root.ball10._y)-Y21)
	if((Y22<12.5) and (Y22>-12.5)){
	_root.ball10.gotoAndPlay("break");
	}
	Y23=(((-M*(_root.ball11._x/20))-B)*20)
	Y24=((_root.ball11._y)-Y23)
	if((Y24<12.5) and (Y24>-12.5)){
	_root.ball11.gotoAndPlay("break");
	}
	Y25=(((-M*(_root.ball12._x/20))-B)*20)
	Y26=((_root.ball12._y)-Y25)
	if((Y26<12.5) and (Y26>-12.5)){
	_root.ball12.gotoAndPlay("break");
	}
	Y27=(((-M*(_root.ball13._x/20))-B)*20)
	Y28=((_root.ball13._y)-Y27)
	if((Y28<12.5) and (Y28>-12.5)){
	_root.ball13.gotoAndPlay("break");
	}
	Y29=(((-M*(_root.ball14._x/20))-B)*20)
	Y30=((_root.ball14._y)-Y29)
	if((Y30<12.5) and (Y30>-12.5)){
	_root.ball14.gotoAndPlay("break");
	}
	Y31=(((-M*(_root.ball15._x/20))-B)*20)
	Y32=((_root.ball15._y)-Y31)
	if((Y32<12.5) and (Y32>-12.5)){
	_root.ball15.gotoAndPlay("break");
	}
}
stop();

Reply With Quote
  #2  
Old June 20th, 2007, 09:38 AM
salem's Avatar
salem salem is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2005
Posts: 1,608 salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Day 13 h 8 m 41 sec
Reputation Power: 276
1. Edit your post to put [code] at the start of your code, and [/code] at the end of your code to preserve all the source code formatting.

2. This forum is called "other languages", which means we really can't tell which language you're programming in.

3. There isn't a single comment in the code which might help us understand the way you did certain things, in order to perhaps suggest alternatives.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Help anyone?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway