Be a Supporter!
GameTesters seem... Pointless. Posted August 30th, 2014 in General

It's really not hard to just play your own game, you'll also have a better idea of where glitches may occur. I understand doing a control test to try the difficulty but other than that what's the point?

Any thoughts?

Response to: White Screen Preloader (as3) Posted August 25th, 2014 in Game Development

At 8/25/14 05:04 PM, egg82 wrote: Another example of a preloader directly from a library I'm building:

Sorry Egg, but I'm pretty confused, I may seem like a bit of a newbie, but could you please explain in lamen's terms, a lot of the terminlogy was confusing from that link, like 'scene' I've just been using keyframes, I haven't touched (and don't what they are) classes. Can you please explain how I can get my preloader to work, or where I'm going wrong.

Response to: White Screen Preloader (as3) Posted August 25th, 2014 in Game Development

Don't factory classes work in the Flash IDE?

I'm using Flash CS6 (the actions panel) no external software :P

Response to: Looking for specific code? Posted August 25th, 2014 in Game Development

At 8/25/14 01:10 PM, milchreis wrote: @Graham: What's the matter with the alpha value?
You used it to identify objects before.
What are you using it for this time that makes it necessary to check it's value?

That was unrelated :p, anyways I fixed the problem.

White Screen Preloader (as3) Posted August 25th, 2014 in Game Development

I have made other topics for this, and my knowledge has progress a bit. On the first frame I have a preloader and a play button, which sends the user to another frame. I'm getting the white screen for about up to 90% of the preloaders completion. I'm not exporting anything for actionscript and nothing is exporting for frame 1, everything is within one document and was made within flash.

I carried on coding to see if the problem would resolve itself, after adding another frame and coding some buttons etc, I noticed that the first frame had jumped from 7kb to about 65 kb, all the other frames remained relatively the same size.

Just ask if you need to see the code, I'm using bytesLoaded and bytesTotal.

In advance, all answers are appreciated. And I'll just continue with this thread, to stop the spamminess (sorry).

Response to: Looking for specific code? Posted August 25th, 2014 in Game Development

At 8/25/14 12:44 PM, egg82 wrote: alternatively

something.alpha = Math.abs(something.alpha);

(why would something.alpha reach below zero without you knowing about it?)

No, I do know of, I think you misunderstood me :p

Response to: Looking for specific code? Posted August 25th, 2014 in Game Development

I'm not sure what that is underneath my reply, ignore it.

Response to: Looking for specific code? Posted August 25th, 2014 in Game Development

At 8/25/14 09:52 AM, Barzona wrote:
At 8/25/14 09:39 AM, GrahamNG wrote: I've noticed that opacity can go below 0, meaning my code is breakable, is there any syntax that would allow something like:

if (something.alpha ~equal to or under~ 0) {blah blah blah}
Are you trying to keep the number from going below zero?

Just do this:

I have it set up so It knows when it reaches zero, so yours and Sam's solution would both work, thanks Barzona!


if(something.alpha <= 0){
something.alpha = 0;
};

You can definitely do checks on the alpha value. I'm sure you know that alpha only needs to be between 0 and 1, right? No reason that i know to go outside that range.
Response to: Looking for specific code? Posted August 25th, 2014 in Game Development

if (something.alpha ~equal to or under~ 0) {blah blah blah}
if(something.alpha <= 0)
{

}

That seemed like such an easy solution I'm ashamed I didn't think of it, thanks Sam!

Looking for specific code? Posted August 25th, 2014 in Game Development

I've noticed that opacity can go below 0, meaning my code is breakable, is there any syntax that would allow something like:

if (something.alpha ~equal to or under~ 0) {blah blah blah}

Response to: White screen of death (preloader) Posted August 25th, 2014 in Game Development

are all of your sounds set to export in first frame? if so try setting that off for all of them. then making a movie clip in the second frame and add enough layers to its timeline to add all the sounds. then put a stop(); on the first frame. thisshould make the preloader load the sounds

I haven't even got around to doing sounds yet :P

Response to: White screen of death (preloader) Posted August 24th, 2014 in Game Development

At 8/24/14 01:59 PM, GrahamNG wrote:
At 8/24/14 01:49 PM, milchreis wrote: If you export everything into the first frame, it will load before your preloader is displayed.
Can you explain that please? How would I change that? Also, when I use an image to buff up the file size the white screen only occurs for about 2% (Which I can deal with).

I just went through and made it export on every other frame, but it didn't help. It seems it always loads 7kb before showing the preloader.

Response to: White screen of death (preloader) Posted August 24th, 2014 in Game Development

At 8/24/14 01:49 PM, milchreis wrote: If you export everything into the first frame, it will load before your preloader is displayed.

Can you explain that please? How would I change that? Also, when I use an image to buff up the file size the white screen only occurs for about 2% (Which I can deal with).

Response to: White screen of death (preloader) Posted August 24th, 2014 in Game Development

At 8/24/14 01:26 PM, GrahamNG wrote: I'm working on a little game, but my preloader gets the white screen 'til about 85%, even though the file size is really small, I really don't want to have to put up with the whiteness. When I simulate download the results are the same.

.sfw = http://www.newgrounds.com/dump/item/f55c55059d9b3bcbec03c08c492ab739

I forgot to add the code.

stop();
addEventListener(Event.ENTER_FRAME, frameChecker1);
function frameChecker1(event:Event):void {
trace("Frame entered.");
var loaded:Number = this.loaderInfo.bytesLoaded;
var total:Number = this.loaderInfo.bytesTotal;
var percent:Number = loaded/total;
var percentRounded:uint = percent * 100;
loadingBar.scaleX = percent;
textLoading.text = percentRounded + "%";
if (total == loaded) {
buttonPlay.alpha = percent;
}
else {
buttonPlay.alpha = percent/2;
}
if (total == loaded) {
removeEventListener(Event.ENTER_FRAME, frameChecker1);
}
}
buttonPlay.addEventListener(MouseEvent.CLICK, playClick);
function playClick (event:MouseEvent){
play();
}


I'm working on a little game, but my preloader gets the white screen 'til about 85%, even though the file size is really small, I really don't want to have to put up with the whiteness. When I simulate download the results are the same.

.sfw = http://www.newgrounds.com/dump/item/f55c55059d9b3bcbec03c08c492ab739

Response to: Need help with sprite animation Posted August 23rd, 2014 in Game Development

If you made this one, you could definitely make them yourselves. Just start with drawing your keyframes first, such as the actual swinging of the sword, and then fill in the animation frames between the standing and the sword swing.

Also, make sure you get the timing right, like sword drag and other things, it's easy to keep everything at a monotone speed.

Response to: Help please Posted August 23rd, 2014 in Game Development

stage.quality = currentQuality;

I was wondering about quality buttons in games, so .quality 'eh?

Response to: Error 1009, the bane of my code. Posted August 23rd, 2014 in Game Development

At 8/23/14 08:39 AM, milchreis wrote:
At 8/23/14 08:05 AM, GrahamNG wrote: When I trace the button_lvl_1, in the output panel I get 'Object Movieclip' followed by error 1009.
Did you try stepping through your program with the debugger?
Please do so.

So, 'alpha' is of undefined property? How should I access it then?
alpha being undefined should not cause the error
I don't think it's undefined either, but try this yourself by tracing it

I just used debugger for the first time, and I've subsenquently fixed my code, one of my buttons was using an incorrect way of identification (xxx .alpha = xxx, over xxx.addEventListener) causing my entire code to mess up. I've fixed it. Thanks.

Response to: MouseClick event problem (AS3) Posted August 23rd, 2014 in Game Development

At 8/23/14 08:10 AM, milchreis wrote:
At 8/23/14 01:30 AM, bkbatman wrote: In the programming world.
0 = false
1 = true
Doing the alpha based identification differently doesn't make this an improvement really.

Due to a comment on here I tested the movieclip by tracing it and I still receive an error.

Response to: Error 1009, the bane of my code. Posted August 23rd, 2014 in Game Development

You should never ignore an error. Look at what the error is telling you: "Cannot access a property or method of a null object reference." Assuming the error occurs in the code you posted, it's telling you that something is null that you're trying to access. The only thing you're trying to access is Button_lv1; therefore, that button is null i.e. it does not exist. The button might exist on the screen, but it's not connected to the button variable you have in your code. Or you set the variable to null at some point.

When I trace the button_lvl_1, in the output panel I get 'Object Movieclip' followed by error 1009. So, 'alpha' is of undefined property? How should I access it then?


So, I'm making a small function whereby when I click on a movieclip it's opacity depletes. I've got it to work, but I get flooded with the dreaded error 1009, could someone help me edit my code to remove the error, or should I just ignore it.

Code:

stop();
Button_lvl_1.addEventListener(MouseEvent.CLICK, MouseClicks)
function MouseClicks (event:Event):void {
Button_lvl_1.alpha -= 0.01
}

Response to: MouseClick event problem (AS3) Posted August 22nd, 2014 in Game Development

I've fixed it, I just did enterGameButton.addEventListener and worked from there.

Response to: Help!! Posted August 22nd, 2014 in Game Development

At 8/17/14 06:05 PM, MSGhero wrote:
At 8/17/14 05:55 PM, Geel7989 wrote: PS, I've looked everywhere on the internet, I and cannot find a single thing on this. The only thing I could find was how to get it to go to a random scene, not to go to a specific scene randomly.
In the code that chooses the scene, don't include the menu scene as a possibility.

That's pretty good! I guess he was just randomising all available scenes, he should make a seperate function that randomly chooses within parameters, e.g, not including the menu screen.

Response to: Flash Player Question... Posted August 21st, 2014 in Game Development

As unrelated as this is, can't wait to see how your code has progressed since your first game :D

Response to: Need Devolpers To Make A Game Posted August 21st, 2014 in Game Development

First of all, I can't do it as a start because simply I'm not a good enough coder.

Specify what you have that could add to the game that makes it unique, someone could run of with that idea, so it's always good to specify. Also, you would have to pay. And these sorta things aren't cheap.

MouseClick event problem (AS3) Posted August 21st, 2014 in Game Development

Both of my event listeners are going to the same frame, all answers are appreciated.

stop();

addEventListener(MouseEvent.CLICK, enterGameClick);
function enterGameClick (event:MouseEvent) {
if (enterGame.alpha == 1){
gotoAndPlay(4);
removeEventListener(MouseEvent.CLICK, enterGameClick);
}
else if (creditsButton.alpha == 1) {
gotoAndPlay(3);
removeEventListener(MouseEvent.CLICK, enterGameClick);
}
}

Also, is there any way of selecting an object without having to use identification like alpha?

Stop(); command not operating? Posted August 20th, 2014 in Game Development

Edit: The play button is not functional, the second frame shouldn't be entered none-the-less.

I'm building a preloader in as3 (cs6 actions panel), the first thing I do is give a stop command write my code, all is good. When I CTRL+ENTER everything works, but when I try to simulate the download it check if the preloader is working, it loads, and then just goes onto the second frame, a problem I don't have when I not simulating the download.

Here is the code:

stop();
addEventListener(Event.ENTER_FRAME, frameChecker1);
function frameChecker1(event:Event):void {
trace();
var loaded:Number = this.loaderInfo.bytesLoaded;
var total:Number = this.loaderInfo.bytesTotal;
var percent:Number = loaded/total;
var percentRounded:uint = percent * 100;
loadingBar.scaleX = percent;
textLoading.text = percentRounded + "%";
if (total == loaded) {
buttonPlay.alpha = percent
}
else {
buttonPlay.alpha = percent/2
}
if (total == loaded) {
removeEventListener(Event.ENTER_FRAME, frameChecker1);
}
}

Problems with event listeners? Posted August 14th, 2014 in Game Development

-1 down vote favorite

I have a piece of code that I'm having problems with, it seems that even though I tell it do so the event listener is not being removed resulting in the 1009 error on frame 2.

Here is the code:

stop();
import flash.events.Event;
var loaded:Number
var total:Number;
var percent1:Number;
var percent2;

addEventListener(Event.ENTER_FRAME, enterFrameEvent);
function enterFrameEvent(event:Event):void{
loaded = this.loaderInfo.bytesLoaded;
total = this.loaderInfo.bytesTotal;
percent1 = loaded/total;
percent2 = percent1 * 100;
loadingBar.scaleX = percent1;
playButton.alpha = percent1;
if(loaded===total){playButton.alpha = 1};
}
if (loaded === total){removeEventListener(Event.ENTER_FRAME, enterFrameEvent)}

addEventListener(MouseEvent.CLICK, mouseClick);
function mouseClick (event:MouseEvent){
if (playButton.alpha == 1){
removeEventListener(MouseEvent.CLICK, mouseClick);
gotoAndPlay(2);

}

Response to: Playing graphics on a stop() ? Posted August 13th, 2014 in Game Development

At 8/12/14 11:20 AM, OOGIDIBA wrote: If you click on the graphic you want to keep playing and in the properties panel set it to a movie clip instead, It will keep chuggin along regardless of the stop();. That said, It movieclips no longer play until you test the movie so don't worry if it's not moving for you when you scroll in the timeline.

Thanks, since they don't loop on the stage I didn't realise they did so, movie clips it is!

Response to: Playing graphics on a stop() ? Posted August 11th, 2014 in Game Development

Is this AS3? I forgot to specify, sorry.