Be a Supporter!
Response to: Computer Science Posted May 8th, 2013 in Programming

At 5/6/13 10:42 PM, poom3619 wrote: Hello, World. Could anyone explain detailed difference between Computer Engineering and Computer Science? I decided to enroll in CE because my parent and relative said that "Engineer" is sound good and other "Computer Engineer" here would raise the eyebrow if they know "Computer Scientist" will be their boss. I personally prefer coding and trail-and-error'ing instead of assemble something.

Roughly speaking, Computer Engineers work with hardware. Do you like building your own computers and looking at hardware specs? Do you like the idea of learning about how CPUs, memory, storage, etc work?

Computer Science is usually a degree that prepares you to be a programmer. Do you like writing flash games or other software? Do you like discrete mathematics?

Response to: scrolling credits Posted October 9th, 2009 in Game Development

Just make the entire credits one textfield, then slowly tween them up over the stage.

Response to: Multiple Mcs To Single Class [as3] Posted September 29th, 2009 in Game Development

You don't need to make a class file for each extension. You can set a custom class for an auto generated one to extend in the properties window.

Response to: [AS2] Using a variable only once? Posted September 23rd, 2009 in Game Development

onClipEvent(load){
a=0;
}
onClipEvent(enterFrame){
a+=1;
}

Response to: Some Oop Help Please (as2) Posted September 19th, 2009 in Game Development

lol = [];
for(i=0; i<23; i++){
creep = new Creep();
lol.push(creep);
}

Then just loop through the array to reference them all.

Response to: As2 To As3 Posted August 27th, 2009 in Game Development

Google "as3 switch statements"
It'll get rid of a lot of your
if(asd == "asdfca"){
}
if(asd == "adfgvafsda"){
}
if(asd == "asasdfgvadfa"){
}

Response to: Programming From One Frame Posted August 27th, 2009 in Game Development

At 8/26/09 11:31 PM, RemminyCricket wrote:

:trying to learn how to code so that I don't sound like an annoying noob

If you want to shed your noobdom faster, don't waste your time learning as2.

So I instance my mc player and try it from the main frame like this:

if (Key.isDown(Key.UP)){
_root.player._y-=8
}

That just checks for the key press one time. You need it to check for key presses every frame.

onEnterFrame = function(){
 if (Key.isDown(Key.UP)){
 _root.player._y-=8
}
}
Response to: Why is it that... Posted August 27th, 2009 in Game Development

Tried restarting flash? Tried not having unprotected sex with software?

Response to: a moving platform Posted August 24th, 2009 in Game Development

Put code in the platform class/whatev that says "if I am hitting the player, add my velocity to the player's velocity"

Response to: Action script help needed! =O! Posted August 5th, 2009 in Game Development

onClipEvent (enterFrame) {
while (face._y >= 350) {
face._y --;
}
while (face._y <= 0) {
face._y ++;
}
while (face._x >= 480) {
face._x --;
}
while (face._x <= 0) {
face._x ++;
}
}
Response to: Important Q! Posted August 5th, 2009 in Game Development

in my previous post, I added the float to the stage, not to a container
for it to be in the layer movieclip, stick thisLayer in front of addChild, using my code above.

thisLayer.addChild(float2);

To make it have certain coords, just assign them like normal:
float2.x = 300;
float2.y = 700;

Response to: probably nub question: Random text? Posted August 5th, 2009 in Game Development

var names:Array = ["Patrick","James","Edward"];
var randomName:String = names[Math.floor(Math.random()*names.len gth)];

It's basically the same in as2, just remove the :Array and :String.

Response to: Php/sql Help Posted August 5th, 2009 in Programming

There is probably a far more efficient way to do this, but off the top of my head...

$noSpaceUsername = '';
$username = trim($_POST['username']);
$username = explode(' ', $username);
foreach($username as $part){
$noSpaceUsername .= $part;
}

Response to: The phrase "Fail," or "Epic Fail." Posted August 5th, 2009 in General

this thread is pass

Response to: Weapon size help Posted August 5th, 2009 in Game Development

If you've used any tweens on that layer, try using two different layers. I used get bugs with scale when using a bunch of different tweens on the same layer in flash 8.

Response to: flash collab? Posted August 5th, 2009 in Game Development

http://www.newgrounds.com/bbs/topic/9281 19

just look at the index of the flash forum

Response to: Important Q! Posted August 5th, 2009 in Game Development

