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: 'Moonkey'

We found 919 matches.


<< < > >>

Viewing 1-30 of 919 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 92031

1.

None

Topic: New Wwii Rts, Anyone?

Posted: 11/07/08 01:08 AM

Forum: Flash

There's not many RTS games out there because it is probably the most difficult genre to do at all, let alone do well. Honestly, if a more experienced programmer is thinking of making an RTS, it would be a massive undertaking and they would want to do it themselves.


2.

None

Topic: Multiple Colour Change

Posted: 11/03/08 02:38 PM

Forum: Flash

I think the best way to do it would be to have the MovieClip running offscreen, and each frame draw it to a Bitmap. You could then use the BitmapData.threshold method to replace individual colors.

It'd be simple if you could separate the colors into different MovieClips, but I guess that's out of the question :p


3.

None

Topic: Loading from the library with AS3

Posted: 11/03/08 02:32 PM

Forum: Flash

What was wrong with the frames-of-a-MovieClip approach? If you need to index them by name, you could store those names as frame labels in each frame, or just have a list of constants which point to the appropriate frame numbers. Presumably you had to have one line of code per tile for initialization when you were loading them from disk anyway?


4.

None

Topic: Lag from large backgrounds

Posted: 10/26/08 11:38 AM

Forum: Flash

I wonder if you'd see any improvement using .scrollRect instead of moving it around.


5.

None

Topic: Lag from large backgrounds

Posted: 10/26/08 05:56 AM

Forum: Flash

Are you changing the scale or rotating it? Or anything else that would cause it to be re-cached each frame?


6.

None

Topic: The Flash 'Reg' Lounge

Posted: 10/25/08 07:22 AM

Forum: Flash

Rather than mapping each pixel I'll be trying the standard technique that the current Flash 3d engines use

Ah, gotcha. It sounds like using pre-tapered graphics would be a little easier to code and maybe lighter on the renderer, but I imagine this is more about learning the proper technique anyway.

And you'd have the other advantage of being able to draw things straight on instead of a with a weird skew.


7.

None

Topic: Cannot remove a MovieClip?

Posted: 10/25/08 07:11 AM

Forum: Flash

Your ENTER_FRAME event isn't stopped anywhere. Even though it uses a weak reference, it can still continue to be called until the garbage collector gets rid of the bullet from memory. So the second time it gets called, the bullet will have already been removed and have no parent, hence the error.

You could explicitly remove the listener from within that same function, or check that the bullet has a parent before trying to remove it, or doing both is probably preferable.


8.

None

Topic: The Flash 'Reg' Lounge

Posted: 10/25/08 03:42 AM

Forum: Flash

At 10/24/08 05:38 PM, KaynSlamdyke wrote: Oh god I'm trying to code again...
Mouse over to move the tiles...

Looking good. I tried something similar a while back but never finished it. One more on the pile of half finished games.
When I textured the walls I found it much easier to start with trapezoidal textures, so you can just use flash's built in transforms instead of trying to map each pixel or anything like that.


9.

None

Topic: using removeMovieClip() ; function

Posted: 10/23/08 08:49 AM

Forum: Flash

removeMovieClips only work on things with a positive depth value. Things that are placed on the stage at authoring time are given a negative depth, so you need to swap them up to a positive depth before you remove them.

add something like this before you remove it

this.swapDepths(_parent.getNextHighestDepth());

10.

None

Topic: AS3 Platformer Help

Posted: 10/19/08 04:13 AM

Forum: Flash

&& means 'and'

