Be a Supporter!
Response to: Keyboard Event Posted 1 month ago in Game Development

At 11/29/14 05:19 PM, CzeryWassierSwizier wrote: I can tell you're not a programmer. :P

If you're feeling adventurous, you can read the fun manual

That isn't fun! That isn't fun at all :(

Also, incase you meant the mouse button low-and-behold:

Button.addEventListener(MouseEvent.CLICK, mouseClick);
function mouseClick (event:Event):void{
gotoAndStop(WhateverFrame);
}
Response to: Flash Develop 'Build Failed' :( ? Posted 1 month ago in Game Development

Just restarted and am getting these. Wat.

Flash Develop 'Build Failed' :( ?


I've wrote a simple piece of code that draws a circle. But low and behold Flash Develop can't even. I've tested my code out in the flash built-in IDE and it works.

My Code:

package myTestPackage
{
	/**
	 * @author Graham Long
	 */
	
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class Main extends Sprite 
	{
		var Circle:Sprite = new Sprite;
		Circle.graphics.beginFill(0);
		Circle.graphics.drawCircle(480, 270, 50);
		addChild(Circle);
	}	
}

Flash Develop 'Build Failed' :( ?

Questions about FlashDevelop :( Posted November 22nd, 2014 in Game Development

Right, so I'm trying to get used to using an IDE (instead of flash itself) as it will help me understand and learn other languages easier later on. Anyway, since I've always just coded straight outta flash...I'm confused very much so actually. Also, how do I see the output panel

Here is a picture highlighting everything I'm confused about:

Questions about FlashDevelop :(

Response to: Creating Hazzards in as3. Posted November 16th, 2014 in Game Development

Well since it's a school project they always have you code on the timeline.

Why? Isn't that kinda counter-productive?

Response to: screen-capture look animation Posted November 16th, 2014 in Game Development

Just do frame-by-frame animation with it slowly developing the shapes. Also, use the animation forum.

Response to: Completely wipe the display list? Posted November 11th, 2014 in Game Development

I've ended up just using a for loop that keeps removing objects until there isn't any left :/


Is their a piece of code that can remove everything off the screen? Or should I just do it one by one?

Response to: Function being stupid? Posted November 3rd, 2014 in Game Development

At 10/31/14 10:33 PM, Gimmick wrote: Hmm..actually..is coin1 a sprite? Or is it an Object? The function drawCoin(whatCoin) doesn't have any type specified for whatCoin, so you could be passing blanks and it'd create them without any problem AFAIK. Does this work?

I've since deleted the code. But I'mm almost certain this was the problem. Thanks for the help, I'll remember it for in the future.

Response to: Function being stupid? Posted October 30th, 2014 in Game Development

At 10/30/14 10:48 AM, Diki wrote: It's impossible to say precisely what is causing the errors with absolute certainty since there isn't enough given information, but it looks like the code that is throwing the error isn't being executed in the scope where the coin variables have been defined.

I ended up just doing each coin manually.

Response to: Function being stupid? Posted October 30th, 2014 in Game Development

drawCoin(coin1);
drawCoin(coin2);
drawCoin(coin3);
drawCoin(coin4);

This works error free. But when I'm trying to set up collision later on it's saying there undefined properties.

Actually, the draw coin function results in the same error.

Function being stupid? Posted October 30th, 2014 in Game Development

I'm getting undefined property errors. The thing is, I have defined them.

My Code:

function drawCoin(whatCoin){

var whatCoin:Sprite = new Sprite;
whatCoin.graphics.beginFill(0xFFFFFF);
whatCoin.graphics.drawCircle(randomNumber(15, 945), randomNumber(15, 525), 20);
addChild(whatCoin);

}

drawCoin(coin1);
drawCoin(coin2);
drawCoin(coin3);
drawCoin(coin4);

This works error free. But when I'm trying to set up collision later on it's saying there undefined properties.

Code returning error:

function coinManagement(){

if (square.hitTestObject(coin1)){
	removeChild(coin1);
	
}

if (square.hitTestObject(coin2)){
	removeChild(coin2);
}

if (square.hitTestObject(coin3)){
	removeChild(coin3);
}

if (square.hitTestObject(coin4)){
	removeChild(coin4);
}

}

And for posterity, here are the error message:

Scene 1, Layer 'Layer 1', Frame 1, Line 41, Column 26	1120: Access of undefined property coin1.
Scene 1, Layer 'Layer 1', Frame 1, Line 42, Column 14	1120: Access of undefined property coin1.
Scene 1, Layer 'Layer 1', Frame 1, Line 46, Column 26	1120: Access of undefined property coin2.
Scene 1, Layer 'Layer 1', Frame 1, Line 47, Column 14	1120: Access of undefined property coin2.
Scene 1, Layer 'Layer 1', Frame 1, Line 50, Column 26	1120: Access of undefined property coin3.
Scene 1, Layer 'Layer 1', Frame 1, Line 51, Column 14	1120: Access of undefined property coin3.
Scene 1, Layer 'Layer 1', Frame 1, Line 54, Column 26	1120: Access of undefined property coin4.
Scene 1, Layer 'Layer 1', Frame 1, Line 55, Column 14	1120: Access of undefined property coin4.
Scene 1, Layer 'Layer 1', Frame 1, Line 33, Column 10	1120: Access of undefined property coin1.
Scene 1, Layer 'Layer 1', Frame 1, Line 34, Column 10	1120: Access of undefined property coin2.
Scene 1, Layer 'Layer 1', Frame 1, Line 35, Column 10	1120: Access of undefined property coin3.
Scene 1, Layer 'Layer 1', Frame 1, Line 36, Column 10	1120: Access of undefined property coin4.
DisplayObject contents check? Posted October 30th, 2014 in Game Development

Right. So I have this thing where a square moves and I'm currently implementing a coin system where they randomly spawn, when all on the screen are collected, they all respawn. So I've thought of a way. But to make it work I need a bit of code.

What code could you use to see how many are contained. Something like:

if (displayobjects > foo){bar}
Response to: Serious help before Halloween pleas Posted October 30th, 2014 in Game Development

This would have been a lot easier if you guys just exchanged skypes.

Response to: What ended your friendship Posted October 28th, 2014 in General

At 10/27/14 09:41 PM, ForNoReason wrote: Wanted me to choose between hanging out with him and hanging out with my girlfriend. The entire thing seemed stupid to me so I told him to get lost. I then married my girlfriend.

Did you marry her out of spite?

Response to: Describe Yourself As A Food Item Posted October 28th, 2014 in General

I'm a sandwich. English.

Response to: The fuck you do today? Posted October 28th, 2014 in General

At 10/28/14 02:47 PM, SentForMe wrote:

:even considering that today has now become tomorrow.

England master-race. I'm...I'm sorry.

The fuck you do today?

Response to: The fuck you do today? Posted October 28th, 2014 in General

At 10/14/14 08:41 PM, DM692 wrote: Like

A whole house

Alone?

>_>

The fuck you do today?

Response to: 4chan users Posted October 28th, 2014 in General

At 10/28/14 03:09 PM, NeonSpider wrote:
At 10/28/14 02:53 PM, SubparTony wrote: God, I hope you put $ instead of S in your passwords
Don't worry. I use Ke$ha as all of my passwords. Oh you know what? I should probably go change them to Pa$$w0rd. I mean it has $ in it twice, a capital letter, and a number so that must mean it's like Fort Knox levels of safe.

Hunter2

Response to: removeChild() error? Posted October 27th, 2014 in Game Development

I've ended up just doing myArray[i] instead.

Response to: need help with one code. Posted October 27th, 2014 in Game Development

One Code Please.

need help with one code.

Response to: You Write Like a Bitch Posted October 27th, 2014 in General

:( Why?

You Write Like a Bitch

Response to: You Write Like a Bitch Posted October 27th, 2014 in General

My handwriting is shite.

Response to: teen raped in bathroom epic teacher Posted October 25th, 2014 in General

At 10/24/14 10:04 PM, beakerboy wrote: so the story is even more messed up than it sounds.

I smell a faggot.

Defining Array ID error? Posted October 25th, 2014 in Game Development

Okay, so I'm now trying to loop through arrays. I've taken a look and it seems to be understandable, but I'm having one problem.

coins[0].ID = "sample text";

returns an error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at KeyboardControls_fla::MainTimeline/frame1()

So why does it return an error when I'm trying to define it?

Response to: probably a stupid question but.. Posted October 25th, 2014 in Game Development

At 10/25/14 05:06 AM, ErikMasters wrote:
At 10/24/14 07:19 AM, GrahamNG wrote: Go to top right where it says 'classic', select reset workspace and it should resize all the panels.
Ahh. Back to normal. Thank you GrahamNG and everyone else for your suggestions

Happy I could help :)

Response to: removeChild() error? Posted October 25th, 2014 in Game Development

Okay, so I'm now trying to loop through arrays. I've taken a look and it seems to be understandable, but I'm having one problem.

trace(coins[0].ID = "sample text");

returns an error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at KeyboardControls_fla::MainTimeline/frame1()

So why does it return an error when I'm trying to define it?

removeChild() error? Posted October 25th, 2014 in Game Development

I'm getting- ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

I understand what happens, it's trying to remove something that isn't there. But how can I make it not detect the object so that it won't error?

Code:

var Coin:Sprite = new Sprite;
Coin.graphics.beginFill(0xFF0000);
Coin.graphics.drawCircle(300, 250, 40);
addChild(Coin);
	
rectangle001.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
function enterFrameHandler (event:Event){
	if(rectangle001.hitTestObject(Coin))
       {
            trace("hit");
			Coin.visible = false; // Flimsy attempt at making it not detect. What would I put here to remove detection?
		    removeChild(Coin); // Error from here right? 
			
       }
       else
       {
           trace("miss");
       }
}
Response to: Is Flash Dead? Posted October 25th, 2014 in Game Development

At 10/24/14 02:02 PM, Gimmick wrote: Part of the problem is people pushing newcomers and so on to haxe instead of AS3. Yes it's better but that just worsens the situation. It's like how AS2 newcomers were encouraged to go to AS3, and now AS3 to haxe. (Side note, there needs to be a strikethrough option here)

I'd be interested in haxe but like you said earlier, OP is shite at programming.

Response to: Answer a Question with a Question Posted October 24th, 2014 in General

Would you be surprised to learn that I am so surprised by that statement that I'm not even quite sure I can believe it?

Why would I believe that you don't believe that?