In this for loop:
for (var layerNum:uint=0; layerNum<numLayers; layerNum++){
try adding this

if(layerNum == numLayers-1){
var float2:float2 = new float2();
addChild(float2);
}

To add an instance of a different class to the top layer.
I don't know if this is what you wanted, when you say "adding a different child" I assume that means another DO of a different type than float1.

Response to: adding numerous childs same type. Posted July 28th, 2009 in Game Development

1- how to create an instance of that movie clip whenever the user clicks somewhere on the movie (there needs to be able to be as many instances as the user clicks, not only one.)

2- How to delete an instance when it has reached the end of its animation.

I don't know how to do this code-wise too, not only theorically.

Make a class that extends MovieClip, and attach it to the animation you made.
Add an instance of the class to the stage or wherever, and change the x and y to mouseX and mouseY.
I made a class that sorta accomplishes what you need for this one project of mine

package 
{
	import flash.display.MovieClip;
	import flash.events.Event;
	public class MapAnim extends MovieClip
	{
		public var finished:Boolean = false;
		public var removeOnFinish:Boolean;
		public function MapAnim(autoRemove:Boolean = false):void
		{
			removeOnFinish = autoRemove;
			addEventListener(Event.ENTER_FRAME, oef);
		}
		public function destruct():void
		{
			removeEventListener(Event.ENTER_FRAME, oef);
			parent.removeChild(this);
		}
		private function oef(e:Event):void
		{
			if(this.currentFrame == this.totalFrames){
				finished = true;
				if(removeOnFinish){
					destruct();
				}
			} else {
				finished = false;
			}
		}
	}
}
Response to: AS 2.0 animation help required Posted July 27th, 2009 in Game Development

Here:

onClipEvent (load) {
	_x = 250;
}
onClipEvent (enterFrame) {
	if (Key.isDown(Key.RIGHT)) {
		if (_x < 350) {
			_x += 3;
		}
		if (_rotation < 20) {
			_rotation += 0.6;
		}
	}
	if (Key.isDown(Key.LEFT)) {
		if (_x > 150) {
			_x -= 3;
		}
		if (_rotation > -20) {
			_rotation -= 0.6;
		}
	}
	if(!Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)){
		if(!_rotation < 0.6 && !_rotation > -0.6){
			_rotation += -1 * _rotation/3;
		}
	}
}

I also fixed some redundancies.
If you want to know how it works, feel free to PM me.

AS3: Loading Screen Posted July 23rd, 2009 in Game Development

After the player chooses their character in my game and enters a level, there is a lot of lag while the level loads because of all the constructors running and display objects being added to the stage. Is there any way to create an in-game loading screen to display while flash lags rendering the level?

Response to: AS3: Book Newbie Posted July 23rd, 2009 in Game Development

http://www.friendsofed.com/book.html?isb n=9781590597910

That was a great book.
Also, when looking on their website, I saw this:

http://www.friendsofed.com/book.html?isb n=9781430218210

That looks good too.

Response to: doing direction and speed Posted July 23rd, 2009 in Game Development

I think you need to take a look at this:
Guide to Order of Operations

Actually, I do. Damn.

I am not thinking straight tonight.
Sorry for the messed up code...

Response to: doing direction and speed Posted July 23rd, 2009 in Game Development

And the values for x and y are always equal.

My bad.

myXdirection = myYdirection = -1*range+random(range);
Now you get only negative numbers.

I think you need to take a look at this:
Guide to Order of Operations

Response to: moving groups of frames Posted July 23rd, 2009 in Game Development

To select all the stuff in a group of frames all at once, go to the onion skin button, and 2 buttons over is the "edit multiple frames" button. Select that, and move the brackets in the timeline like you would an onion skin so the frames you want to edit are in between the brackets. Lock any layers you don't want to be selected, and press ctrl+A or command+A to select everything. You should see all the shapes jumbled on top of one another, and you should be able to transform and move them around.

Response to: Flash Preloder help Posted July 23rd, 2009 in Game Development

In as2, _root has two methods that allow you to make preloaders.
The methods are getBytesLoaded (returns the number of bytes in the movie already downloaded to the user's drive) and getBytesTotal (returns the total size of the flash file).

If getBytesLoaded = getBytesTotal, then the movie has loaded.

_root.stop();
_root.onEnterFrame = function(){
if(getBytesLoaded() == getBytesTotal()){
play();
}
}
Response to: doing direction and speed Posted July 23rd, 2009 in Game Development

onClipEvent(load){
        range = 5;
	myXdirection = myYdirection = -1*range+random(range);
	_alpha=100
}
Response to: Flash Preloder help Posted July 23rd, 2009 in Game Development

http://www.newgrounds.com/downloads/prel oaders/

Download one of these.
Change the graphics.

Response to: Actionscripting Posted July 23rd, 2009 in Game Development

Just stick the variable on root. It won't change from scene to scene.

Response to: Programs to make flash Posted July 22nd, 2009 in Game Development

Try FlashDevelop and the Flex SDK.

http://opensource.adobe.com/wiki/display /flexsdk/Downloads

http://www.flashdevelop.org/community/vi ewforum.php?f=11

If you aren't very good with computers, or only want to do animation, just get a cheap copy of CS3 off of ebay or something.

Response to: Don't show warning messages on PHP? Posted July 22nd, 2009 in Programming

Turn the display_errors setting in php.ini to off.