if(isDown(37) && isDown(39)) {

11.

None

Topic: Get the class of an object?

Posted: 10/19/08 02:14 AM

Forum: Flash

Kind of. If you cast something to an Object, you can retrieve its consructor (which you can compare to a class, etc)

var s:Sprite = new Sprite();
trace(Object(s).constructor,Object(s).constructor == Sprite); // traces  [class Sprite] true

12.

None

Topic: AS3 Name Issues..

Posted: 10/19/08 02:08 AM

Forum: Flash

Does Top have any children that you might be clicking on instead?


13.

None

Topic: Blur effect question please!

Posted: 10/15/08 10:41 PM

Forum: Flash

Cool ^_^ No worries.


14.

None

Topic: Blur effect question please!

Posted: 10/15/08 10:19 PM

Forum: Flash

At 10/15/08 10:17 PM, Hero101 wrote: Or should I condense all my layers into one MC so it blurs it all for this one specific shot and just return them to seperate layers when I now longer need the blur effect???

That sounds like the best option. Both in terms of performance, and amount of work.


15.

None

Topic: Preloading sound is giving me grief

Posted: 10/14/08 06:14 PM

Forum: Flash

Sure, here you go


16.

None

Topic: Preloading sound is giving me grief

Posted: 10/14/08 04:51 AM

Forum: Flash

It looks like you're doing everything right, but I think I've found the problem.

When you set your export classes frame to something other than 1, but you make reference to the sound object from your document class (or main timeline), its like that reference exists before the class does. Or something...
Preloading sucks.

Anyway, it works if you call it from within another class (as long as that class isn't directly referenced in your document class, otherwise that class gets included on frame 1 and its the same as above).

What I do is have a 'Game' symbol which sits on frame 3, and has a class associated with it. The Game class is never directly referenced by the Document class, so it isn't forced into being included in frame 1, which means you avoid the weird problems like this. Then I use the Game class to control everything, and only use the Document class for preloader, ContextMenu etc.

Hope that helps :x


17.

None

Topic: Click Behind MC

Posted: 10/13/08 10:11 AM

Forum: Flash

glass.mouseEnabled = false;

should be all you need.


18.

None

Topic: swapDepths Issue

Posted: 10/12/08 10:14 AM

Forum: Flash

It really doesn't look like there's any need for a while loop there. Why not just an if? And there's also nothing inside the loop that would change the result of the hitTest, so there's no way for that while to ever end.

As for why the swapping doesn't work, you have

this.swapDepths(_root.fix);

in there twice. So its swapping with _root.fix once, and then swapping back?


19.

None

Topic: Rundown of variable protect levels?

Posted: 10/11/08 05:07 PM

Forum: Flash

Variables declared in the timeline become part of the object whose timeline you're coding in. They'll be available whatever frame or scene you go to within that object.

I don't think you're allowed to use private/public etc for timeline variables. I guess they aren't part of the class definition so they just get dumped into the object's lookup table, which seems to be public.


20.

None

Topic: Optimisation/indu vidual filters

Posted: 10/11/08 04:56 PM

Forum: Flash

if (red == true) {
this.filters = [];
this.filters = [redfilter];
}
if (green == true) {
this.filters = [];
this.filters = [greenfilter];
}

You're applying the filters to this, when you should be applying them to shot. And setting the filters to an empty array right before you change them again is a bit redundant.

if (red == true) {
 		shot.filters = [redfilter];
 	}
 		if (green == true) {
 		shot.filters = [greenfilter];
 	}

21.

None

Topic: AS2 question

Posted: 10/11/08 12:46 PM

Forum: Flash

I guess if you want to leave it black, you could leave the multipliers as 0 and use the offset values instead

_root.dot.transform.colorTransform = new ColorTransform(0, 0, 0, 1, 255, 0, 0, 0); // add 255 red to the color

22.

None

Topic: AS2 question

Posted: 10/11/08 12:35 PM

Forum: Flash

At 10/11/08 11:24 AM, masterlink950 wrote: Well it would seem neither of those work (setColor or theColour). I even tried a few different things.
I believe I got a little confused from your description's.

Here is the actionscript I THINK I'm supposed to use, correct me if I'm wrong (Which I'm pretty sure I am...)

onClipEvent (load) {
var red = true;
if (red == true) {
_root.dot.setRGB(0xFF0000);
}
}

setRGB is deprecated anyway. I would use ColorTransform to do it

onClipEvent(load) {
	import flash.geom.ColorTransform;
	var red = true;
	if (red == true) {
		_root.dot.transform.colorTransform = new ColorTransform(1, 0, 0, 1, 0, 0, 0, 0);
	}
}

The first 3 values of the ColorTransform are red, green and blue multipliers (0-1 range), and the 4th is an alpha multiplier. The other 4 are offsets to add r, g, b, a to the color. All you really need to worry about are the first 3 and leave the 4th as 1.


23.

None

Topic: AS2 question

Posted: 10/11/08 12:04 PM

Forum: Flash

Too slow :(

And I messed up the order in my explanation too :/


24.

None

Topic: AS2 question

Posted: 10/11/08 12:02 PM

Forum: Flash

You can bitshift the values of the components into their proper positions (8 bits of red, 8 bits of blue, 8 bits of green)

var r:Number = 255;
var g:Number = 255;
var b:Number = 0;
var rgb:Number = (r << 16) + (g << 8) + b;

In as3 you could use uints.


25.

None

Topic: Html Tags In Flash

Posted: 10/11/08 09:22 AM

Forum: Flash

He wants only part of the string to be bolded, so some weird 2 frame workaround doesn't get the job done. And this problem has everything to do with html tags.

textBox.html = true;
textBox.htmlText = "Hello, im <b>BILLYPROGRAMMER</b>";

26.

None

Topic: public function to control timeline

Posted: 10/10/08 08:53 AM

Forum: Flash

Flash doesn't like parent swfs messing with child swfs too much. I'm not sure of the specifics, but that could well be the problem.


27.

None

Topic: public function to control timeline

Posted: 10/10/08 05:16 AM

Forum: Flash

If your class extends MovieClip, it inherits all the same properties and methods of MovieClip, so yeah you could use gotoAndStop etc.


28.

None

Topic: Movieclip Depth Problems

Posted: 10/09/08 07:30 PM

Forum: Flash

At 10/8/08 05:17 PM, DanBomer wrote: onClipEvent (enterFrame) {
thisDepth=this.getDepth(), otherDepth=_root["MC"+i].getDepth();
if (this._y>_root["MC"+i]._y && otherDepth>thisDepth) {
this.swapDepths(_root["MC"+i]);
}
if (_root["MC"+i]._y>this._y && thisDepth>otherDepth) {
this.swapDepths(_root["MC"+i]);
}
}

You never say what i is. You probably want some kind of for loop there.


29.

None

Topic: Movieclip Depth Problems

Posted: 10/08/08 01:16 PM

Forum: Flash

The bullets seem to be instant, so you could check if the _y of the player and the _y of the enemy are within a certain distance when you fire

if (Math.abs(player._y - enemy._y) < someDistance) {

30.

None

Topic: curveTo placement problem

Posted: 10/08/08 05:55 AM

Forum: Flash

curveTo isn't supposed to go through the control point that you supply. It uses it as a guide, like a corner that the curve aims at.
Anyway, you could probably come up with an exact solution if you did some research into bezier curves, but you may as well just fudge it by multiplying the y by some constant.

Try something like

moveTo(p1._x, p1._y);
curveTo(p3._x, p1._y + (p3._y - p1._y) * 1.5, p2._x, p2._y);

and then adjust the 1.5 until it looks about right.


All times are Eastern Standard Time (GMT -5) | Current Time: 07:17 AM

<< < > >>

Viewing 1-30 of 919 matches. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 92031