You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!

Author Search Results: 'Moonasha'

We found 163 matches.


<< < > >>

Viewing 1-30 of 163 matches. 1 | 2 | 3 | 4 | 5 | 6

1.

None

Topic: AS3 rotation

Posted: 05/15/09 09:19 PM

Forum: Flash

Hey guys, I need a little help, google isn't answering my calls...

I need to have some MCs face towards a certain point on the stage when they're added. Can anyone share the math required?

For example, movieclip "Enemy1" is added to the stage at 800,600. I want it to rotate to point towards 400,300.


2.

None

Topic: as3 URL halp

Posted: 03/28/09 03:11 PM

Forum: Flash

I'm trying to pass a URL from a text file to flash. It gets there, but when I use it, it uses it as a string!

Here's what happens....

It reads this from the file :

imageURL=pictures/images/

Then when I tell it to load a picture from that directory, using this method :

URLRequest(path + filename); , where path is imageURL.

and it says URL not found. I had it trace it, and the path was fine. I entered the same path into the string manually, and it works. I have no clue why it won't work..


3.

None

Topic: Good at flash? Join NocturnalHaunt!

Posted: 03/28/09 01:58 PM

Forum: Flash

Cool site.. I'd join, but I'm afraid college leaves no time for recreational flash :[


4.

None

Topic: AS3 - Array Problem

Posted: 03/28/09 03:05 AM

Forum: Flash

Have some vars in a text file, having a little problem with a string.
Here's my code :

for (var n = 0;n<totalFiles;n++)
			{
				var temp2 = ("loader.data.img" + (n+1)).toString();
				descArray.push(temp2);
			}
			trace(descArray);

When I do that , my array looks like :
loader.data.img1,loader.data.img2,loader .data.img..blah blah blah

That's expected, because I'm pushing the string... Question is, how would I make it not add the string itself, but what it's pointing to? I think I'd have to convert the string to something else, but I have no clue what would work


5.

None

Topic: I want to learn how to program game

Posted: 02/25/09 06:21 PM

Forum: Flash

At 2/25/09 05:53 PM, WolfAkela wrote: ActionScript 3.0, forget about AS2.0, it's getting obsolete, not to mention it's slow compared to AS3.0.

Most of the "baww AS3 is too hard" complaints stem from users being too stuck with typical AS2.0 newbie mindedness (no type declaration, no OOP, using onClipEvents, etc). If, and only if, you had used AS2.0 properly, moving to AS3.0 would not be problem.

So why even bother with AS2.0 when you can go straight to AS3.0?

This. Move onto AS3, and you'll pave the way for yourself to learn other real programming languages. AS2 is a freakin joke.


6.

None

Topic: Really annoying problem!

Posted: 02/22/09 05:53 PM

Forum: Flash

OK, so I got a button that acts as a replay button.

On the timeline I have :

stop();
replayButton();

In the document class I have :

public function replayButton()
		{
			something.statDisplay.text = something.toString();
			button_replay.addEventListener(MouseEvent.MOUSE_UP, replayMovie);


		}
		function replayMovie(e:MouseEvent)
		{
			trace("dsakljdla");
			gotoAndPlay(2);
		}

It traces, but for some unknown reason it doesn't go to frame 2 again. Any ideas?


7.

None

Topic: text problem... about to go insane

Posted: 02/15/09 04:36 PM

Forum: Flash

At 2/15/09 07:00 AM, DOOKIE119 wrote: it would probably help if u told us wat u are trying to do
, once u explain i may be able to help

Change the value of UI.statText.text to person.stat.toString();


8.

None

Topic: text problem... about to go insane

Posted: 02/15/09 05:35 AM

Forum: Flash

In class "person" I have variable "stat", which is a number and equals zero. In another class I have this function :

UI.statText.text = person.stat.toString();

I get this error :

TypeError: Error #1034: Type Coercion failed: cannot convert "0" to flash.text.TextField.

I can't figure out what the hell it wants. I've tried everything I can think, and am about to stab something. And yes, I've imported flash.text.*;


9.

None

Topic: trouble with slopes

Posted: 02/12/09 02:40 AM

Forum: Flash

At 2/12/09 02:22 AM, liaaaam wrote: Put the y+gravity code above the while loop and I suggest putting the y- to be something like y-=.25 or something, make it more accurate =o

Didn't work =(

But I did manage to find a temporary solution :

while (!doc.ground1.hitTestPoint(this.x, this.y+50, true))
				{
					this.y+=1
				}
			
			
			while (doc.ground1.hitTestPoint(this.x, this.y+30, true))
			{
				this.y -= 1;
			}

I think it's terrible though. If anyone can come up with a more elegant one, please do so <3


10.

None

Topic: trouble with slopes

Posted: 02/12/09 01:27 AM

Forum: Flash

oh, i forgot to mention, the code you see is the 'gravity' code.


11.

None

Topic: trouble with slopes

Posted: 02/12/09 01:26 AM

Forum: Flash

So I'm trying to make a platformer...

RIght now I have an ENTER_FRAME listener that does this on the "player" :

while (doc.ground1.hitTestPoint(this.x, this.y+50, true))
			{
				this.y--;
			}
				this.y += yspeed;

It works somewhat, but when I get to a damn hill, it bounces up and down real fast. I think the problem is the "gravity" is pulling it down too far, then it's being spat back out by the while loop. Any solutions? I'm pretty new to AS3, so I can't really think of one -_-


12.

None

Topic: Eraserhead Worth £15?

Posted: 02/11/09 01:06 PM

Forum: General

At 2/11/09 01:06 PM, Mechabloby wrote: Title says it all. I've heard nothing but good things come from this film, and since I'm a bit of a fan of David Lynch, I'm still wondering if it's worth the £15 it'll take to get a copy of it. Simply put: is it?

no
javascript:ClearTextArea(document.forms[
'mainform'].elements['body'],%208192);


13.

None

Topic: camera...

Posted: 02/09/09 07:11 PM

Forum: Flash

At 2/9/09 07:01 PM, Moonasha wrote: 1 More question....

so if I make x & y = -play.x+stage.stageWidth/2; , how would I make something not move? A score counter, for example.

Ahh figured it out now. Adjust its position relative to player


14.

None

Topic: camera...

Posted: 02/09/09 07:01 PM

Forum: Flash

1 More question....

so if I make x & y = -play.x+stage.stageWidth/2; , how would I make something not move? A score counter, for example.


15.

None

Topic: camera...

Posted: 02/09/09 03:24 AM

Forum: Flash

At 2/9/09 02:25 AM, Nano256 wrote: Assuming you are keeping everything in the main timeline, you could simply move around the main timeline's x and y coordinates in relation to the stage. Code in frame or in document class:

x = -player.x+stage.stageWidth/2;
y = -player.y+stage.stageHeight/2;

This code would make the player always in the center of the screen, the math should be self-explanatory, but I can explain if needed.

This helps a lot, thanks! I think I understand the math...

One thing though- Any idea how you'd add lag? Like, when my character reaches top speed, the camera lags a bit. Perhaps setting some variables to mess with the math there that interact with the "speed" variable?


16.

None

Topic: camera...

Posted: 02/09/09 01:50 AM

Forum: Flash

Let's say I'm making a platformer... like mario to give an example. How does one make the "camera" follow the player? And then, how would you go about adding lag?

I'm using AS3... not asking for a giant copypasta, but a general idea. Copypasta is fine too, but without an explanation of the code it's useless...


17.

None

Topic: umm a kinda n00b question but

Posted: 02/08/09 11:54 PM

Forum: Flash

At 2/8/09 11:50 PM, baboop wrote: yea im working on a platformer and i dont want to move with the arrow keys how would i move with

WASD??

Instead of making it check the Arrow keys, make it check the keycode. e.g.

if (e.keyCode == 68)
{
blahblah
}

I know D is 68 off the top of my head...


18.

None

Topic: Questions

Posted: 02/07/09 04:49 PM

Forum: Flash

since I don't use AS2 I can't help much...

But I -know- there's tons of tutorials in the portal that cover most of those things you brought up. But really, you can't just code a game. You have to learn the language a little first, then things will be so easy.


19.

None

Topic: Horizontal Flip?

Posted: 02/07/09 04:47 PM

Forum: Flash

thanks guys, that helped me a lot!


20.

None

Topic: Horizontal Flip?

Posted: 02/07/09 03:38 PM

Forum: Flash

At 2/7/09 03:36 PM, popsicle-of-doom wrote: Modify -> Transform -> Flip Horizontal

Maybe I wasn't clear enough.

In code... in actionscript 3 to be specific. Not the drawing environment.


21.

None

Topic: play button

Posted: 02/07/09 03:35 PM

Forum: Flash

At 2/7/09 03:31 PM, firezone wrote: i tried it but it said that the selected symbol could not have actions applied to it

Are you using AS3?

Then put this in the frame :

yourbuttonsinstancenamehere.addEventList ener(MouseEvent.MOUSE_DOWN, functionName);

function functionName(event:MouseEvent):void
{
gotoAndStop(1);
}

I don't get why people still use AS2...


22.

None

Topic: Horizontal Flip?

Posted: 02/07/09 03:32 PM

Forum: Flash

How does one do a horizontal flip in AS3? Thanks.


23.

None

Topic: keyboard help

Posted: 02/07/09 03:54 AM

Forum: Flash

I have no clue why this is happening...

I have a listener for KEY_DOWN that fires this function :

public function keyDownHandler(e:KeyboardEvent)
{
if (e.keyCode == 90)
{
trace(e.keyCode);
}
}

For whatever reason, it doesn't work with 90 (which is Z), but it works with D (68). Anyone know why?


24.

None

Topic: The Act

Posted: 02/04/09 06:27 PM

Forum: General

At 2/4/09 06:15 PM, TheWolfe wrote: This Sat., I'm taking the ACT. I really don't know what to expect. I took the SAT a couple weeks ago. But I had taken the PSAT twice, and was more familiar with it. What should I expect this time around?

Hell.


25.

None

Topic: wall jumping?

Posted: 02/03/09 11:11 AM

Forum: Flash

At 2/3/09 11:09 AM, flailthefox wrote:
At 2/3/09 11:08 AM, Saza wrote: You need to say x-- or x++ so its not lways touching the wall.
where do i need to put that? at the if statements?

like this..

while (hitting wall == true)
{
this.x++
}


26.

None

Topic: A little AS help :o

Posted: 02/03/09 11:03 AM

Forum: Flash

At 2/3/09 10:57 AM, GustTheASGuy wrote: Classes are loaded on the frame they're first referenced. Assets also.

How do you change that? e.g., the constructor of the Document class... doesn't that always run no matter what?

Does the 'export in first frame' option have to do with this?


27.

None

Topic: wall jumping?

Posted: 02/03/09 10:50 AM

Forum: Flash

Sounds like its freezing because of a neverending loop... most likely one of those whiles. If I were you, I'd use an event listener that checks for the collision every frame as opposed to a while loop.

At 2/3/09 10:45 AM, flailthefox wrote: thanks for the help, but it seems to be freezing my flash.

here the code on the enterFrmae:

while (_root.walljumpwall.hitTest (_x, _y, true)) {
walljump = true;
djump = false;
tjump = false;
}
if (_root.walljumpwall.hitTest (_x, _y, true) && !Key.isDown (Key.UP)) {
gotoAndStop (2)
_xscale -= scale;
}
while (_root.walljumpwall2.hitTest (_x, _y, true)) {
walljump = true;
djump = false;
tjump = false;
}
if (_root.walljumpwall2.hitTest (_x, _y, true) && !Key.isDown (Key.UP)) {
gotoAndStop (2)
_xscale = scale;
}

heres the code for the clip ever load:

var walljump:Number = 10;
var walljump:Boolean = false;

it seems whenever i jump at the wall it freezes my flash. any help here?

28.

None

Topic: A little AS help :o

Posted: 02/03/09 10:41 AM

Forum: Flash

Let's say I program a game using .as files... How would I add a few introductory frames before the scripts are loaded? Right now it just tries to load everything on frame 1.

thanks!


29.

None

Topic: A little hitTestObject help...

Posted: 01/31/09 10:00 PM

Forum: Flash

What would the non naive way be then? :\ I just can't think of anything besides putting the code in the "circle" class.

Perhaps using an array...?


30.

None

Topic: A little hitTestObject help...

Posted: 01/31/09 09:52 PM

Forum: Flash

so I 'm trying to make it when one object hits another one, something happens.

Is there anyway to make it check the object, and not the instance name? Like, some sort of wildcard would help.

For example :

I have Box. I create many circles in random places dynamically. If I assign code to the object box to detect the hitTest, what would it be? Assume I can't put the code in the circle class.


All times are Eastern Standard Time (GMT -5) | Current Time: 10:32 PM

<< < > >>

Viewing 1-30 of 163 matches. 1 | 2 | 3 | 4 | 5 | 6